0

I am creating a project where I have one model where one variable is always changing, namely ForecastMultiplier. I need to put the results of each iteration into an excel spreadsheet. You can find main down below:

main { var source = new IloOplModelSource ("CS4.mod");
var def = new IloOplModelDefinition(source);

for (var k = 0.8; k <= 1.3; k += 0.1)
{ var modelInstance = new IloOplModel(def, cplex);
 var data = new IloOplDataSource("CS4.dat"); 
 modelInstance.addDataSource(data); 
 var data2= new IloOplDataElements(); 
data2.ForecastMultiplier=k;
  modelInstance.addDataSource(data2);
modelInstance.generate();
cplex.solve();
writeln("For The scenario:" + k +", Optimal solution: " + modelInstance.x);
modelInstance.end()
}
}

I had an idea to do it like this:

DataName to SheetWrite(ConnectionName, “Sheet!xx:xx”);

Thank you

1 Answer 1

0

See technote

"The Excel range can be generated in ILOG Script and then be used by the SheetWrite instruction during postprocessing. "

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.