Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Q matrix when NUMCOLS > NumQuadraticNonzeros

    Posted 03/02/11 03:16 AM

    Originally posted by: mkmk


    I am trying to solve a problem which has 13 decision variables.
    4 of them are quadratic (x1~x4) and rest of them are linear.

    For example,

    min x1^2 + x2^2 + x3+ x4
    ..

    In this case, NUMCOLS = 4, and NUMQNZ = 2 and Q matrix is supposed to be

    [ 2 0
    0 2 ]

    How am I supposed to set the Q matrix in this case?

    I tried

    for(int i = 0; i < NUMCOLS; i++){
    if(i < NUMQNZ){
    zqmatbeg[i] = i;
    zqmatcnt[i] = 1;
    }
    else{
    zqmatbeg[i] = i;
    zqmatcnt[i] = 0;
    }
    }

    for(int i = 0; i < NUMQNZ; i++){
    zqmatind[i] = i;
    zqmatval[i] = (-1)*val;
    }

    It compiles, but gives me infeasible solution..

    Solutio status = 119
    CPLEX Error 1217L No Solution Exists.
    Could you please please help me overcome this problem?

    I really appreciate it!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Q matrix when NUMCOLS > NumQuadraticNonzeros

    Posted 03/02/11 11:33 AM

    Originally posted by: SystemAdmin


    Which API are you using.

    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: Q matrix when NUMCOLS > NumQuadraticNonzeros

    Posted 03/02/11 12:54 PM

    Originally posted by: mkmk


    I am using Callable Library.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Q matrix when NUMCOLS > NumQuadraticNonzeros

    Posted 03/03/11 06:06 PM

    Originally posted by: SystemAdmin


    Sorry, got so wrapped up in the quadratic objective I missed the obvious point. The solution code you got implies that the problem was either infeasible or unbounded. Objective functions have nothing to do with feasibility, so if it's infeasible, you need to look to your constraints. It's possible that, if your feasible region is not bounded, the problem may be unbounded. You set the coefficients of x1^2 and x2^2 to (-1)*val. If val is positive, and if there are no limits to the growth of x1 and x2, this would make the problem unbounded.

    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