Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

CPLEX MIP bug

  • 1.  CPLEX MIP bug

    Posted Wed August 03, 2011 05:14 AM

    Originally posted by: apscomeup


    Hi!

    I need to solve the stochastic programming problem.
    I have the scenario tree of two stages.
    There are 3 scenarios on second stage.
    There are the set of nodes of tree NODES and the array of sets GOODSNODES in every node.
    The variables are follow: x,y. Where x,y are accordinally the number of good i that uou buy, sell in the node.
    float+ x[NODES,GOODSNODES]
    float+ y[NODES,GOODSNODES]

    I also have many other variables, for example WNODES - the value of goods and money in the node.
    Now i solve the problem to maximize the profit in all scenarios on the second stage:
    sum(node in NODES: node.stage == 2)WNODES

    Then i want to upgrade my model, and gives probabilities to my scenarios. And say i want to maximize profit only on the set of scenarios which gives 100% of probability. So i involve binary variables int aSCENARIOS in 0..1. I also add some new linear constraines and solve the problem.

    The result variables have the same values! The solution is optimal! but in some nodes it gives y<2,1>,3 = 4. But there are the constraints which not allow to sell goods if it were not bought in the root node. So my question is very abstract, have somebode met the problem like this, before? The problem is obviously in the algorithm of MIP. Possible any addition information is needed? Relly, the problem is much bigger then i described before. And i need to solve the problem with hundreds of thouthands variables using CPLEX MIP, is it possible?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: CPLEX MIP bug

    Posted Fri August 12, 2011 12:30 PM

    Originally posted by: EdKlotz


    > apscomeup wrote:
    > Hi!
    >
    > I need to solve the stochastic programming problem.
    > I have the scenario tree of two stages.
    > There are 3 scenarios on second stage.
    > There are the set of nodes of tree NODES and the array of sets GOODSNODES in every node.
    > The variables are follow: x,y. Where x,y are accordinally the number of good i that uou buy, sell in the node.
    > float+ x[NODES,GOODSNODES]
    > float+ y[NODES,GOODSNODES]
    >
    > I also have many other variables, for example WNODES - the value of goods and money in the node.
    > Now i solve the problem to maximize the profit in all scenarios on the second stage:
    > sum(node in NODES: node.stage == 2)WNODES
    >
    > Then i want to upgrade my model, and gives probabilities to my scenarios. And say i want to maximize profit only on the set of scenarios which gives 100% of probability. So i involve binary variables int aSCENARIOS in 0..1. I also add some new linear constraines and solve the problem.
    >
    > The result variables have the same values! The solution is optimal! but in some nodes it gives
    > y<2,1>,3 = 4. But there are the constraints which not allow to sell goods if it were not bought
    > in the root node. So my question is very abstract, have somebode met the problem like this, before? > The problem is obviously in the algorithm of MIP. Possible any addition information is needed?
    > Relly, the problem is much bigger then i described before. And i need to solve the problem with
    > hundreds of thouthands variables using CPLEX MIP, is it possible?

    For MIPs, the pure size of the model does not always determine whether CPLEX, or any other optimizer
    can solve it. The level of combinatorial difficulty of the MIP has more influence. Thus,
    CPLEX has solved MIP models with millions of variables easily, but it also can struggle on models
    with fewer than 100 integer variables.

    Now, if you are getting results that you believe violate constraints you have implemented in
    OPL, you need to verify that the constraints appear in the model as you have intended. To
    start, use OPL's problem browser. If the newly added constraints look correct there, then
    have OPL export an LP file of the model (which you can specify on the Language->run->export
    field in your .ops run configuration file), then examine the constraints that you believe should
    rule out the value of y<2,1>,3 = 4.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer