Originally posted by: jinsad
Hi,
It is the first time I am using CPLEX and I just started on operations research field. So I was trying to solve the machine scheduling problem (3x3 for the first try) with the Manne formulation (the attached file). I did the code, it is working but it is violating the constraints.
I think this has a very easy solution fot more experienced people, but rigth now I am starting to work on infinite cycles. I would greatly appreciate any help or any hints :)
float pt[machine,job]=...; //time
float machinejob[machine,job]=...;// order
dvar float Cmax;
dvar float s[job,machine];
dvar boolean bina[job,job,machine];
minimize Cmax;
subject to {
forall (i in machine, j in job )
r_5: s[i][j]>=0;
forall (i in machine, j in job :i>1)
r_1: machinejob[i][j] >= machinejob[i-1][j]+pt[i][j];
forall (i in machine, j in job)
r_2: Cmax >= machinejob[i][j]+pt[i][j];
forall (i in machine, j in job, k in job: k>j)
r_3: s[i][j] >= s[i][k] + pt[i][k] - M*bina[i][j][k];
forall (i in machine, j in job, k in job: k>j)
r_4: s[i][k] >= s[i][j] + pt[i][j] - M*(1-bina[i][j][k]);
}
#DecisionOptimization#MathematicalProgramming-General