[Clp] Correct setup for individual pivots though OSI interface
John J Forrest
jjforre at us.ibm.com
Thu Jan 21 05:18:22 EST 2010
I wasn't looking closely enough.
The problem is that OsiClp sticks to Osi conventions and thinks that basis
information is in a CoinWarmStartBasis object. This is not set up by the
OsiClpSolverInterface constructor.
If you add
presolveModelOsi.setWarmStart(NULL);
after constructor, - that will move across the current ClpSimplex basis
John Forrest
From: Rune Møller Jensen <rmj at itu.dk>
To: <clp at list.coin-or.org>
Date: 01/21/2010 04:29 AM
Subject: Re: [Clp] Correct setup for individual pivots though OSI interface
Sent by: clp-bounces at list.coin-or.org
Thanks for the reply.
Yes, but the fact is actually that we do a less aggressive presolve the
second time with:
setDoDual(false);
setDoSingleton(false);
setDoDoubleton(false);
setDoTripleton(false);
setDoImpliedFree(false);
setDoDupcol(false);
setDoSingletonColumn(false);
This has to do with computing the non-linear objective efficiently for
variables in the presolved model. We would like to keep the most aggressive
presolve for initially solving the LP. My understanding is that after
model.initalSolve(), model has a feasible basis ready for a warm start.
Doing presolve on it maintains the optimal basis, so setting up the tableau
for pivoting should be an operation with low complexity. Thus, I would
expect running presolveModel->primal() or presolveModel->dual() basically
just would confirm optimality and return fast. But they don’t. They behave
as solving the problem from scratch with primal and dual infeasibilities.
Why does this happen? Is there any way for me to setup the tableau of
presolvedModel fast for pivoting?
Thanks a lot for any help on this!
Best,
Rune Møller Jensen
From: John J Forrest [mailto:jjforre at us.ibm.com]
Sent: Wednesday, January 20, 2010 7:11 PM
To: Rune Møller Jensen
Subject: Re: [Clp] Correct setup for individual pivots though OSI interface
model.initialSolve() is probably doing presolve, solving, postsolving and
then possibly doing primal to clean up any glitches.
why not omit model.initialSolve() and try presolvedModel->dual() instead.
That could easily be faster as you are just doing one presolve not two and
one solve not two
John Forrest
Inactive hide details for Rune Møller Jensen ---01/20/2010 10:58:02
AM---Hi,Rune Møller Jensen ---01/20/2010 10:58:02 AM---Hi,
From: Rune Møller Jensen <rmj at itu.dk>
To: <Clp at list.coin-or.org>
Date: 01/20/2010 10:58 AM
Subject: [Clp] Correct setup for individual pivots though OSI
interface
Sent by: clp-bounces at list.coin-or.org
Hi,
We first solve a Clp model to optimality
ClpSimplex model
… code loading problem
model.initalSolve()
We then want to make a couple of pivots to reduce a slightly changed
non-linear objective (which we compute on the side)
We first presolve
ClpPresolve presolveInfo;
ClpSimplex * presolvedModel = presolveInfo.presolvedModel(model);
Then setup an Osi interface to do individual pivots
OsiClpSolverInterface presolveModelOsi(presolvedModel);
presolveModelOsi.enableSimplexInterface(1);
And finally do individual pivots
while (running)
…
presolveModelOsi.pivot(colIn,colOut,outStatus);
…
Unfortunately pivots only seems to be carried out correctly if we resolve
the presolved model (e.g., by executing presolveModel.primal() before
making the Osi interface). The problem seems to be that not all necessary
status variables of the tableau are instantiated in presolveModel to do
individual pivots, but is there a less time consuming way to get the
tableau ready for individual pivots?
Any help on this is greatly appreciated.
Best,
Rune M. Jensen
_______________________________________________
Clp mailing list
Clp at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/clp
_______________________________________________
Clp mailing list
Clp at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/clp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20100121/7a441cd5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20100121/7a441cd5/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20100121/7a441cd5/attachment-0001.gif>
More information about the Clp
mailing list