Need help to verify multiple time window feature

It is implemented in this branch
https://github.com/graphhopper/jsprit/tree/jsprit-mv
Will probably merge it into the master by the end of this week.

Hi Stefen I tested it in the above branch . In the TimeWindowExample2, I made the changes in service creation as mentioned above, plus added VehicleRoutingAlgorithm algorithm = Jsprit.Builder.newInstance(problem)
.setProperty(Jsprit.Parameter.TIME_WINDOWS_LATEST_END, “true”)

    		.buildAlgorithm();

I saw that one activity (number19) goes way beyond its time window.

Can you prepare it so that I can reproduce it?

its Simple. In TimeWindowExample2 replace line number 86-95 with this code .
for(int i=0;i<40;i++){
double s1=0,s2=0,s3=0,l1=0,l2=0,l3=0;
s1=random.nextInt(50);
s2=220 + random.nextInt(50);
s3=400 + random.nextInt(50);
l1=75;
l2=300;
l3=500;
System.out.println((i+1)+" t1="+s1+","+l1+" t2="+s2+","+l2+" t3="+s3+"="+l3);

    	Service.Builder builder=Service.Builder.newInstance("" + (i + 1))
                .addTimeWindow(s1, l1)
                .addTimeWindow(s2, l2)
                .addTimeWindow(s3, l3)

// .addSizeDimension(0, 1)
.setServiceTime(25)
.setLocation(Location.newInstance(random.nextInt(50), random.nextInt(50)));
Service service =builder .build();
vrpBuilder.addJob(service);
}

In addition to it just add the following to the

VehicleRoutingAlgorithm algorithm = Jsprit.Builder.newInstance(problem)
.setProperty(Jsprit.Parameter.TIME_WINDOWS_LATEST_END, “true”)

    		.buildAlgorithm();

What is the seed of the random number generator?

    Random random = RandomNumberGeneration.newInstance();

This is the existing code in the example

1 Like

@stefan were you able to reproduce it. Has the changes become part of the main branch

Unfortunately, not. I opened an issue for that: https://github.com/graphhopper/jsprit/issues/279.
It has not been merged into the master.

Hallo zusammen und vielen Dank das ich hier sein darf.

Das Thema interessiert mich als langjähriger Verkehrswacht Mitarbeiter schon sehr lange, habe aber immer den Aufwand gescheut, evtl. wird es mit Euer Hilfe gelingen ?
Dürfte auch zu mehr Verkehrssicherheit beitragen oder ?

Später mehr.
LG
wolle