Originally posted by: JDalal
I thought to better explain my question with a code snippet:
My working code is:
typedef IloArray<IloNumVarArray> IloNumVarArray2;
.
.
.
//declaring x_ij
IloNumVarArray2 x(env, num_of_customers);
for(int i=0;i<num_of_customers;i++){
x[i] = IloNumVarArray(env, num_of_location, 0, 1, ILOFLOAT);
}
This is simple, since the indices i and j are just {0,...,num_of_customers} and {0,...,num_of_location}.
Now I have the sets as some discrete integers like I={5,8,12} and j={2,21,49}.
What is a n effective way of coding in this situation?
#CPLEXOptimizers#DecisionOptimization