Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Solutions violates Constrains

    Posted 10/04/15 09:08 AM

    Originally posted by: NashVio


    Dear all,

    I'm working on a mixed integer problem using C++ and Cplex. 

     

    Unfortunately recent solution seem to obviously violate constraints.

    For example in the model there is the constraint:

     _2x2AM_I_0_42#4602:       G_0_42#642 - 0.5 A_0_42#6642 <= 0

     

    In the solution I get:

    A_0_42#6642 = 0 (binary variable)

    G_0_42#642 =0.5 

     

    which is obviously a violation.

    Unfortunately i could manage to simplify the problem as for similar problems it only appears sometimes and I could not find out what's the reason.

     

    I already found this page (CPLEX appears to return a solution that violates some constraints or bounds), which suggest that I might be ill conditioning or inappropriate tolerance settings.

    http://www-01.ibm.com/support/docview.wss?uid=swg21400045

    Using the interactive optimizer to analyze this I received:

     

    CPLEX> display solution quality
    Incumbent solution:
    MILP objective                                 4.5580468750e+00
    MILP solution norm |x| (Total, Max)            2.13515e+03  1.00000e+00
    MILP solution error (Ax=b) (Total, Max)        1.20425e-14  1.11022e-16
    MILP x bound error (Total, Max)                1.54422e-12  9.78884e-13
    MILP x integrality error (Total, Max)          0.00000e+00  0.00000e+00
    MILP slack bound error (Total, Max)            1.74062e-09  9.80265e-11

    Branch-and-cut sub problem optimization:
    Max condition number:                    8.5393e+03
    Percentage (number) of stable bases:     100.00%   (20)
    Percentage (number) of suspicious bases:   0.00%   (0)
    Percentage (number) of unstable bases:     0.00%   (0)
    Percentage (number) of ill-posed bases:    0.00%   (0)

     

    I am not sure if I am interpreting it the right way but it seems to be ok.

     

    So my question is:

    Does anybody have any suggestions where the reason for the violation of the constraints comes from?

     

    I probably missed to post some important data which is necessary to help me, so just let me know what you need.

     

    Edit: I exported the .sav file to the interactive Optimizer. Solving it there everything seems alright and the constraints are not violated. How is it possible that there is a dfference between solving it in the interactive optimizer and with C++/Concert

     

    Thank you very much in advance!

     

    Tobi


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Solutions violates Constrains

    Posted 10/15/15 08:41 AM

    How do you determine infeasibility of the constraint?

    Do you get the variables and then compute the left-hand side yourself? What does IloCplex::getSlack() return for this value.

    How do you get the value of binary variable? Do you happen to use getValue() and then cast the value to 'int'? What value do you get for the binary variable if you use round(getValue(...)) instead? Does it happen to return 1?


    #CPLEXOptimizers
    #DecisionOptimization