Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  solving consecutive identical problems with different bounds

    Posted 12/02/08 05:51 PM

    Originally posted by: SystemAdmin


    [sergio.garcia said:]

    I am programming a strong branching based-on algorithm with Concert to solve a MIP problem. I handle the tree with my c++ code and use Concert Library as a tool for solving the continuous linear problems in each node.

    After having solved a given node, I need to test the fractional variables y (they are binary in the MIP problem) for choosing which one to branch on. Thus, for every index j in a given set D I have the following loop to modify the model M:

        [i] y[j].setBounds(0,0);
        cplex.solve();
        // Show information 0
        y[j].setBounds(1,1);
        cplex.solve();
        // Show information 1
        y[j].setBounds(0,1);[/i]

    As you can see,I need to solve the same model  2|D| times in a row but changing just the bounds on a variable.

    This is ok (I mean, it works), but I now I would like to do just, say, 30 simple iterations each time -cplex.setParam(IloCplex::ItLim,30)- because that is enough. The problem is that, since reoptimization begins where the previous one stopped, information is not accurate (because initial iterations are not feasible). What I would like to do is to reoptimize from the point where the original model M ends.

    My question is: is there any way to do it efficiently? Solutions I have already discarded because they are not efficient:
    1) Generating each time the whole set of constraints of M from scratch and use and advanced basis.
    2) Exporting model M before the loop, importing it each time I need to reoptimize (using and advanced basis).

    Any hint on this will be welcome.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: solving consecutive identical problems with different bounds

    Posted 06/02/09 11:16 AM

    Originally posted by: SystemAdmin


    [prubin said:]

    What about using IloCplex::getBasisStatuses to record the basis information after solving the first LP relaxation at each node, then using IloCplex::setBasisStatuses to reset that basis each time you modify the LP?  (I've never done this, but it sounds plausible.)

    /Paul
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: solving consecutive identical problems with different bounds

    Posted 06/02/09 11:16 AM

    Originally posted by: SystemAdmin


    [sergio.garcia said:]

    Thanks, Paul. Your suggestion did work!!

    Anyway, if you allow me, I have one further question (because I have found no answer in cplex handbooks...).

    The fact is that with setBasisStatuses, I can state the status for an array vector IloNumVarArray y, for example, and the set of constraints IloRange myconst, for example. But, in my case, I have too a bidimensional array IloNumVarArray2 z, wich is a type not accepted by setBasisStatuses. Is there anything that can be done to incorporate the information on z? Because, I think, if I provide the solver with this last piece of information, it will be better, won't it?

    Thanks once more for your help,
    Sergio.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: solving consecutive identical problems with different bounds

    Posted 06/02/09 11:16 AM

    Originally posted by: SystemAdmin


    [prubin said:]

    Each z[i] is an IloNumVarArray, right?  So you should be able to loop through the first dimension of z and call setBasisStatuses once for each z[i].

    /Paul

    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: solving consecutive identical problems with different bounds

    Posted 06/02/09 11:16 AM

    Originally posted by: SystemAdmin


    [sergio.garcia said:]

    That's something I already thought of. Unfortunately, the c++ compiles ok but it hangs as soon as it reachs the line where it gets the status from z[0].

    I've already submitted a support request to Ilog. Should I learn something new (or what I'm doing wrong), I will post it here.
    #CPLEXOptimizers
    #DecisionOptimization