Hi all,
I solved my model with the same data file twice, but I got different optimal solution. The gap of them are both 0. Does anyone know the reason? Thanks in advance.
Firstly, I run my code with logical expression
ct8://arrival:
forall(k in orders, s in services:s.a in orders_arcs[k])
(x[k][s]==1)=>(arrival_time[k][s.a.tonode]==s.dept_time+s.traveling_time);
ct9://time_window:
forall(k in orders, <i,j> in orders_arcs[k]:i not in k.dest,s in services:s.a==<i,j>)
(x[k][s]==1)=>(arrival_time[k][i]+processing_time[k][i]<=s.dept_time);
ct10://due_time:
forall (k in orders, <i,j> in orders_arcs[k]:j in k.dest )
arrival_time[k][j]<=k.due_time + k.release_time;
and I got these:
Then I use general expression:
ct8:
forall(k in orders, j in orders_nodes[k]:j not in k.origin)
sum(s in services:s.a.tonode==j)x[k][s]*(s.dept_time+s.traveling_time)<=arrival_time[k][j];
ct9:
forall(k in orders, <i,j> in orders_arcs[k]:i not in k.dest,s in services:s.a==<i,j>)
arrival_time[k][i]+processing_time[k][i]<=x[k][s]*s.dept_time+Infinity*(1-x[k][s]);
ct10:
forall (k in orders, j in orders_nodes[k])
arrival_time[k][j]<=sum(s in services:s.a.tonode==j)
(k.due_time + k.release_time)*x[k][s];
However, the optimal solution changed and service plan also changed.
------------------------------
Dario Pisinger
------------------------------
#DecisionOptimization