Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Warm Start Dual Solution

    Posted 04/10/12 01:33 PM

    Originally posted by: ecnirp


    Hi,

    I am solving an LP, and then based on the solution, adjusting the RHS and resolving the LP (the optimal solution from the first solve is almost certainly infeasible). The second solve is taking much longer than the first, so I was thinking it might be helpful if I could provide the optimal dual solution from the first solve as a starting point. Is there a way of doing this? Also, do I need to specify that the dual simplex should be used?

    Thanks in advance
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Warm Start Dual Solution

    Posted 04/12/12 12:18 PM

    Originally posted by: SystemAdmin


    Do you use OPL or a different API?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Warm Start Dual Solution

    Posted 04/12/12 12:24 PM

    Originally posted by: ecnirp


    Sorry, I should have mentioned that I am using OPL.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Warm Start Dual Solution

    Posted 04/13/12 01:05 AM

    Originally posted by: SystemAdmin


    Did you try using setVectors()/getVectors() as in the example "warmstart" that is distributed with CPLEX Optimization Studio? The example is for MIP but the same thing may work for LP as well.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Warm Start Dual Solution

    Posted 04/13/12 12:46 PM

    Originally posted by: ecnirp


    Hi,

    I've seen that example, and I'm sure it would work for an LP if I was trying to warm start the primal. The problem is I want to warm start the dual. I have not explicitly formulated the dual. I provide the primal formulation, i.e., the dual variables do not have names. The setVectors() method requires you to first use the attach() method which requires the variable vector as a parameter. So, to the best of my knowledge, this will not work for me because the dual has not been formulated and there are no names for the dual variables.

    Am I out of luck?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Warm Start Dual Solution

    Posted 04/16/12 03:49 AM

    Originally posted by: SystemAdmin


    I am sorry, I don't see a way to do what you want to do in pure OPL. So it seems like you are out of luck.
    What might work is to use Java or C++ to call OPL (the distribution has examples that illustrate how to do that) and then use IloCplex::getBasisStatuses() and IloCplex::setBasisStatuses() to define a warmstart basis.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: Warm Start Dual Solution

    Posted 04/16/12 08:25 AM

    Originally posted by: SystemAdmin


    Sorry, I have to correct myself. You can do what you want. You have to proceed just as in the warmstart example but instead of IloOplCplexVectors use IloOplCplexBasis and instead of getVectors()/setVectors() use getBasis()/setBasis(), see also the reference documentation of IloOplCplexBasis.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 8.  Re: Warm Start Dual Solution

    Posted 04/17/12 10:11 AM

    Originally posted by: ecnirp


    Daniel,

    That seems to work. Thanks so much.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer