Originally posted by: ecnirp
Using OPL 6.3, I am solving an LP, then, based on the result, adjusting the RHS of about 4000 equality constraints before re-solving.
Within main{}, the code I am using to adjust the RHS values looks like the following (assume the new RHS value is <= the previous RHS value):
for (k in thisOplModel.Constraints)
{
thisOplModel.b[k].LB = thisOplModel.newbVal[k];
thisOplModel.b[k].UB = thisOplModel.newbVal[k];
}
This block of code is consuming a significant amount of time (a few minutes), and I am curious as to why this is. Also, is there a more efficient way of doing what I want?
#DecisionOptimization#OPLusingCPLEXOptimizer