Decision Optimization

Decision Optimization

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

 View Only
  • 1.  non convex quadratic problem in matlab

    Posted Fri May 10, 2019 06:03 AM

    Originally posted by: Mambo12345


    Hey everybody,

    I am using Cplex in matlab and I want to solve a quadratic optimization problem with linear constraints with cplexmiqp. My values of x should be binary.

    This is my code, where H is symmetric and all vectors /matrices are of the right size.

    [x,fval] = cplexmiqp(H, f, A, b', Aeq, beq', [], [], [], lb, ub,[],[],options)

    I always receive this error: CPLEX Error  5002: %s is not convex.

    I thought this cplexmiqp is for non convex problems, because in the description is nothing to find about convexitivity.
    Can please someone help me?

    What does this error mean and how can I fix it ?

    Best regards !


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: non convex quadratic problem in matlab

    Posted Fri May 10, 2019 07:51 AM

    cplexmiqp indeed requires a convex objective. However, in case of all-binary variables the objective function can be easily linearized. But you did not specify a ctype argument, so your variables are continuous. Does the issue persist if you pass a ctype that makes all variables binary?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: non convex quadratic problem in matlab

    Posted Fri May 10, 2019 08:25 AM

    Originally posted by: Mambo12345


    Okay I was wondering why I did not read on the help pages that cplexmiqp has to be convex.
    But when I set every variable as binary it is running and it gave me a correct solution to my problem. This is very nice ! Thank you so much !
    ANd I have nother more to do than set every variable as ctype B and than cplexmiqp will solve the problem, did I understand this right ?
    You can not believe how thankful I am that you helped me and answered so quicl !


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: non convex quadratic problem in matlab

    Posted Fri May 10, 2019 10:52 AM

    Originally posted by: Mambo12345


    Okay it is perfectly working even for bigger matrices. There is no problem with the convexitivity after I pass that every variable has to be binary anymore.
    But the only problem is that it is very slow when my A is a matrix of size 10x140. So when I have 140 variables x it takes around 1 hour to solve it.
    Is this normal or is it because my computer is very slow ? I will open a new topic where I ask what I can do to male it faster, because this issue is answered. Thank you very much therefor !

     


    #CPLEXOptimizers
    #DecisionOptimization