Closed sebhoerl closed 1 year ago
I just noticed that there is no problem if I remove the time windows from the vehicles (and it works with the maximum travel time constraint, which solves the problem for now in my case).
Thanks for testing and sharing. I can definitely reproduce the problem, there is probably a flaw in the cost evaluation related to one of the local search operator. Given the instance size, this should be straightforward to debug. I'll give it a go as soon as I can (I'm off in the next few days) and publish a new release candidate with a fix.
The problem lies in the PDShift operator. In cvrp::PDShift
, we first take into account adding the fixed cost upon moving a shipment in an empty route:
Then we account for the actual route cost:
Now for vrptw::PDShift
the first part is already done upon calling the cvrp:PDShift
parent ctor, but a silly mistake erases that value later on, instead of subtracting the other cost:
I just merged the branch from #860 in both master
and release/1.13
, and tagged a new v1.13.0-rc.2
release candidate.
same for docker repo, trying to keep up;) if you could open an issue there it'd be best, I might miss it otherwise. maybe some folks prefer docker to test release candidates.
Thanks, works perfectly!
I just started playing around with the per-vehicle costs feature in the current master (865d22e). To test, I constructed a minimal example with one pickup and one dropoff and two vehicles with equal distance costs and different per-vehicle cost. The idea was simply to verify that the vehicle with the lower fixed costs is chosen.
However, I get the following error message:
If I set any of the two fixed costs to zero, no error is produced and the one with zero costs is selected.
Here is a minimal test problem: