Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Dual model

    Posted Mon August 05, 2013 06:04 PM

    Originally posted by: Paul_Diaz


    Hello, good night.

    I am working on a project with Java Concert technology. I am using a 0-1 model for solving combinatorial optimization problems and I have got the following question:

    Do I have do build the dual model manually?  Is there any way to build it automatically? If yes, how?

     

    Best regards.

    Paul.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Dual model

    Posted Mon August 05, 2013 07:18 PM

    If you want the dual multipliers to either the LP relaxation or (if it is a MILP rather than a pure IP) the dual multiplier to the restricted problem where the integer variables are fixed, that can be done via Java API calls. If you want the actual dual model (not just its solution) to the LP relaxation, I think you will need to build it manually. See this thread for a related question. Even if you managed to automate the conversion (say, by exporting the model, calling the interactive optimizer in a shell, converting to the dual and reimporting that), you would still have to work out the association between dual model elements and primal problem elements (which dual variable/constraint corresponds to which  primal constraint/variable).

    Paul


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Dual model

    Posted Tue August 06, 2013 05:24 AM

    Originally posted by: Paul_Diaz


    Hello, PaulTubin.

    Firstly, thanks for the quick answer.

    And if I just want the dual model solution? Should I use this parameter?

    IloCplex.setParam(IloCplex.IntParam.RootAlg,IloCplex.Algorithm.Dual)

    Paul.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Dual model

    Posted Tue August 06, 2013 06:14 PM

    No, that switches the algorithm used to solve the primal problem (which is unnecessary).  Solve the primal, then use IloCplex.getDual() or IloCplex.getDuals() to get the values of dual variables corresponding to constraints, and IloCplex.getReducedCost() or IloCplex.getReducedCosts() to get the values of dual variables corresponding to bounds on the primal variables (if you specified any bounds).

    Paul


    #CPLEXOptimizers
    #DecisionOptimization