Hi,
with the CPLEX OPL IDE in order to get the results back from docplexcloud you could use a tuple set
For instance if I run in the IDE
using CP;
int nbKids=300;
float costBus40=500;
float costBus30=400;
dvar int+ nbBus40;
dvar int+ nbBus30;
minimize
costBus40*nbBus40 +nbBus30*costBus30;
subject to
{
ctKids:40*nbBus40+nbBus30*30>=nbKids;
}
tuple t
{
int b40;
int b30;
}
{t} res;
execute
{
writeln("nbBus40 = ",nbBus40);
writeln("nbBus30 = ",nbBus30);
res.add(nbBus40,nbBus30);
}
main
{
thisOplModel.generate();
cp.solve();
thisOplModel.postProcess();
//now 350 kids instead of 300
writeln("now 350 kids instead of 300");
thisOplModel.ctKids.LB=350;
cp.solve();
thisOplModel.postProcess();
// no more than 4 buses 40 seats
writeln("no more than 4 buses 40 seats");
thisOplModel.nbBus40.UB=4;
cp.solve();
thisOplModel.postProcess();
}
then if I run in the cloud and right click to get back the results I will see
regards
#DecisionOptimization