<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.
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 "hard" one as the normal one and then in newSolution.</font>
<br>
<br><font size=2 face="sans-serif"> if(model->getSolutionCount()==1)</font>
<br><font size=2 face="sans-serif"> model->setDblParam(SbbMaximumSeconds,newValue)</font>
<br>
<br><font size=2 face="sans-serif">Sbb will now stop when ppuTime >
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->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->bestSolution();</font>
<br>
<br><font size=2 face="sans-serif">To fix some variables is more difficult.
One way would be to write a cut generator which would either do nothing
or fix the variables you wanted fixed. 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>"Tuomo Takkula"
<tuomo.takkula@inform-ac.com></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 <tuomo.takkula@inform-ac.com></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>
> <br>
> <br>
> I think it would need a major re-write of Sbb. On the other hand it<br>
> would be fairly easy to provide callbacks which might allow more<br>
> flexibility along the lines of ClpEventHandler. One could collect<br>
> maximum nodes, solutions, seconds etc into SbbEventHandler and then<br>
> let the user derive a class from this which could do whatever is<br>
> wanted and then reset the maximum value. <br>
> <br>
> If you can describe what you want to do or send me something I can
see<br>
> 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 "soft" time limit mentioned above, some "hard"
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 "from now on" (I've
got <br>
no clue how realistic this is) and resume<br>
<br>
* access to the best solution so far at callback.<br>
> <br>
> John Forrest <br>
> <br>
> If you can send me <br>
> <br>
[somehow the rest of this never arrived at me]<br>
<br>
<br>
Best regards and thanks for the quick answer<br>
Tuomo Takkula<br>
<br>
-- <br>
Tuomo Takkula, PhD<br>
Inform GmbH Pascalstr. 23 D-52076
Aachen<br>
phone +49-2408-9456-368 fax +49-2408-9456-45<br>
tuomo.takkula@inform-ac.com 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>