[Cgl] Re: [Coin-discuss] generateCpp()
John J Forrest
jjforre at us.ibm.com
Tue Oct 3 16:40:24 EDT 2006
fmargot at andrew.cmu.edu wrote on 10/03/2006 03:32:57 PM:
>
>
> On Mon, 2 Oct 2006, John J Forrest wrote:
>
> > Whom else!
> >
> > If a cut generator (or heuristic etc) is modified from its default
> > constructor and then this is called a series of lines of code is
output
> > which changes the default generator to the current state.
> >
>
> Except that there is some kind of key associated with the lines of code:
> I see lines starting with
>
> 0
> 3
> 4
The way it works is that just before going into CbcModel branch and cut
the stand-alone solver sees that -cpp was set (or cpp if interactive). It
goes through all generators, heuristics CbcModel and associated solver
asking them to write lines to file. Then it calls a bit of code called
generateCode (in CoinSolve.cpp). This goes through file several times -
first doing ones with 0, then 1 etc. Some levels may be skipped so if cpp
was just 1 then it does not put out commands where the generator has a
default value (i.e. it only puts out level 3 and not level 4). If you
want the default changes (so you can modify them ) then you up the cpp
value.
>
> What is the meaning of these keys? Is it possible to have a line
> starting with other numbers? What about 1 and 2?
0,3,5 and 8 always go out (cpp==0)
1 and 6 go out if cpp==1
2 4 and 7 go out if cpp>1
You can see what they were meant to be if you search for std::string
header in CoinSolve.cpp as those are the comments which go out in created
code.
>
> > I wrote it when feeling in need of light entertainment, however it has
a
> > serious purpose. If you use the stand-alone cbc (or any other solver)
> > then your commands may change the behavior of the cut generators. When
> > you like the result you add -cpp 1 (other numbers create more output)
and
> > lo and behold a driver is created which mimics those actions.
> >
>
> I add "-cpp 1" to what? Command line of cbc?
>
> Francois
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cgl/attachments/20061003/a72033d1/attachment.html
More information about the Cgl
mailing list