Originally posted by: MMM12
Bonjour,
I have read toturial and manual of OPL CPLEX to find how I can write a model using tuple but I was confused because of several ways of using tuples.
I copy paste a part of my model to help how I can write a tuple function and how I can rewrite the constraint below.
inta=...;
intb=...;
intc=...;
intd=...;
inte=...;
bigM=10000
//sets:
rangeA = 1.. a;
rangeB = 1.. b;
rangeC = 1.. c;
rangeD = 0.. d;
rangeE = 1.. e;
//parameters:
intdemand[C][D][E]=...;
//desicion variable:
dvar booleanV[B][C][D][E];
dvar float+F[B][C][D][E];
dvar float+R [C][D][E];
//a constarint of model;
forall(jin B) forall(k in C) forall (t in t:t>=1) forall(s in E)
F[j][k][t][s]<=-R[k][t][s]+R[k][t-1][s]+demand[k][t][s]+bigM*(1-V[j][k][t][s]);
thank you in advance.
#DecisionOptimization#OPLusingCPLEXOptimizer