Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Trouble to get Dual solutions using OPL IDE (undefined Dual sol)

    Posted Tue March 14, 2017 03:01 AM

    Originally posted by: JungS


    I am solving simple multi-commodity flow problem using OPL IDE.

    Dual solutions some bundle constraints returns as undefined.

    Can anyone help me to figure out the problem?

    The following is the code.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Trouble to get Dual solutions using OPL IDE (undefined Dual sol)

    Posted Tue March 14, 2017 03:42 AM

    Hi,

    When solving an LP or QP, all the algorithms also compute dual solution information that your application can then query.

    But what you could do is read https://www.ibm.com/developerworks/community/forums/html/threadTopic?id=77777777-0000-0000-0000-000014845703

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Trouble to get Dual solutions using OPL IDE (undefined Dual sol)

    Posted Tue March 14, 2017 03:54 AM

    Originally posted by: JungS


    I obtained dual solutions by relaxing integral condition.

    Thank you so much :) 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Trouble to get Dual solutions using OPL IDE (undefined Dual sol)

    Posted Sun June 18, 2017 10:57 PM

    Originally posted by: imanopl


    I have the same issue and I have read the https://www.ibm.com/developerworks/community/forums/html/threadTopic?id=77777777-0000-0000-0000-000014845703

    But I still do not understand what does relaxing integral condition means or what other ways exist if we want to utilize dual solution in our model without interactive optimizer?


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Trouble to get Dual solutions using OPL IDE (undefined Dual sol)

    Posted Mon June 19, 2017 10:51 AM

    Hi,

    you get dual info if your model is an LP

    But if your model is a MIP then you do not get any dual. The following explains how to manage with concert, callable and interactive. The link you mentioned explains how to manage within OPL

    In documentation CPLEX > User's Manual for CPLEX > Discrete optimization > Solving mixed integer programming problems (MIP) > Using the MIP solution

    Working with the fixed MIP problem

    Documents working with a fixed MIP.

    Integer variables often represent major structural decisions in a model, and many continuous variables of the model may be related to these major decisions. With that observation in mind, if you take the integer variable solution values as given, then you can obtain useful post-solution information that applies only to the continuous variables, in the usual way. This observation about the information available only for continuous variables in a MIP is the idea behind the so-called "fixed MIP" problem. The fixed MIP is a form of the MIP problem where all of the discrete variables are placed at values corresponding to the MIP solution; that is, the discrete variables are fixed in the sense of set at a given value. Thus a fixed MIP is a continuous problem though not strictly a relaxation of the MIP.

    If you wish to access dual information in such a problem, first optimize your MILP problem to create the fixed MILP problem; then re-optimize it, like this:

    • In Concert Technology, call the method solveFixed . (There is no explicit problem type in Concert Technology, so there is no need to change the problem type as in other components.)

    • In the Callable Library, call the routine CPXchgprobtype with the argument CPXPROB_FIXEDMILP as the problem type and then call CPXlpopt .

    • In the Interactive Optimizer, use these commands to change the problem type and re-optimize:

      • change problem fixed_milp

      • optimize 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Trouble to get Dual solutions using OPL IDE (undefined Dual sol)

    Posted Tue August 22, 2017 04:42 AM

    Originally posted by: imanopl


    Thank you very much for your response and sorry for my coming back late, I am having difficulty realizing what this means exactly, if we consider the integer variables fixed does it change the solution? I am working on a code for benders decomposition in which I need to deal with dual values and I am afraid if we write the duals like this it may change the values and influence the final solution. I checked there is IloCplex::writeSolution in C++ concert technology. 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer