Hi,
It is great that min-waiting-time is implemented. GREAT job!
I guess one of the next steps would be optimizing the variable departure time. When I search for this topic and find that, in
this post, Philip suggested: "With the departure from depot time, you could take the final solution generated from jsprit and just set the start time such that it leaves the depot at first_stop_open_time - depot_to_first_stop_travel_time" (I have not read through the codes in the
playground, but does it do the same thing as Philip suggested?)
I don't think this is the correct way to do it. Consider the following example:
One depot location 0, two job locations 1 and 2, the distance between any two locations in any direction is the same and travel time is also the same 1 hour. Assume vehicle earliest departure time is 0, earliest start time is 2 and 4 for job 1 and 2, respectively. There is no end time constraint. Service time is 0.5 hour for both jobs.
There are two feasible solutions: 1) 0->1->2->0; and 2) 0->2->1->0 (assume it is closed route - actually this does not matter). Both solutions have the same travel costs so we only need to compare the waiting times. If vehicle departs depot 0 at time 0, then 0->1->2->0 will have a total waiting time of 1.5 hours (1 hour at job 1 and 0.5 hour at job 2), and 0->2->1->0 will have a total waiting time of 3 hours (at job 2 only). Thus, min-waiting-time will see 0->1->2->0 as optimal.
However, with variable departure time, for 0->1->2->0, in order to have 0 waiting time at job 1, departure time will be 1, and then the total waiting time will be 0.5 hour (at job 2 only); while for 0->2->1->0, in order to have 0 waiting time at job 2, departure time would be 3, and the total waiting time will be 0. Thus 0->2->1->0 is optimal in this case.
Hopefully I did not make any mistake here.
Please kindly let me know what you think. Thank you.
Best regards,
He