Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Changing bounds of continuous variables during optimization

    Posted 12/28/14 12:09 AM

    Originally posted by: oozaltin


    Hi,

    How do I change the bounds of continuous variables in a callback such that the change is only effective in subsequent child nodes?

    The varbd argument of the CPXbranchcallbackbranchbds function only accept integer values. In my case, bounds can take fractional values.

    Thanks

    Osman


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Changing bounds of continuous variables during optimization

    Posted 12/28/14 12:08 PM

    Originally posted by: gtoptimizer


    CPXchgbds might be what you are looking for.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Changing bounds of continuous variables during optimization

    Posted 12/28/14 05:55 PM

    I trust you are planning to tighten the bounds (you're not allowed to loosen them).

    I'm looking at the docs for CPXbranchcallbackbranchbds, and I don't see an argument named "varbd". The three arguments related to the bound changes are:

    • int const * indices (a vector of indices mapping bounds to variables);
    • char const * lu (a vector of "L", "U" or "B" designating to which bound or bounds each change applies); and
    • double const * bd (a vector of new bound values).

    The bd vector is double precision, not integer.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Changing bounds of continuous variables during optimization

    Posted 12/28/14 07:02 PM

    Originally posted by: gtoptimizer


    According to the latest documentation, bd is integer; as you've pointed it out, there is no such thing as varbd though.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Changing bounds of continuous variables during optimization

    Posted 12/28/14 11:03 PM

    Originally posted by: oozaltin


    Sorry for the confusion, I meant the bd argument is integer.

    CPXchgbds will not work, because I want the continuous variable to have different bounds on each child. This might work though if the bound was the same on each child.

    I found a dirty way to do it with CPXbranchcallbackbranchbds. If I want x digits of precision for the continuous variable, I multiply its bound by 10^x and round it (up and down), and give it to the CPXbranchcallbackbranchbds. Then, I multiply the constraint coefficient of that continuous variable 10^{-x}. This worked for me.


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Changing bounds of continuous variables during optimization

    Posted 12/29/14 05:38 PM

    Sorry, it appears that 'bd' switched from integer in CPLEX 12.5.1 and earlier to double in 12.6 and 12.6.1.

    If you're branching on a continuous variable, you can just add constraints x <= whatever and x >= whatever in CPXbranchcallbackbranchconstraints().


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Changing bounds of continuous variables during optimization

    Posted 12/30/14 04:36 PM

    Originally posted by: oozaltin


    Thanks for the response. I think I should update my CPLEX version.


    #CPLEXOptimizers
    #DecisionOptimization