You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
main
{
function loadAndSolve(model_mod, model_dat) {
writeln("Solving " + model_mod);
var cplex1 = new IloCplex();
var source1 = new IloOplModelSource(model_mod);
var def1 = new IloOplModelDefinition(source1);
var opl1 = new IloOplModel(def1, cplex1);
var data1 = new IloOplDataSource(model_dat);
opl1.settings.mainEndEnabled=true;
opl1.addDataSource(data1);
opl1.generate();
if (cplex1.solve())
{
writeln("successfully solved " + model_mod);
opl1.postProcess();
}
else {writeln("No solution found for " + model_mod);}
opl1.end();
}
loadAndSolve("model1.mod", "model1.dat");
loadAndSolve("model2.mod", "model2.dat");
}
We expect that model1.mod is loaded/solved, then any output for model1.mod to be saved.
Then model2.mod is loaded/solved, then any output for model2.mod` is saved.
However only the output of model1.mod is triggered.
The text was updated successfully, but these errors were encountered:
The reason for this behaviour is that db connection update() statements are triggered at postprocessing, but the postprocessing callback is only registered to the first model. Working on a fix + tests for this.
Let's consider this code:
We expect that
model1.mod
is loaded/solved, then any output formodel1.mod
to be saved.Then
model2.mod
is loaded/solved, then any output for
model2.mod` is saved.However only the output of
model1.mod
is triggered.The text was updated successfully, but these errors were encountered: