Originally posted by: archwizard
Greetings, I am a new user to IBM's CPLEX and would like to ask for some help on several things.
To give you an overview of what I am about to show you, I have this Job Scheduling paper I am trying to reproduce for practicing purposes. Shown below are the parameters, minimization function, and constraints.
Shown below is my attempt (also is attached) at trying to model this into IBM CPLEX.
I know it might be wrong, but it is my novice experience attempt after all.
I do not want direct answers nor do I want the easy way on modeling this, I would just like tips on what I can do to improve my programming on CPLEX and resources I may go through to improve myself.
Thank you for your time and any feedback is appreciated
int J = ...; // the set of jobs
int L = ...; // the set of links
int W = ...; // the set of wavelengths
range r = 1..J; // RST of Job j
range d = 1..J; // Duration of Job j
int h; // a large number
dvar boolean a; // alternate links a and b for path p
dvar boolean b;
//obj function
minimize sum(j in J) (S[j] - r[j])/abs(J)
// constraints
subject to {
forall(j in J) //Eq (2)
eqation2:
S[j] >= r[j];
forall(j in J , k in J , j!=k , l in L , w in W) //Eq (3)
eqation3:
sum(p in Paths) ((d[j]*b[l][p]*X[j][p][w] + h*b[l][p]*X[k][p][w])
+(S[j] - S[k] + h*Y[j][k])) <= 3*h;
forall(j in J , k in J , j!=k) //eq (4)
eqation4:
Y[j][k] + Y[k][j] = 1;
forall(j in J)
eq5:
sum(p in Paths , w in W) (X[j][p][w]*a[j][p] = 1);
forall(j in J, p in Paths, w in W)
eq6:
X[j][p][w] is 1 or 0;
forall(j in J, k in J, j!=k)
eq7:
Y[j][k] is 1 or 0;
forall(j in J)
eq8:
r[j] >= 0;
forall(j in J)
eq9:
S[j] >= 0;
}
#CPLEXOptimizers#DecisionOptimization