coin-or / Clp

COIN-OR Linear Programming Solver
Other
392 stars 82 forks source link

Warm start best practice #271

Open andrea-cassioli-maersk opened 1 year ago

andrea-cassioli-maersk commented 1 year ago

Hi, we are refactoring an old code based on clp that implements a column-generation algorithm.

The current implementation

I am wondering if this is still the right way. I am looking at the ClpDualSimplex solver class and I am wondering whether under the hood it will performa warm start if I apply changes (basically adding columns) .

jjhforrest commented 1 year ago

Adding columns you would want ClpPrimalSimplex. Yes it will perform a warm start and the coding would be a bit simpler - but it would only be marginally faster. It may be worth looking at the example in Clp/examples - sprint.cpp. This is in many ways more complicated - but it may give you some ideas.

andrea-cassioli-maersk commented 1 year ago

Thanks @jjhforrest I will go for the ClpPrimalSimplex. For now simplicity is quite important over speed. The sprint.cpp example is a bit convoluted by I will look into it.

Btw, what is the meaning of the ifValuesPass parameter in ClpPrimalSimplex.primal()?