Dear All,
I am very familiar with C++ interface of CPLEX. I have just started using Gurobi with C++. I wanted to declare a 2 dimensional array of size I*J.
In CPLEX the syntax for such operation is:
IloEnv env;
IloArray<IloNumVarArray> x(env,I);
for(IloInt i=0;i<I;i++)
x[i] = iloNumVarArray(env,J,0,1,ILOFLOAT);
However when I try to replicate in Gurobi using:
GRBVar x[J][I];
it throws an error saying dimensions of the array should be constant.
I wish to create an array whose dimensions are not constant.
Please advise
Sagnik