Originally posted by: Rym
Hi
For changing my result in every step of the loop for ,i should set the value of the range a to a static parameter that i think isn't normal think
int v = ...;
range V = 1..v;
int VM[V] = ...;
int a[1..300];
main
{
var masterDef = thisOplModel.modelDefinition;
var masterCplex = cplex;
var masterOpl = new IloOplModel(masterDef, masterCplex);
var masterData = thisOplModel.dataElements;
for(var h=1;h<=10;h++)
{
var masterOpl = new IloOplModel(masterDef, masterCplex);
masterData.v=h;
masterData.VM=thisOplModel.a;
for(var q=1;q<=h;q++)
{
masterData.VM[q]=1+(Opl.rand() % (4 - 1 + 1));
}
masterOpl.addDataSource(masterData);
masterOpl.generate();
}
}
thanks
#DecisionOptimization#OPLusingCPLEXOptimizer