Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Extracting columns after column generation

    Posted 04/27/10 05:26 AM

    Originally posted by: SystemAdmin


    Dear all,
    I am trying to embed a column generation into a branch & bound tree to get a branch & price. Anyway, I have a problem !! I am not able to extract the final columns after the column generation is Done.
    Suppose we are working on the cutstock.cpp example given by ILOG. Can anybody help me to extract the columns at the end.

    -_-
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Extracting columns after column generation

    Posted 04/27/10 05:43 AM

    Originally posted by: SystemAdmin


    In the cutstock.cpp example the easiest way to get the columns would be to keep track of them. That is, create an instance 'addedVariables' of IloNumVarArray and replace
    Cut.add( IloNumVar(RollsUsed(1) + Fill(newPatt)) );
    

    by something like this
    IloNumVar newVar(RollsUsed(1) + Fill(newPatt));
    addedVariables.add(newVar);
    Cut.add(newVar);
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Extracting columns after column generation

    Posted 04/27/10 05:48 AM

    Originally posted by: SystemAdmin


    I don't know if this solution would work. Actually, who knows if CPLEX deletes some columns while optimizing the master because of some dominance relations or any other reason like a preprocessing for example. In addition, I am starting a master with a big number of columns generated by heuristics.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Extracting columns after column generation

    Posted 04/27/10 05:54 AM

    Originally posted by: SystemAdmin


    In Concert you will always see the original model. That is, no columns will "disappear" from you model due to presolve or whatever. The presolved model is retained in a different model instance that is not visible to the user and cannot be accessed by the user (if you want to do so you would have to use the callable library).
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Extracting columns after column generation

    Posted 04/27/10 06:00 AM

    Originally posted by: F.C.


    Thank you for the answer.

    In fact, the actual question is : "Given the IloNumVar variable, how can I extract the corresponding IloColumn ?"
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Extracting columns after column generation

    Posted 04/27/10 06:16 AM

    Originally posted by: SystemAdmin


    That is, for a given IloNumVar x you want to know in which constraints this variable appears and what the coefficient in that constraint is?
    AFAIK there is no easy way to do this. You would have to iterate of all constraints in the model and build that column yourself:
    for (IloModel::Iterator it(cplex.getModel()); it.ok; ++it) {
       IloExtrable e = *it;
       if (e.isConstraint()) {
          IloConstraint c = e.asConstraint();
          // Test if x is in c and find the coefficient
          ...
       }
    }
    

    In other words, it is probably a lot easier/faster to keep track of this yourself :-(
    #CPLEXOptimizers
    #DecisionOptimization