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