<br><font size=2 face="sans-serif">Kish,</font>
<br>
<br><font size=2 face="sans-serif">It sounds as if you are using presolve
rather than CglPreProcess. &nbsp;This could give wrong results as you describe.</font>
<br>
<br><font size=2 face="sans-serif">Look at Cbc/examples/sample2.cpp and
try with PREPROCESS defined to 1 or 2 to see two ways of using CglPreProcess.</font>
<br>
<br><font size=2 face="sans-serif">As to your questions.</font>
<br>
<br><font size=2 face="sans-serif">1) &nbsp;The solver can in some circumstances
not have an integer solution - bestSolution is what is needed but it must
go through post processing.</font>
<br><font size=2 face="sans-serif">2) The result should be correct for
problem with all integer variables fixed to correct values.</font>
<br>
<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>Kish Shen &lt;kisshen@cisco.com&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: cbc-bounces@list.coin-or.org</font>
<p><font size=1 face="sans-serif">10/19/2007 12:03 PM</font>
<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">cbc@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">[Cbc] getting solution to original problem
from Cbc/Clp</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>Hi,<br>
<br>
I am using CBC with CLP as the linear solver. CLP is accessed via OSI <br>
i.e. OsiClpSolverInterface), but CBC is accessed directly, instead of <br>
via OSI.<br>
<br>
I have been obtaining the solution state for MIP problems via the OSI <br>
calls, e.g. getColSolution(), getRowPrice(), etc.. One of our users <br>
reported that some of the solution is incorrect, e.g. variables that <br>
should be integers are not, and some constraints are violated.<br>
<br>
I suspected that this is because the OSI calls are via <br>
OsiClpSolverInterface, and so I am obtaining the state from the most <br>
recent LP relaxation, rather than the most recent MIP solution. I <br>
therefore changed the code to obtain the solution state via Cbc calls,<br>
for example, bestSolution() of CbcModel instead of getColSolution().<br>
<br>
Unfortunately, in this case, the number of columnssiz in the problem <br>
seems to be much smaller: in one example, the original problem had 945
<br>
columns, and the MIP solution of the problem has only &nbsp;205 columns.
I <br>
assume this is because presolve reduced the problem, and bestSolution()
<br>
returns the solution for the presolved matrix.<br>
<br>
Questions:<br>
<br>
1) Am I correct that OSIClpSolverInterface's methods, such as <br>
getColSolution(), is returning the state from the LP relaxation, rather
<br>
than the MIP solution? [If not, then there is something wrong with the
<br>
MIP solution produced]<br>
<br>
2) How can I obtain the MIP solution state (solution values, row price,
<br>
row activity, reduced cost [and basis status for the LP relaxation that
<br>
produced the MIP solution, if this is available], for the original <br>
problem (and not the presolved problem)?<br>
<br>
Thanks in advance for any help/information!<br>
<br>
Cheers,<br>
<br>
Kish Shen<br>
_______________________________________________<br>
Cbc mailing list<br>
Cbc@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/cbc<br>
</font></tt>
<br>