Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  MIP numericall error

    Posted 10/19/11 02:39 AM

    Originally posted by: apscomeup


    Hi! I am trying to solve linear problem with boolean variables defined on set NODES anode in NODES.
    I want to define constraint which must be satisfied if correspobding variable anode has the value equeal one, and can not be satisfied if the value equeal zero.

    Constraint is like this:
    Wnode in NODES >= C
    where C ia a positive constant.
    and W is a positive float.

    So i place constraint(for all node in NODES):

    Wnode +M*(1-anode)>= C
    where M is a positive constant which has great value.

    Now i solve the problem for
    C = 101
    M = 99999
    and magnitued of W variables is not mor than 10^3.

    CPLEX solves the problem succesfully. But if i replace the value of C constanct with 100.5, CPLEX still give optimal solution with no conflicts but relly constraint is not satisfied!

    What are the reasons? explain please
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: MIP numericall error

    Posted 10/19/11 05:34 AM

    Originally posted by: SystemAdmin


    I am not sure whether I understand you correctly.
    You have an optimal solution for C = 101. Then you decrease C to 100.5 (i.e., relax the constraint) and get the same solution that now suddenly violates the constraint??

    Maybe this is a typo and you increased C to 101.5, and the solution now violates the constraint by 0.5.

    What is the exact value of the binary a variable? Note that CPLEX uses an integrality tolerance of 1e-5 by default. So, it may be that CPLEX just set the variable to 1 - 1e-5, and suddenly you get M*(1-(1-1e-5)) = M*1e-5 = 0.99999. This allows the constraint to be relaxed by much more than 0.5...

    Instead of using such large big-M's you could try to use indicator constraints. Alternatively, try to set the integrality tolerance to 0.
    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: MIP numericall error

    Posted 10/19/11 01:59 PM

    Originally posted by: apscomeup


    Thank you, Tobias!

    I have an optimal solution for C = 101. Then i decrease C to 100.5 and get not the same solution. CPLEX says it is optimal and no violates the constraint. But I can see that relly W is smaller rhen 100.5 not only for nodes where binary variable equeal zero.

    I am sure the reason is an integrality tolerance. I will check it!

    I use ILOG Studio, can you give me an example how can i use indicator constraints in my case. I have not found description of indicator constraints in OPL refference. But there are logical constraint. But logical constraints do not let use binary variable in condition statement.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: MIP numericall error

    Posted 10/20/11 04:07 AM

    Originally posted by: apscomeup


    I've googled forum and found an answer how to use indicator constraints in OPL. I've just tried it. My problem has about 15 thousands variables and about the same number of constraints. 1500 of them are binari variables. Objective include only binary variables and parameters.

    With big M it took a 1 minute to solve my problem, and with indicator constraint it has been solving for 10 minutes and still do it.

    Any ideas?
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: MIP numericall error

    Posted 10/25/11 02:26 PM

    Originally posted by: SystemAdmin


    Well, it could just very well be that with the big-M formulation you get an answer much faster, but the answer is incorrect. This is due to the integrality tolerances which allows CPLEX to have binary and integer variables being slightly fractional. Multiplied with a big-M, this tiny fractionality grows to a big value and you get an infeasible solution.

    With indicator constraints, you would get the correct solution, but of course it can just be that the correct model is much harder to solve.

    Tobias
    #CPLEXOptimizers
    #DecisionOptimization