Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  MIQP Problem solved incorrectly

    Posted 06/08/11 06:55 PM

    Originally posted by: SystemAdmin


    Hello,

    I'm solving a number of MIQP problems with binary and continuous variables. Some of the continuous variables in the objective function are multiplied by two binary variables, which results in an objective function more complex than CPlex can solve.
    So I perform the following trick for every tripple a * b * x, where a and b are binary and x is continuous I introduce a new continuous variable y and the following constraints:
    y >= 0, y <= x, y <= L * a, y <= b * L, y >= x - L * (1 - a) - L * (1 - b), where L is a sufficiently large constant (using L = 1e7 at the moment). If I'm not wrong, this trick should make y = a * b * x at all times. However, after optimization converges I'm getting variables y for which the above constraints are violated. So I'm wondering if I'm doing something that CPlex does not support or there's a problem in my problem formulation or I'm using Cplex incorrectly.

    The optimization problem is created dynamically based on input data by using cplex though its C++ API. I have created an mps export file of the problem, which gives me trouble. For this problem Cplex often (I'm using opportunistic search mode) finds a solution with objective function value of 669, while the actual optimal (as long as I know) is smaller (I suppose it's equal to 597.189). I haven't tried running the exported MPS file from outside C++ API and do not know if it gives different results when solved differently.

    Regards,
    Alexey Gritsenko.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: MIQP Problem solved incorrectly

    Posted 06/09/11 02:43 AM

    Originally posted by: SystemAdmin


    Have you tried enabling numerical emphasis?
    When I solve your problem in the interactive I get -6.6899999969e+02 in default settings.
    When I enable numerical emphasis (parameter NumericalEmphasis in C++) then I get -5.4700000000e+02 which is closer to the value you guessed.
    In general, it is better to export problems to a .sav file if you want others to reproduce the issues you have. The .sav format is a binary format that does not suffer from truncation of floating point values like the text file formats .lp and .mps.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: MIQP Problem solved incorrectly

    Posted 06/09/11 06:06 PM

    Originally posted by: SystemAdmin


    Sorry for a delayed response.
    I have done a very quick test and Numerical Emphasis did not change anything. In fact -547 is just another valid (but not optimal) objective function value. I should have more time tomorrow to post a .sav file of the original problem and one which should prove that there's a more optimal solution (have the binary variable values written down somewhere).

    Kind regards,
    Alexey Gritsenko.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: MIQP Problem solved incorrectly

    Posted 06/09/11 05:46 PM

    Originally posted by: SystemAdmin


    Another possible reformulation is to change the constraints on y to
    y <= a
    y <= b
    y >= 0
    


    and then include the product x*y (which gets you back to quadratic, and avoids the annoyingly large constant L).

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: MIQP Problem solved incorrectly

    Posted 06/09/11 06:02 PM

    Originally posted by: SystemAdmin


    Thank you for a suggestion. I belive it also requires a constriant
    y>=a+b-1
    

    I have tried some other reformulation which left products of a binary variable and a continuous one in the objecive function (i.e. x * y), but the whole problem became infeasible afterwards. But I will try the reformulation you proposed.

    Regards,
    Alexey Gritsenko.
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: MIQP Problem solved incorrectly

    Posted 06/10/11 05:13 PM

    Originally posted by: SystemAdmin


    Yes, you are correct. I should have included that constraint.
    #CPLEXOptimizers
    #DecisionOptimization