[Coin-lpsolver] CLP factorization info lost when using OsiClpSolverInterface::initialeSolve ?
John J Forrest
jjforre at us.ibm.com
Thu Dec 1 13:01:16 EST 2005
Torsten,
Apologies, I had another enquiry to do with presolve and because you said
presolve was on I got confused and put the changes in the wrong place.
Try again
John Forrest
"Torsten Fahle" <Torsten.Fahle at inform-ac.com>
Sent by: coin-lpsolver-bounces at list.coin-or.org
12/01/2005 07:53 AM
To
<coin-lpsolver at list.coin-or.org>
cc
Subject
Re: [Coin-lpsolver] CLP factorization info lost when using
OsiClpSolverInterface::initialeSolve ?
Hi,
Thanks for the fast reply, John.
I tried with today's tarball, but the code still uses its own factor for
factorization rather than the one I stored via the modelPtr.
Looking into the changes, ClpSolve::initialSolve() now has some extra code
that handels user defined factorization.
So I put some printf into ClpSolve::InitialSolve() and into
OsiClpSolverInterface::initialSolve().
When running the code, only OsiClpSolverInterface::initialSolve() is
called, but ClpSolve::InitialSolve() is not.
Thus your adaption is not considered.
When replacing the formular in OsiClpSolverInterface::initialSolve(), line
154 with my value, CLP uses this value.
Maybe this part has to be adapted as well?
In case the problem is due to a mistake in my usage of the OsiInterface,
here is my calling sequence:
OsiClpSolverInterface *_solver = new OsiClpSolverInterface();
<snip .. some code that generates the model in a CoinModel ..snip>
_solver->loadFromCoinModel(*model);
_solver->getModelPtr()->setFactorizationFrequency(1400);
_solver->initialSolve();
--> solver runs without considering my factorization value
Maybe you can help?
Thanks,
Torsten
---
Dr. Torsten Fahle
Geschäftsbereich Systeme Airport
INFORM GmbH, Pascalstr.23, 52076 Aachen, Germany
Tel. (+49) 24 08 - 94 56 24 FAX: -94 56 25
e-mail: Torsten.Fahle at inform-ac.com http://www.groundstar.de
>>> John J Forrest <jjforre at us.ibm.com> 30.11.2005 16:33 >>>
"feature" should be fixed now. Tell me if not.
John Forrest
"Torsten Fahle" <Torsten.Fahle at inform-ac.com>
Sent by: coin-lpsolver-bounces at list.coin-or.org
11/29/2005 11:00 AM
To
<coin-lpsolver at list.coin-or.org>
cc
Subject
[Coin-lpsolver] CLP factorization info lost when using
OsiClpSolverInterface::initialeSolve ?
Hi,
I'd like to increase the factorization limit of CLP through the
OsiClpSolverInterface.
As far as I can see from the documentation, a simple way to do so is
asking Osi for the model pointer
and than change the parameters in question like
MyOsiSolver->getModelPtr()->setFactorizationFrequency(1400);
When calling MyOsiSolver->initialSolve(), however, the parameter is lost
and instead Osi uses i
ts own factorization value (computed as 100 + numberOfRows/50)
In OsiSolverInterface.cpp the corresponding code reads as
void OsiClpSolverInterface::initialSolve()
{
...
(###)
// change from 200 (unless changed)
if (model2->factorization()->maximumPivots()==200)
model2->factorization()->maximumPivots(100+model2->numberRows()/50);
...
}
This looks like OSI is only allowed to change the value if it is still the
default value.
Having changed the value to 1400 I was surprised that OSI still reads a
value of 200 and consequently updates maxPivots.
So I checked the modelPtr_ which still holds the value 1400. And I checked
model2 which only holds 200.
model2 is a pointer to a presolved LP that was "stored" in a variable
called solver a few lines before.
And also solver only knows the default value of 200.
The problem seems to occur already in the first three lines of
initialSolve() where variable solver borrows the original model
void OsiClpSolverInterface::initialSolve()
{
ClpSimplex solver;
solver.borrowModel(*modelPtr_);
[...]
}
ClpSimplex::borrowModel() does only copy a selection of parameters. This
selection does not include factorization information as far as I can see.
So solver only knows the default value 200.
Since (###) explicitly checks for a change I assume it is a bug if solver
(and later on model2) do not know factorization info as well.
My questions:
Is it intended not to copy the entire information?
If so, is there a different way to set factorization information through
OSI ?
Thanks a lot.
Kind regards,
Torsten
---
Dr. Torsten Fahle
Geschäftsbereich Systeme Airport
INFORM GmbH, Pascalstr.23, 52076 Aachen, Germany
Tel. (+49) 24 08 - 94 56 24 FAX: -94 56 25
e-mail: Torsten.Fahle at inform-ac.com http://www.groundstar.de
_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-lpsolver
_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-lpsolver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20051201/9db59b4f/attachment.html>
More information about the Clp
mailing list