Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to write the constraint with if else consition involving binary and integer variables.

    Posted 11/16/15 02:28 PM

    Originally posted by: Zoubeir


    I have the following constraint: (xij is a binary variable and qi is an integer variable)

    if then 

    else if  then qi > 0

     

    How can I write it in an optimization problem?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: How to write the constraint with if else consition involving binary and integer variables.

    Posted 11/17/15 02:19 AM

    The answer is indicator or logical constraints. How to add these constraints depends on the API you are using. What API do you use?

    Note however that strict inequality is not supported in linear programming. So you will not be able to say "qi>0" but only "qi>=epsilon". This is not always a problem since sometimes it is sufficient to only have "x[ij]=0 implies q[i]=0" since a non-zero q[i] improves the objective function and the solver will thus choose that automatically if possible.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: How to write the constraint with if else consition involving binary and integer variables.

    Posted 11/17/15 11:41 AM

    Originally posted by: Zoubeir


    I am using CPLEX with Python. 


    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: How to write the constraint with if else consition involving binary and integer variables.