I'm working on the traveling salesman problem with time-constrained (TSP with Time Windows). I'd like to find a solution that will give me the earliest time to return to the depot. However, the expected solution has not been obtained. Specifically, it is as follows.
- I set start time to 8:00 am and end time 21:00 pm, but he proposes a plan to wait until 10:00 am at the depot, even though there are nodes (no time-constrained) near the depot. He seems to want me to visit the near nodes at night. As a result, I end up returning late at night.
My request is not to reduce total travel time. Any idea?
Did you try to call the
RoutingModel::AddVariableMinimizedByFinalizer()
?ref: https://github.com/google/or-tools/blob/a0a56698ba8fd07b7f84aee4fc45d891a8cd9828/ortools/constraint_solver/samples/vrp_time_windows.py#L161-L162