Originally posted by: SystemAdmin
CPLEX provides variables with IloXxxx type names when one has not been explicitly provided during the model creation.
You can provide variable names using the following overloaded function for the IloCplex object during variable creation:
public IloNumVar[] numVarArray(IloColumnArray cols,
double[] lb,
double[] ub,
java.lang.String[] name)
Alternatively, you could also set the variable names at a later stage by using the setName method for an IloNumVar object. This could look like the following:
for(int i=0;i<i_range;i++)
for(int j=0;j<j_range;j++)
for(int k=0;k<k_range;k++)
x[i][j][k].setName("x("
i")("
j")("
k")");
Hope this helps.
#CPLEXOptimizers#DecisionOptimization