<br><font size=2 face="sans-serif">Michal,</font>
<br>
<br><font size=2 face="sans-serif">The problem probably is that the value
of the best solution so far has been updated.</font>
<br>
<br><font size=2 face="sans-serif">However safest is to use saveReferenceSolver()
initially and &nbsp;then use</font>
<br><font size=2 face="sans-serif">resetToReferenceSolver() to reset bounds
and everything.</font>
<br>
<br><font size=2 face="sans-serif">John Forrest</font>
<br>
<br>
<br>
<table width=100%>
<tr>
<td><img src=cid:_1_0DF28AD40DF286EC0053EDC6852573E7>
<td width=100%>
<table width=100%>
<tr valign=top>
<td width=100%><font size=2 face="sans-serif"><b>[Cbc] problem with re-solving
a model</b></font></table>
<br>
<table width=100%>
<tr>
<td><font size=2 color=#e26200 face="sans-serif"><b>Michal Kaut </b></font>
<td><font size=2 color=#8f8f8f face="sans-serif">to:</font>
<td><font size=2 face="sans-serif">cbc</font>
<td>
<div align=right><font size=1 face="sans-serif">02/06/2008 05:14 AM</font></div></table>
<br>
<table width=100%>
<tr>
<td>
<table width=100%>
<tr>
<td><font size=2 color=#8f8f8f face="sans-serif">Sent by:</font>
<td width=100%><font size=2 color=#e26200 face="sans-serif"><b>cbc-bounces@list.coin-or.org</b></font></table>
<br>
<td>
<div align=right></div></table>
<br></table>
<br>
<br>
<hr>
<br>
<br>
<br><tt><font size=2>[Sorry for re-posting, but I sent it two days ago
with no effect...]<br>
<br>
Hello,<br>
<br>
I have encountered a rather strange problem (at least to me): I have an<br>
MIP model which I am solving repetitively with different bounds (both<br>
columns and rows). It works OK with Glpk (well, except for speed), but<br>
no so with Cbc.<br>
For some instances, the branchAndBound() method will fail to find the<br>
optimal solution, finding instead an infeasible one and finishing with:<br>
&quot;On closer inspection node is infeasible&quot;. The fact that there
indeed is<br>
an feasible (and thus optimal) solution can be verified in two ways:<br>
- Save an MPS file right before the solve. The MPS file than solves OK,<br>
also with Cbc. (I can even create a second OsiCbcSolverInterface object,<br>
load the MPS into it and it will solve without problems.)<br>
- Create a new OsiCbcSolverInterface object, copy the model from the<br>
first one using loadProblem (accessing the data using getMatrixByRow(),<br>
getColLower(), etc.) and then copy the integer status of the variables.<br>
Running branchAndBound() on this new object also solves the problem to<br>
optimality.<br>
<br>
So, maybe I need to reset some parameters/members of the<br>
OsiCbcSolverInterface object, in order to get the same solution as I<br>
would get by copying the model into a new object?<br>
Note: I have already noticed that the branchAndBound() method changes<br>
variable bounds, so I always save them before calling the method and<br>
re-set the bounds afterwards. Maybe there are more things I need to reset?<br>
<br>
Or would it be better/cleaner to have a &quot;base model&quot; and then
at each<br>
iteration, I would create a fresh copy, update the bounds, solve it and<br>
delete the model? If so, what is the fastest way of copying an<br>
OsiCbcSolverInterface object? (Speed really is an issue here, since I am<br>
solving a lot of these problems.)<br>
<br>
<br>
Thanks a lot in advance.<br>
<br>
Regards,<br>
Michal Kaut<br>
<br>
_______________________________________________<br>
Cbc mailing list<br>
Cbc@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/cbc<br>
</font></tt>
<br>