Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

how to suppress zero-coefficients in an LP file

  • 1.  how to suppress zero-coefficients in an LP file

    Posted Thu February 06, 2020 10:08 AM

    Originally posted by: open_ball


    Hi,

     

    I create an LP file to see if the model is created in a correct way in Java API. However, the objective function contains the variables which are associated with zero-coefficients and that makes it hard for me to analyze the model. I was wondering if there is any way that I can only see the variables with non-zero coefficients.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: how to suppress zero-coefficients in an LP file

    Posted Thu February 06, 2020 01:47 PM

    Within your Java program, if "cplex" is the name of your IloCplex instance, you could just print cplex.getObjective(). That would print a human-readable version without any terms having zero coefficients.


    #CPLEXOptimizers
    #DecisionOptimization