Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Presolve for QPs?

    Posted 11/10/09 11:31 PM

    Originally posted by: SystemAdmin


    [mpf said:]

    I'm using the following calls

      CPXpresolve(env, lp, CPX_ALG_BARRIER);
      CPXgetredlp(env, lp, &plp);
      CPXwriteprob(env, plp, out_file, "MPS");

    where

      CPXENVptr env;
      CPXLPptr lp;
      CPXCLPptr plp;

    in order to read MPS files and write out an presolved version. It works fine for LPs.

    Should it work for QPs?

    Thanks,
    Michael
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Presolve for QPs?

    Posted 11/11/09 08:06 AM

    Originally posted by: SystemAdmin


    [johncui said:]

    Sure. Please try it.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Presolve for QPs?

    Posted 11/11/09 08:57 PM

    Originally posted by: SystemAdmin


    [mpf said:]

    I did. Checkout the log output below. The routine CPXpresolve reports "Not available for quadratic programs".

    Is this a bug, or is it documented somewhere that presolve doesn't apply to QPs?

    Michael

    [tt]
    ======== aug2d.qps ======

    Selected objective sense:  MINIMIZE
    Selected objective  name:  OBJ.FUNC
    Selected RHS        name:  RHS
    Warning, line 50006:  OBJ coefficient in RHS section ignored.
    Selected bound      name:  BOUNDS
    -- presolve
    CPLEX Error  1018: Not available for quadratic programs.
    getredlp
    writeprob --
    CPLEX Error  1009: No problem exists.
    CPLEX Error  1009: No problem exists.
    CPLEX Error  1009: No problem exists.
    CPLEX Error  1009: No problem exists.
    CPLEX Error  1023: Not a single problem.

    [/tt]

    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Presolve for QPs?

    Posted 11/12/09 08:03 AM

    Originally posted by: SystemAdmin


    [johncui said:]

    Firstly, we support presolve in QP.

    Here is the simplest way:
    open CPLEX interactive optimizer

    CPLEX> read ***.mps
    CPLEX> wri ***.pre

    then you can get the presolved model.

    Or, you can call CPXreadcopyprob to read a mps file, then call CPXpreslvwrite to write the presolved model file.

    As you tried, The routine CPXpresolve performs LP or MIP presolve depending whether a problem object is an LP or a MIP, which documented in CPLEX manual.

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Presolve for QPs?

    Posted 11/16/09 03:01 PM

    Originally posted by: SystemAdmin


    [achterberg said:]

    For QP, you need to pass in either CPX_ALG_PRIMAL or CPX_ALG_DUAL. Calling CPXpresolve() with CPX_ALG_BARRIER is not supported for QPs.

    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Presolve for QPs?

    Posted 11/17/09 12:06 AM

    Originally posted by: SystemAdmin


    [mpf said:]


    Calling CPXpresolve() with CPX_ALG_BARRIER is not supported for QPs.

    Does that mean that the barrier algorithm doesn't support QPs?

    John's reply implies that I should be calling [tt]CPXpreslvwrite[/tt] to simultaneously create and write the presolved QP.  Should I be using that, or [tt]CPXpresolve()[/tt] with one of the [tt]CPX_ALG_(PRIMAL/DUAL)[/tt] options?

    Thanks,
    Michael
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Presolve for QPs?

    Posted 12/02/09 03:14 PM

    Originally posted by: SystemAdmin


    Actually, I am not sure why this particular option is not supported. We are, of course, using presolve for QP barrier solves.

    You can use both variants that you mention, either CPXpreslvwrite or CPXpresolve with CPX_ALG_PRIMAL/DUAL. If you just want to dump the presolved model, I guess that CPXpreslvwrite is more convenient.

    For QPs, the behavior of CPXpreslvwrite depends on the "qpmethod" parameter CPX_PARAM_QPMETHOD. If this is set to CPX_ALG_PRIMAL or CPX_ALG_NET, you get the model from CPXpresolve(CPX_ALG_PRIMAL). If it is set to CPX_ALG_DUAL you get the model from CPXpresolve(CPX_ALG_DUAL). Otherwise, you get the presolve that is more tuned for a subsequent barrier run.

    The reason to have this distinction is that for simplex and barrier solves you want to do slightly different stuff in presolve in order to (hopefully) improve the performance of the subsequent solve.
    #CPLEXOptimizers
    #DecisionOptimization