<br><font size=2 face="sans-serif">Daniel,</font>
<br>
<br><font size=2 face="sans-serif">If I get time I will look at anomaly
in retval.</font>
<br>
<br><font size=2 face="sans-serif">On trying dual, primal I meant use solver2
not aSolver.</font>
<br>
<br><font size=2 face="sans-serif">John Forrest</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Daniel Stoinski <Daniel.Stoinski@nagler-company.com></b>
</font>
<br><font size=1 face="sans-serif">Sent by: coin-discuss-bounces@list.coin-or.org</font>
<p><font size=1 face="sans-serif">07/14/2006 01:57 AM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Discussions about open source software for Operations Research
<coin-discuss@list.coin-or.org></font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Discussions about open source software
for Operations Research <coin-discuss@list.coin-or.org></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [Coin-discuss] Quick checking, if
the problem is primal feasible</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>John,<br>
<br>
I'm really gracefull for your quick answer and the accurate axplanation.<br>
<br>
> I can not see any way of getting rid of the initialSolve. You
could<br>
> improve the time somewhat by -<br>
> a) using the presolved problem rather than the initial (and giving
hint to<br>
> initialSolve not to presolve).<br>
<br>
I tried your hint using intialSolve with the presolved model and trying
to <br>
pass a hint not to presolve.<br>
<br>
I changed the code now to<br>
<br>
static short isPrimalInfeasible(OsiClpSolverInterface& aSolver)<br>
{<br>
OsiSolverInterface *solver2;<br>
OsiPresolve pinfo;<br>
short
retval;<br>
<br>
solver2 = pinfo.presolvedModel(aSolver, 0.0);<br>
if (solver2 != NULL)<br>
{<br>
solver2->setHintParam(OsiDoPresolveInInitial, false, OsiHintTry);<br>
solver2->initialSolve();<br>
retval = solver2->isProvenPrimalInfeasible();<br>
delete solver2;<br>
}<br>
else<br>
retval = 1;<br>
return retval;<br>
}<br>
<br>
Now<br>
retval = solver2->isProvenPrimalInfeasible();<br>
says always, that the problem is primal feasible, even for guaranteed no
<br>
primal infeasbile problems.<br>
Calling aSolver.initialSolve() and returning <br>
aSolver.isProvenPrimalInfeasible() worked correctly.<br>
<br>
> b) making sure you have a zero objective function (probably - but
if dual<br>
> quicker then very small and random)<br>
> c) doing tests to see if primal or dual solves faster (see point b))<br>
<br>
Calling aSolver.getModelPtr()->primal() instead of aSolver.initialSolve()
<br>
and aSolver.isProvenPrimalInfeasible() was even (not significanlty) <br>
slower. The same for dual().<br>
<br>
Daniel<br>
_______________________________________________<br>
Coin-discuss mailing list<br>
Coin-discuss@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/coin-discuss<br>
</font></tt>
<br>