Decision Optimization

Decision Optimization

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

 View Only
  • 1.  DOCPLEX objective value?

    Posted Tue March 05, 2019 07:01 AM

    Originally posted by: ShaCplex


    Hi ,

    it seems that the objective value is wrongly printed;

    i wrote 

    docplex.mp.model import Model

    docplex.mp.solution import SaveSolution

     

    mdl = Model("LP")

    sol = SaveSolution (mdl)

     

    after solving,

    mdl.solve(log_output = True).display()

    I get the objective = 72508.423

    but sol.get_objective_value() gives me 

     = -1e+75
    

    whats this issue? can you please assist

     

    Regards,

    shahul

     

     

     

     

     

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: DOCPLEX objective value?

    Posted Tue March 05, 2019 08:57 AM

    Where do you get this 72508.423 from? Are you sure it is reported as optimal objective value? Could it be that the model is infeasible and the 72508.423 is just some bound on the objective?

    Can you please explain where this 72508.423 comes from and also show the log output for your solve?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: DOCPLEX objective value?

    Posted Tue March 05, 2019 11:56 PM

    Originally posted by: ShaCplex


    Hi Daniel,

    here you are;

    solution = mdl.solve(log_output=True)

    CPXPARAM_Read_DataCheck                          1
    Tried aggregator 1 time.
    LP Presolve eliminated 23 rows and 9 columns.
    All rows and columns eliminated.
    Presolve time = 0.00 sec. (0.01 ticks)
    

    solution.display()

    solution for: RPS
    objective: 72508.423
    var_BAH-DXB#DXB-JFK_BAH-JFK_PR = 203.000
    var_BCN-DXB#DXB-CPT_BCN-CPT_PR = 143.000
    var_BOM-DXB#DXB-EBB_BOM-EBB_PR = 5589.000
    var_BAH-DXB#DXB-JFK_BAH-JFK_PR_J_J = 203.000
    var_BCN-DXB#DXB-CPT_BCN-CPT_PR_J_J = 143.000
    var_BOM-DXB#DXB-EBB_BOM-EBB_PR_J_J = 5589.000
    

    Regards,

    shahul


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: DOCPLEX objective value?

    Posted Wed March 06, 2019 12:45 AM

    Hm, that indeed looks strange. What is the solution status?

    Can you share the code/model? If not, can you export the model, solve it in the interactive and show the full log from the interactive here?


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: DOCPLEX objective value?

    Posted Wed March 06, 2019 02:51 AM

    Originally posted by: ShaCplex


    Hi Daniel,

    I will share you later, lengthy code. But I found that

    mdl.solve().get_objective_value() gives me the right objective value.

     

    Thanks you,

     

    shahul


    #CPLEXOptimizers
    #DecisionOptimization