Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Optimization Failure CPLEX and MATLAB

  • 1.  Optimization Failure CPLEX and MATLAB

    Posted Fri September 12, 2014 02:52 PM

    Originally posted by: TheOptimizer


    PROBLEM:  I am running an optimization problem in CPLEXQCP for MATLAB.  The problem is a problem where I maximize a mean subject to a target variance.  The matrix that I supply for the target variance (Q) is a large matrix of 9000x9000.  Most of the entries are 0s.  MATLAB finds this matrix to be POSITIVE DEFINITE.  However, the CPLEX optimizer CRASHES with the following error:

     

    Error using cplexqcp (line 649)

    CPLEX Error  5002: Q in %s is not positive semi-definite.

     It is very frustrating.  I have tried several work-arounds, but nothing has worked.  Does anyone have any helps on this?  I have not supplied the data, but the command line is the following.  NOTE:  With other matrices, this command line works fine.

    [x,~,output,~]=cplexqcp([],-mu,[],[],Aeq,beq,0,Sigma,15,lb,ub,[],options)

    If you do supply a solution, please give DETAILED steps, since it is already becoming very complex and frustrating.

     

    Thank you,

     

     

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Optimization Failure CPLEX and MATLAB

    Posted Sat September 13, 2014 03:35 AM

    Originally posted by: Laci Ladanyi


    Cplex does some presolving before actually solving the qcp. Some presolve operations may actually make Q indefinite even if it was positive definite to start with (though this happens very rarely). It is much more likely that either Q was barely positive definite to start with and roundoff error in presolve made it indefinite, or conversely, Q is indefinite to start with but roundoff error in matlab's check make matlab think that is positive definite.

    In any of these cases the first thing to try is to turn off presolve:

    opts = cplexoptimset('cplex');
    opts.preprocessing.presolve = 0;
    

    If you still experience problems then try to save the problem instance and email it to ladanyi at us.ibm.com and we'll take a look at it.

    --Laci


    #CPLEXOptimizers
    #DecisionOptimization