Need help to verify multiple time window feature

It is implemented in this branch
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”)


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;
s2=220 + random.nextInt(50);
s3=400 + random.nextInt(50);
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)
.setLocation(Location.newInstance(random.nextInt(50), random.nextInt(50)));
Service service =builder .build();

In addition to it just add the following to the

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


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:
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.