Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  CPLEX: Get Variable and Constraint Number After Presolve

    Posted 07/30/16 02:03 PM

    Originally posted by: Bernardo88


    Hello.

    I am using CPLEX integrated in C++ through Concert.

     

    I use cplex.getNcols() and cplex.getNintVars to get the number of variables and cplex.getNrows() to get the number of constraints.

    This information is relative to the initial model.

    I wanted to know how I can extract information of the model after presolve, namely the number of constraints and integer variables.

     

    Thanks and Best Regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX: Get Variable and Constraint Number After Presolve

    Posted 08/02/16 07:28 AM

    Sorry, there is no way to get this information other than parsing the CPLEX log output (which should be easy).

    What do you plan to do with that information?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX: Get Variable and Constraint Number After Presolve

    Posted 08/03/16 07:59 AM

    Originally posted by: Bernardo88


    Thank you for replying.

    I'd associate the size of the reduced mip with the time required for solving it (excluding presolve time).


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CPLEX: Get Variable and Constraint Number After Presolve

    Posted 08/05/16 02:53 PM

    Since you are solving the model anyway and you plan to exclude presolve time (which is only available in the log) I think the best thing to do is to parse the CPLEX log output. You can install your own stream via IloCplex::setOut() and then parse the text that CPLEX sends to this stream.

    An alternative would be to IloCplex::exportModel() the model to a SAV file and then write a small application in the callable library that obtains the information you are interested in.


    #CPLEXOptimizers
    #DecisionOptimization