[Cbc] [Coin-discuss] Testing CBC behavior

John Forrest john.forrest at fastercoin.com
Tue Feb 16 04:57:53 EST 2010


Even if ampl is not there some functions are defined at bottom of
Cbc_ampl.cpp.

For instance there is a dummy ampl_obj_precision().  If line 1506 was
changed from return 0 to return -2 then it would be simple to test if
ampl was there.  If you don't want to make that harmless change I think
you can start off filling a ampl_info structure with noise and then
calling readAmpl.  The dummy one will just return, while if ampl is
there the structure will be filled in correctly.

John Forrest


On Mon, 2010-02-15 at 11:24 -0700, Hart, William E wrote:
> I hadn't thought of using 'nm'.  That should work on Linux boxes.
> 
> --Bill
> 
> 
> > -----Original Message-----
> > From: Ashutosh Mahajan [mailto:asm4 at Lehigh.EDU]
> > Sent: Monday, February 15, 2010 10:55 AM
> > To: Hart, William E
> > Cc: coin-discuss at list.coin-or.org >> Discussions about open source
> > software for Operations Research
> > Subject: Re: [Coin-discuss] Testing CBC behavior
> > 
> > assuming cbc headers are installed, a way of knowing is to search for
> > the
> > following string in include/coin/config_cbc.h.
> > 
> > /* If defined, the Ampl Solver Library is available. */
> > #define COIN_HAS_ASL 1
> > 
> > or you can do:
> > nm --defined-only bin/cbc | grep fg_read_ASL
> > which is pretty ugly as well.
> > 
> > It would be nicer though, if there was a commandline option that
> > displays this
> > information.
> > --
> > regards
> > Ashutosh Mahajan
> > http://coral.ie.lehigh.edu/~asm4
> > 
> > On Mon, Feb 15, 2010 at 10:31:27AM -0700, Hart, William E wrote:
> > > Hello, all:
> > >
> > > I build option for CBC is to link with the AMPL Solver Library.  This
> > is
> > > nice, since it allows CBC to directly parse *.nl files.
> > >
> > > I'm developing a wrapper that calls CBC, and I'm wondering if there
> > is a way
> > > to test CBC to see if a cbc executable has been built with the AMPL
> > Solver
> > > Library.  I can try it out and see if it fails, but that's and
> > unpleasant
> > > alternative...
> > >
> > > --Bill
> > >
> > >
> > > _______________________________________________
> > > Coin-discuss mailing list
> > > Coin-discuss at list.coin-or.org
> > > http://list.coin-or.org/mailman/listinfo/coin-discuss
> 
> 
> 
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
> 




More information about the Cbc mailing list