Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Can we retrieve Feasibility Range and Optimality Range Post Solve through OPL?

    Posted 09/01/16 01:32 PM

    Originally posted by: naveendivakaran


    Hi,

    I know how to retrieve Dual and Reduced Costs from Solutions using OPL.

    For example to retrieve Reduced Cost I would use:

     

    for (var p in thisOplModel.WSWWIndex)
    writeln(thisOplModel.tool_shortage[p].reducedCost)

     

    Is there a similar way in which I can retrieve Feasibility (for constraints RHS) and Optimality Ranges (for Objective Coefficients)? I know how to get them through Interactive CPLEX. But I am looking for an OPL method.

    -Naveen


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Can we retrieve Feasibility Range and Optimality Range Post Solve through OPL?

    Posted 09/01/16 03:00 PM

    Hi,

    I am afraid you cannot do that in OPL directly.

    But what you can do is an external java call as suggested at

    https://www.ibm.com/developerworks/community/forums/html/topic?id=00cb4d3d-270a-48e2-9533-132335a06c1d&ps=25

    regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Can we retrieve Feasibility Range and Optimality Range Post Solve through OPL?

    Posted 09/13/16 08:50 AM

    Originally posted by: naveendivakaran


    Thank you Alex for the quick reply. I need to look at that suggestion. Is there a similar way through Python?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Can we retrieve Feasibility Range and Optimality Range Post Solve through OPL?

    Posted 09/13/16 09:43 AM

    Originally posted by: p_couronne


    This is not documented (yet) but the Model class has dual_values(reps. slack_values, reduced_costs) methods that accept either a variable or a sequence)

    and return the appropriate values.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Can we retrieve Feasibility Range and Optimality Range Post Solve through OPL?

    Posted 09/14/16 03:54 AM

    What Philippe says is correct for docplex. In case you are using the CPLEX Python API then there is get_dual_values() and friends in Cplex.solution.

    And for sensitivity analysis there is Cplex.solution.sensitivity.


    #CPLEXOptimizers
    #DecisionOptimization