Originally posted by: PhilippeLaborie
I think the problem is mostly related with the fact that when you use 3 trucks, the model is larger (it grows from around 1000 interval variables for 2 trucks to around 1500 variables for 3 trucks) and thus, the convergence is globally slower. If you look at the convergence curve for 2 trucks (using 1 worker to simplify the analysis, and I'm using the last version 12.9), it looks like this (fig1.png)
There is a big improvement between 5s and 10s.
If you only change the number of trucks and increase it to value 3 and let the search run you get: (fig2.png)
You see that here, the big improvements occurs a bit later between 7 and 15s.
When the search uses several workers in parallel (default behavior), the behavior is a bit similar.
The problem is that in the case of 3 trucks, with a time limit of 15s as you have, the search probably stops before the big improvements.
Here is the convergence curve with automatic search using 12.9 on my laptop (8 parallel workers): (fig3.png)
As you see, getting to solutions close to 11000 just requires a bit longer than 15s.
Note that I made a small change to you model by removing :
forall(d in Days, t in Trucks) max(c in Collection_points: c>1) presenceOf(itvsT[c][t][d]) == presenceOf(truck[t][d]);
and instead adding the intervals itcsT into the span constraint of the trucks:
span(truck[t][d], append(all(u in 1..NbUnloadMax) unloadingT[u][t][d], all(c in Collection_points: c!=1) itvsT[c][t][d]));
It seems to me this formulation is better as the engine will see the individual implications itvsT=>truck and furthermore, the interval variables truck will really represent the use of the truck including the 'load' intervals.
#ConstraintProgramming-General#DecisionOptimization