Decision Optimization

Decision Optimization

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

 View Only
  • 1.  get presolved model in cplex

    Posted Thu November 29, 2012 01:54 AM

    Originally posted by: Uonly


    I was trying to make a comparison on two solvers. Since one solver has clear disadvantage in presolving, I want to get the presolved model as an input to those two solvers and then make a comparison.

    I was looking around and found

    int CPXgetredlp(CPXCENVptr env, CPXCLPptr lp, CPXCLPptr * redlp_p)

    should be the correct method to call but it seems there are also other parameters related

    to presolve such as CPX_PARAM_REDUCE and CPX_PARAM_ADVIND.

    At this moment it is not clear how to set these two parameters to fit my purpose. Any insight?

    thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: get presolved model in cplex

    Posted Thu November 29, 2012 03:12 AM

    Originally posted by: SystemAdmin


    CPX_PARAM_ADVIND is not related to presolve.
    CPX_PARAM_REDUCE can be used to disable certain presolve reductions. The default value for this parameter does not disable anything, so I think you do not want to change that.
    If you are only interested in the presolved model then I would leave all CPLEX parameters at their default values.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: get presolved model in cplex

    Posted Thu November 29, 2012 03:13 AM

    Originally posted by: SystemAdmin


    By the way, if you don't need to do this programmatically there is a very simple way to do this in the interactive optimizer:
    CPLEX> read problem
    CPLEX> write presolved.pre
    

    The 'presolved.pre' file is the presolved problem in SAV file format. To convert this into any other format you can continue the interactive session:
    CPLEX> read presolved.pre
    CPLEX> write presolved.lp
    CPLEX> write presolved.mps
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: get presolved model in cplex

    Posted Fri May 24, 2013 07:06 PM

    Originally posted by: HS5X_Jaehwan_Jeong


    Wow. This is a good answer!

    Is it also possible to get presolved.mps in MATLAB or other API ? I cannot find any similar function in MATLAB.

    Thanks!


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: get presolved model in cplex

    Posted Wed May 29, 2013 03:23 AM

    No, the only ways to get your hands on the presolved model is to use the callable library (C) or the interactive optimizer. But from each API you can export the problem as a SAV file and then use the interactive to get the presolved model (which of course will be of little help if you want to analyze the presolved problem in your program).


    #CPLEXOptimizers
    #DecisionOptimization