Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

no optimal solution

  • 1.  no optimal solution

    Posted 07/21/12 04:48 AM

    Originally posted by: Sothea


    Dear all,

    I tried to test a small example as below:

    /*********************************************
    * OPL 12.3 Model
    * Author: Sothea
    * Creation Date: 21 juil. 2012 at 10:04:44
    *********************************************/
    dvar float x;
    dvar float y;
    dvar float z;

    dexpr float obj=z+x*y;
    minimize obj;
    subject to
    {
    c1: x+y==1;
    c2: x>=0 ;
    c3: x<=1;
    c4: y>=0 ;
    c5: y<=1;
    c6: z+x>=1;
    }

    there is no optimal solution by OPL Cplex. It is strange. In fact, the optimal solution should be x=1,y=0 and z=0. And the minimum objective function value should be equal to zero. right?

    Do you have any idea, why Cplex cannot find the optimal solution?

    Thanks,
    Sothea
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: no optimal solution

    Posted 07/22/12 01:35 PM

    Originally posted by: SystemAdmin


    CPLEX will minimize a convex quadratic objective function, but your objective it's not convex.

    Paul

    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


  • 3.  Re: no optimal solution

    Posted 07/25/12 03:21 AM

    Originally posted by: Sothea


    Hi Paul,

    Thanks for your reply. As i know, the fucntion is convex or semi possitive definite where X'QX>0, right? as x>=0, y>=0, ==> xy>=0, so i think my function xy is convex. can you explain me more?

    thanks
    sothea
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: no optimal solution

    Posted 07/25/12 07:13 PM

    Originally posted by: SystemAdmin


    Let f(x,y) = xy. f(2,3) = f(3,2) = 6, but at the midpoint between those two points f(2.5,2.5) = 6.25 > 1/2 f(2,3) + 1/2 f(3,2). So f is not convex, even in the positive orthant.

    You are correct that f(v) = v'Qv is strictly (weakly) convex if and only if Q is positive (semi) definite. Q is positive (semi) definite if and only if v'Qv > (>=) 0 for all v not identically zero ... but that condition must hold for all nonzero v, not just for v in the positive orthant.

    I ran your problem in the interactive optimizer, and sure enough it coughed up the following: CPLEX Error 5002: Q in objective is not positive semi-definite.

    Paul

    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: no optimal solution

    Posted 07/26/12 05:10 AM

    Originally posted by: Sothea


    Dear,

    I am clear. Thanks for your explanation. In fact, i introduce this function xy in order to convert Boolean variable into continuous variable. I want x=0 and y>0 or x>0,y=0. So it is not possible to do it. Another way, i declare x as integer variable and i introduce the objective function min x^2-x. I wonder that MIQP which has Boolean variable is more complex than integer one. That is why i try to convert all Boolean variable into integer. But Cplex still consider x as Boolean variable. Do you have any idea? Is my hypotheses correct?

    Thanks,
    Sothea
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: no optimal solution

    Posted 07/26/12 11:07 PM

    Originally posted by: SystemAdmin


    Boolean variables do not raise model complexity any more than integer variables do. To enforce a requirement that at least one of x, y be zero, consider declaring them members of an SOS1 set.

    Paul

    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


  • 7.  Re: no optimal solution

    Posted 07/27/12 02:17 PM

    Originally posted by: Sothea


    Thanks so much for your answer. But can you detail how we can declare SOS1 in Matlab? i tried to do it but it doens't affect to calculation. I think i did it wrong way. Thanks for your help again.
    sothea
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: no optimal solution

    Posted 07/27/12 04:57 PM

    Originally posted by: SystemAdmin


    Sorry, I do not use MATLAB.

    Paul

    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


  • 9.  Re: no optimal solution

    Posted 07/31/12 04:34 AM

    Originally posted by: SystemAdmin


    See the examples mipex3.m and transport.m in the CPLEX distribution. They both use SOS constraints.
    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: no optimal solution

    Posted 07/31/12 07:39 AM

    Originally posted by: Sothea


    thanks so much for reponse. I have a look in these exaple but i am not clear the meaning, for example here:

    cplex.addSOSs('1', 2 3', 25 18', {'sos1(1)'});

    it means :

    sostype='1';
    sosind=2 3';
    soswt=25 18'

    in toolbox?

    and it means:

    variable x2 =0 force x3=0?

    thanks again for your detail.
    sothea
    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: no optimal solution

    Posted 07/31/12 08:12 AM

    Originally posted by: SystemAdmin


    Did you look at the reference documentation of addSOS?
    You example defines an SOS1 constraint. The variables in this constraint are the variables with index 2 and 3. By definition an SOS1 constraints means that at most one variable in that constraint can be non-zero. See also the explanation of SOS constraints in the user manual.
    #CPLEXOptimizers
    #DecisionOptimization


  • 12.  Re: no optimal solution

    Posted 07/31/12 11:47 AM

    Originally posted by: Sothea


    Yes, i look these document before i ask you but it is hard to understand for me. I am not clear that is why i ask for more detail. Anyway, thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 13.  Re: no optimal solution

    Posted 10/01/12 11:24 AM

    Originally posted by: SystemAdmin


    In an SOS1 constraint at most one of the variables listed in 'ind' can have a non-zero value. So if you have this
    ind = [ 2, 3 ]
    

    then x2=1 implies x3=0 and x3=1 implies x2=0. x2=0 does not imply anything (x3=0 is legal as well). One often also has a constraint that requires the sum of the variables in 'ind' to be 1. Together with that constraint an SOS1 constraint says "exactly one of the variables in 'ind' must be 1".
    The weight values are only used for branching (to select the variables on which to branch).
    #CPLEXOptimizers
    #DecisionOptimization