[Coin-lpsolver] Re: [Coin-discuss] sbb/resolve a MIP?

John J Forrest jjforre at us.ibm.com
Wed Jun 9 15:24:47 EDT 2004


If you modify SbbCompareUser.hpp as used by Sbb/Samples/sample2.cpp you 
can do most of what you want.

You may wish to split SbbCompareUser.hpp into .hpp and .cpp if it gets 
complex.

You can do most of what you want in SbbCompareUser::newSolution (around 
line 60 os SbbCompareUser.hpp)

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.
b) To have two maximum seconds just set the "hard" one as the normal one 
and then in newSolution.

   if(model->getSolutionCount()==1)
      model->setDblParam(SbbMaximumSeconds,newValue)

Sbb will now stop when ppuTime > newValue + startTime_ so if you want to 
stop after another 100 seconds newValue would be
CoinCpuTime()-startTime_+100.0 

c) to change parameters just change them e.g. model->setPrintFrequency(50) 
- obviously not all are safe.

d) to get best solution

const double * solution = model->bestSolution();

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.

I hope that gives you some ideas.

John Forrest



"Tuomo Takkula" <tuomo.takkula at inform-ac.com> 
Sent by: coin-discuss-admin at www-124.southbury.usf.ibm.com
06/09/2004 02:45 PM
Please respond to
coin-discuss


To
coin-discuss at www-124.southbury.usf.ibm.com
cc
tuomo Takkula <tuomo.takkula at inform-ac.com>
Subject
Re: [Coin-discuss] sbb/resolve a MIP?






On 9 Jun 2004 at 14:19, John J Forrest wrote:

> 
> 
> I think it would need a major re-write of Sbb. On the other hand it
> would be fairly easy to provide callbacks which might allow more
> flexibility along the lines of ClpEventHandler. One could collect
> maximum nodes, solutions, seconds etc into SbbEventHandler and then
> let the user derive a class from this which could do whatever is
> wanted and then reset the maximum value. 
> 
> If you can describe what you want to do or send me something I can see
> how much work it would be. 

Simply speaking, I'd like to have some way to tell the brand-and-
bound solver to run until it finds the first feasible solution, and 
then for a specified time more. 

Additional nice-to-have features could be:

* besides the "soft" time limit mentioned above, some "hard" time 
limit for when to abort for good even if no feasible solution was 
found

* at the callback to have the possibility to fix some variables 
before the solver is resumed

* at the callback to have the possibility to change some parameters 
that would affect the branch-and-bound solver "from now on" (I've got 
no clue how realistic this is) and resume

* access to the best solution so far at callback.
> 
> John Forrest 
> 
> If you can send me 
> 
[somehow the rest of this never arrived at me]


                 Best regards and thanks for the quick answer
                 Tuomo Takkula

-- 
Tuomo Takkula, PhD
Inform GmbH      Pascalstr. 23      D-52076 Aachen
phone +49-2408-9456-368      fax +49-2408-9456-45
tuomo.takkula at inform-ac.com  www.inform-ac.com

_______________________________________________
Coin-discuss mailing list
Coin-discuss at www-124.ibm.com
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20040609/8be2c188/attachment.html>


More information about the Clp mailing list