google / or-tools

Google's Operations Research tools:
https://developers.google.com/optimization/
Apache License 2.0
11.16k stars 2.12k forks source link

Adding costs makes problem infeasible #1673

Closed mslazynski closed 4 years ago

mslazynski commented 4 years ago

Hi, I'm experiencing a very strange issue. I'm solving a VRPTW with pickups and deliveries with an initial solution found by a greedy algorithm of my own invention. I'm using default search strategy.

Usually this approach finds quickly very nice solutions, but in some cases there is no Assignment found (even the starting one). After some debugging I've noticed that removing costs from the model fixes the issue. Then I've tried adding random costs for vehicles routing.SetFixedCostOfVehicle(rnd.Next(0, 9), vehicleIndex);. Solver was finding feasible solutions for some of the random costs, for others none whatsoever (even the initial one).

Why adding different costs would have such an impact on the solving process?

Best

mslazynski commented 4 years ago

OK, I've managed to debug the problem. The fault was on the greedy algorithm's said.

Thanks guys for the great soft!