Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Concert technology (.Net) - Removing columns

  • 1.  Concert technology (.Net) - Removing columns

    Posted 12/16/13 06:45 PM

    Originally posted by: mamsom


    Hi, 

    I am writing a branch and price algorithm using concert technology in C#. I have two questions.

    1- I have defined the problem column-wise and in each node of branch and price tree, I need to remove some columns of problem.

    Do you know how can I do it? Apparently I should use "End" but I don't know what should be parameter of this method?

    2- How can I make a copy of a problem (all the model and ranges and columns)? I searched a lot and I found the following codes. But they don't work for me. In fact, "matrixEnum and matrixEnum.current and lp"  all have null value. Maybe this is because my problem is defined column-wise. 

        //cplex_orig: a Cplex object that is already defined.                                       
        IEnumerator matrixEnum = cplex_orig.GetLPMatrixEnumerator();                               
        matrixEnum.MoveNext();                                                                     
        ILPMatrix lp = (ILPMatrix)matrixEnum.Current;                                              
        CloneManager cm = new SimpleCloneManager(cplex_orig);                                      
        Cplex cplex = new Cplex();                                                                 
        IObjective obj = (IObjective)cplex_orig.GetObjective().MakeClone(cm);                      
        cplex.Add(obj);//Adding the objective function 
        int numRanges = lp.Ranges.Length;                                                                          
        for(int r=0;r<numRanges;r++)
        {                                                              
            IRange temp = (IRange)lp.Ranges[r].MakeClone(cm);                                          
            cplex.Add(temp);//Adding the individual constraints                                                                           
        }                                          

     

    Thanks.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Concert technology (.Net) - Removing columns

    Posted 01/17/14 02:29 PM

    Answer to 1: You cannot remove columns from a model that is currently being optimized.

    Answer to 2: I recently answered this question in another thread. Please search the Forum to find the answer.


    #CPLEXOptimizers
    #DecisionOptimization