<br><font size=2 face="sans-serif">If you modify SbbCompareUser.hpp as
used by Sbb/Samples/sample2.cpp you can do most of what you want.</font>
<br>
<br><font size=2 face="sans-serif">You may wish to split SbbCompareUser.hpp
into .hpp and .cpp if it gets complex.</font>
<br>
<br><font size=2 face="sans-serif">You can do most of what you want in
SbbCompareUser::newSolution (around line 60 os SbbCompareUser.hpp)</font>
<br>
<br><font size=2 face="sans-serif">a) add double startTime_ to data of
SbbCompareUser.hpp and modify constructor to store CoinCpuTime() in it.
&nbsp;If this is start of job then it will effectively be zero so initially
you can skip that step.</font>
<br><font size=2 face="sans-serif">b) To have two maximum seconds just
set the &quot;hard&quot; one as the normal one and then in newSolution.</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;if(model-&gt;getSolutionCount()==1)</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; model-&gt;setDblParam(SbbMaximumSeconds,newValue)</font>
<br>
<br><font size=2 face="sans-serif">Sbb will now stop when ppuTime &gt;
newValue + startTime_ so if you want to stop after another 100 seconds
newValue would be</font>
<br><font size=2 face="sans-serif">CoinCpuTime()-startTime_+100.0 </font>
<br>
<br><font size=2 face="sans-serif">c) to change parameters just change
them e.g. model-&gt;setPrintFrequency(50) - obviously not all are safe.</font>
<br>
<br><font size=2 face="sans-serif">d) to get best solution</font>
<br>
<br><font size=2 face="sans-serif">const double * solution = model-&gt;bestSolution();</font>
<br>
<br><font size=2 face="sans-serif">To fix some variables is more difficult.
&nbsp;One way would be to write a cut generator which would either do nothing
or fix the variables you wanted fixed. &nbsp;If people think that would
be useful I could easily write a CglUserCut.cpp.</font>
<br>
<br><font size=2 face="sans-serif">I hope that gives you some ideas.</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>&quot;Tuomo Takkula&quot;
&lt;tuomo.takkula@inform-ac.com&gt;</b> </font>
<br><font size=1 face="sans-serif">Sent by: coin-discuss-admin@www-124.southbury.usf.ibm.com</font>
<p><font size=1 face="sans-serif">06/09/2004 02:45 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
coin-discuss</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">coin-discuss@www-124.southbury.usf.ibm.com</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top><font size=1 face="sans-serif">tuomo Takkula &lt;tuomo.takkula@inform-ac.com&gt;</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">Re: [Coin-discuss] sbb/resolve
a MIP?</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>On 9 Jun 2004 at 14:19, John J Forrest wrote:<br>
<br>
&gt; <br>
&gt; <br>
&gt; I think it would need a major re-write of Sbb. On the other hand it<br>
&gt; would be fairly easy to provide callbacks which might allow more<br>
&gt; flexibility along the lines of ClpEventHandler. One could collect<br>
&gt; maximum nodes, solutions, seconds etc into SbbEventHandler and then<br>
&gt; let the user derive a class from this which could do whatever is<br>
&gt; wanted and then reset the maximum value. <br>
&gt; <br>
&gt; If you can describe what you want to do or send me something I can
see<br>
&gt; how much work it would be. <br>
<br>
Simply speaking, I'd like to have some way to tell the brand-and-<br>
bound solver to run until it finds the first feasible solution, and <br>
then for a specified time more. <br>
<br>
Additional nice-to-have features could be:<br>
<br>
* besides the &quot;soft&quot; time limit mentioned above, some &quot;hard&quot;
time <br>
limit for when to abort for good even if no feasible solution was <br>
found<br>
<br>
* at the callback to have the possibility to fix some variables <br>
before the solver is resumed<br>
<br>
* at the callback to have the possibility to change some parameters <br>
that would affect the branch-and-bound solver &quot;from now on&quot; (I've
got <br>
no clue how realistic this is) and resume<br>
<br>
* access to the best solution so far at callback.<br>
&gt; <br>
&gt; John Forrest <br>
&gt; <br>
&gt; If you can send me <br>
&gt; <br>
[somehow the rest of this never arrived at me]<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
Best regards and thanks for the quick answer<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
Tuomo Takkula<br>
<br>
-- <br>
Tuomo Takkula, PhD<br>
Inform GmbH &nbsp; &nbsp; &nbsp;Pascalstr. 23 &nbsp; &nbsp; &nbsp;D-52076
Aachen<br>
phone +49-2408-9456-368 &nbsp; &nbsp; &nbsp;fax +49-2408-9456-45<br>
tuomo.takkula@inform-ac.com &nbsp;www.inform-ac.com<br>
<br>
_______________________________________________<br>
Coin-discuss mailing list<br>
Coin-discuss@www-124.ibm.com<br>
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss<br>
</tt></font>
<br>