I’m trying to model the following in CPLEX:
Image
Here is my attempt, is this correct? I’m note sure if this is correct since the index “i” is used multiple times.
tuple _IU_ {
int i;
int t;
};
{_IU_} IU = {<1, 1>, <1, 2>,
<2, 1>, <2, 2>};
tuple _IC_ {
int i;
int c;
};
{_IC_} IC = {<1, 1>, <1, 2>, <1, 3>, <1, 4>};
int NT = 31;
dvar float+ FCTU[1..NI, 1..NU, 1..NC, 1..NT];
dvar float+ FTU[1..NI, 1..NU, 1..NT];
subject to {
sixteen: forall(<i, u> in IU, t in 1..NT) FTU[i, u, t] == sum(<i, c> in IC) FCTU[i, u, c, t];
};
New contributor
Emerita Mangosing is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.