Originally posted by: OndrejKral
Hi again, thanks again, I think I got it now.
Lets use your example above. I want set values only to the variables on the diagonal of x. How to do it?
1) Setting cplex2.addMIPStart(opl2.x[1,1],opl2.values[1,1]) ; cplex2.addMIPStart(opl2.x[2,2],opl2.values[2,2]) ; and so on isn't the way because I'm setting multiple MIP starts instead one with diagonal variables set to some value. That is why I was mixing script and OPL arrays because I thought I will just store the references in them and then do cplex2.addMIPStart(ScriptArrayOfReferencesToModelVariables,ScriptArrayOfReferencesToModelValues). But they are Object type and that rise the error when using vecotr.attach() and won't working when using addMIPStart() I assume.
2) Is setting multiple times vector.attach(opl2.x[1,1],opl2.values[1,1]); vector.attach(opl2.x[2,2],opl2.values[2,2]); the way? (is this creating one or multiple CPLEX starting points?)
EDIT: Actually both approaches need arrays as arguments so not a good example.
Best regards,
Ondrej.
#DecisionOptimization#OPLusingCPLEXOptimizer