Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  IfThen API qusetion

    Posted 03/29/19 05:07 AM

    Originally posted by: David0424


    Hi, I am using .net api for CPLEX version 12.8.0.

    I changed one of my big_M constraint into indicator constraints of my model.

    Original model:

    X > epsilon * (1 - Y)

    X < M * (1 - Y)

    X is a variable with postive real number, Y is a binary variable.

    When X=0 then Y = 1, and X > 0 then Y = 0

    I chang it into indicator constraints, and the output of lp file is below:

    ( X=0 then Y = 1) :  -Y + Y_then = 0

                                    Y_then - Y_if >= 0

                                    Y_if = 1 <-> X = 0

    ( X > 0 then Y = 0) :  Y + Y_then = 1

                                    Y_then - Y_if >= 0

                                    Y_if = 1 <-> X >= 0

    Now, I solve two version of my lp files, one is a big_m version, other one is if_then version, and I get differnt solution and objective vaule of the same model.

    My qusetion is that is the if_then constraint too loose? since the solution of ifthen version is worse than big_m version.

    Or other problems lead this result?

    Thanks for the help!


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: IfThen API qusetion

    Posted 04/15/19 04:14 AM

    How exactly did you code up your ifThen constraints? I am asking because you wrote 'X>0' and strict inequality is not supported in linear programming. Also, did you check that both solutions are feasible? Or does one become infeasible if you enforce exact integrality on X or Y?


    #CPLEXOptimizers
    #DecisionOptimization