Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Big M constraints

    Posted 05/02/12 06:33 AM

    Originally posted by: SystemAdmin


    if x(i,j,k)=1 then A(i) >= B(j,k) ?
    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Big M constraints

    Posted 05/02/12 09:19 AM

    Originally posted by: SystemAdmin


    Let say x,A,B all are decision variables,
    I need to write like this
    if x(i,j,k) = 1 then A(i) >= B(j,k)

    there is one possible way I could have a constraint like
    A(i) >= B(j,k)* x(i,j,k),

    But then that constraint would not be a liner it is quadratic. Do you know how to change quadratic constraints to liner constraints.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: Big M constraints

    Posted 05/02/12 09:51 AM

    Originally posted by: SystemAdmin


    The best way is to just use an indicator constraint:
    
    x(i,j,k) = 1 -> A(i) >= B(j,k)
    

    CPLEX supports those logical implications and would transform it into a big-M constraint automatically if it thinks this is useful in terms of numerics and performance. If not, it just leaves it as a logical condition and deals with it by branching.

    If you want to create the big-M constraint manually (which I do not recommend), then you have to know an upper bound for the term B(j,k) - A(i), for example as the upper bound of B(j,k) minus the lower bound of A(i). If M is an upper bound for B(j,k) - A(i), then the constraint looks as follows:
    
    B(j,k) - A(i) + Mx(i,j,k) <= M
    

    As you can see, if x = 0 then the constraint is redundant because
    
    B(j,k) - A(i) <= M
    

    is always satisfied (since M is an upper bound for the difference). On the other hand, if x = 1 then the constraint reads
    
    B(j,k) - A(i) <= 0
    

    which is exactly what you want.
    Tobias
    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: Big M constraints

    Posted 05/02/12 09:52 AM

    Originally posted by: SystemAdmin


    How do i pick the M?
    #DecisionOptimization
    #MathematicalProgramming-General


  • 5.  Re: Big M constraints

    Posted 05/02/12 09:55 AM

    Originally posted by: SystemAdmin


    As I said: M must be an upper bound for B(j,k) - A(i). For example, if you know that B(j,k) <= 1000 and A(i) >= 100, then M = 900 would be valid. If you do not have such an upper bound, then you cannot model this as a big-M constraint and have to rely on indicators.
    But in any case, I still recommend to use indicators, even if you know some finite M.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 6.  Re: Big M constraints

    Posted 05/02/12 10:04 AM

    Originally posted by: SystemAdmin


    But B(j,k) and A(i) are decsion variables,So how do I know the bounds?
    #DecisionOptimization
    #MathematicalProgramming-General


  • 7.  Re: Big M constraints

    Posted 05/02/12 10:47 AM

    Originally posted by: SystemAdmin


    indicators?
    #DecisionOptimization
    #MathematicalProgramming-General


  • 8.  Re: Big M constraints

    Posted 05/02/12 10:53 AM

    Originally posted by: SystemAdmin


    If you do not know what indicator constraints are, then please read the user's manual, for example here: http://publib.boulder.ibm.com/infocenter/cosinfoc/v12r3/index.jsp, and then navigate to CPLEX > User's Manual for CPLEX > Discrete optimization > Indicator constraints in optimization.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 9.  Re: Big M constraints

    Posted 05/02/12 10:49 AM

    Originally posted by: SystemAdmin


    With "decision variables" you mean binary variables?
    Then the bounds are of course 0 and 1, which means M = 1.
    So, you get
    
    B(j,k) - A(i) + x(i,j,k) <= 1
    

    In this case, there is no difference with using indicators or big-M. CPLEX would convert an indicator constraint automatically into this "big-M" form.
    #DecisionOptimization
    #MathematicalProgramming-General