Originally posted by: SystemAdmin
[cmsoc said:]
Hi, I am implementing a model of a scheduling problem in ILog OPL.
I red that noOverlap (<sequenceName> [,M]);
where <sequenceName> is a previously declared sequence decision variable, and M is an optional transition matrix (in the form of a tuple set) that can be used to maintain [b]a minimal distance between the end of one interval and the start of the next interval
in the sequence.
master_c = { 0,1,2,3,4 } ;
C=[0,1,2,3,4];
Setup = [
[ 0, 2, 35, 2, 2 ],
[ 2, 0, 2, 2, 2 ],
[ 2, 2, 0, 2, 2 ],
[ 2, 2, 2, 0, 2 ],
[ 2, 2, 2, 2, 0 ],];
{int} Types={C[c]|c in master_c};
tuple triplet{int c; int k; int value;};
//{triplet} Tiempo={<c,k,par_TVIAJE[<c,k>]>|c in master_c, k in master_c};
{triplet} Tiempo={<c,k,Setup[c][k]>|c in Types, k in Types};
dvar interval Task[c in master_c] size 1; //
dvar sequence Ruta in Task types C;
minimize max(c in master_c) endOf(Task[c]);
subject to {
forall (o in NOR)
first(Ruta,Task[o]);
noOverlap(Ruta,Tiempo);
}
This is the result. the setup time between "Task[4]" and "Task[2]" is 2. why "Task[2]" start at 36?
What I need is that the distance between "Task[4]" and "Task[2]" is 2;
Thanks for your help.
// solution with objective 37
Task = [<1 0 1 1> <1 6 7 1> <1 36 37 1> <1 3 4 1> <1 9 10 1>];
Ruta = {"Task[0]" "Task[3]" "Task[1]" "Task[4]" "Task[2]"};
#DecisionOptimization#OPLusingCPOptimizer