[Clp] Crash in ClpDualRowSteepest copy ctor

Sebastian Theophil stheophil at think-cell.com
Wed Oct 28 07:06:37 EDT 2009


Hi,


I'm trying to avoid the accumulation of rounding errors by repeatedly
solving the same solver object. I also want to avoid having to
reassemble the same constraint system over and over again. So I make a
copy of a previous solver, change constraints, resolve and throw the
copy away again. This seems to trigger some unexpected test cases:

- OsiClpSolverInterface copy ctor makes a copy of the ClpSimplex*
modelPtr_ 
- ClpSimplex copy ctor calls ClpSimplex::gutsOfCopy 
- which makes a copy of dualRowPivot_ and primalColumnPivot_

Both contain a copy to their parent ClpSimplex* that has previously been
set by ClpDualRowPivot::saveWeights

The ClpDualRowSteepest and ClpDualRowPivot copy ctors simply copy the
ClpSimplex* which may be okay in many circumstances but it is certainly
wrong when called from the ClpSimplex copy ctor. 

Is it safe to call 

  dualRowPivot_ = rhs.dualRowPivot_->clone(false);
  primalColumnPivot_ = rhs.primalColumnPivot_->clone(false);


in ClpSimplex::gutsOfCopy and thus prevent any data from being copied? 

Thanks
Sebastian

--
Sebastian Theophil . stheophil at think-cell.com
Software Engineer
 
think-cell Software GmbH . Invalidenstr. 34 . 10115 Berlin, Germany 
http://www.think-cell.com . phone +49-30-666473-10 . toll-free (US) +1-800-891-8091
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl . Amtsgericht Berlin-Charlottenburg, HRB 85229





More information about the Clp mailing list