Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  Why is changing the RHS so time consuming

    Posted Tue April 17, 2012 04:08 PM

    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


  • 2.  Re: Why is changing the RHS so time consuming

    Posted Tue April 17, 2012 04:13 PM

    Originally posted by: ecnirp


    Also, changing the UB for a subset of the variables is quite time-consuming. Is this just how things are? Editing the model from within main{} is inefficient?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer