Hello!
I have a working CP model and would like to improve it:
The problem is simple; I have several parcels, each with a weight, an origin, and a destination.
I need to distribute those parcels on trucks in a way that does not exceed the capacity of the truck and minimizes the total costs. Trucks can't do more than 2 stops both at origin (parcel collection in different warehouses) and destination (client warehouses).
min totalCosts = Nº Stops
at origin * Cost Stop
at origin + Nº Stops
at destination* Cost Stop
at destination+ KM
to the furthest destination * Cost
KM.
Although it works, the way I calculate the number of stops does not seem very efficient to me (see model attached).
I do not know if there is a better way to do it :)
Also, I would like to make some notes:
- It is fast in CP, but very slow in CPLEX.
- I can get solutions in seconds, but I would like to obtain better ones.
- If I retry the same problem multiple times I normally get better solutions. Retrying the same problem multiple times with different seeds doesn't seem to do the trick (flow control).
Any suggestions for improving the model will be very welcome, thanks!------------------------------
Tomas
------------------------------
#DecisionOptimization