Originally posted by: AndyHam
Hi IBM CP team,
How to transfer the interval "Presence" status from CP1 to CP2? I decompose a scheduling problem into assigning and sequencing subs. CP1 makes the allocation decision and CP2 does the sequencing decision. In the following example, I am trying to transfer the allocation decision (presence status of interval variables) from CP1 to CP2. Both models have the interval variable of jobOnMch. The script generates an error of "Scripting runtime error: Element "presenceOf" does not exist in OPL model." I can go around by creating a linking variable (binary integer), but I would like to see if there is a direct way.
var sol=new IloOplCPSolution();
for(j in opl2.job) for(m in opl2.mch)
sol.setValue(opl2.presenceOf(jobOnMch[j][m]),opl1.presenceOf(jobOnMch[j][m]));
cp2.setStartingPoint(sol);
Happy Thanksgiving!
Thanks,
Andy
#DecisionOptimization#OPLusingCPOptimizer