[Cbc] Getting Started

Stefan Vigerske stefan at math.hu-berlin.de
Fri Aug 5 12:51:27 EDT 2011


Hi,

> Thanks Ian... that simple BAB sample makes a lot more sense!
>
> My problem now is that the objective (double obj[] = { 1.0, 1.0 };) represents a mathematical equation. My objective/evaluation function is external, it comes from inputting varying ranges of x0, x1 into a program and the program spits out a number. I want to maximize this number with constraints on x0 and x1.
>
> Is this possible with CBC?

No, CBC is for (mixed-integer) linear programs.
Have a look at Ipopt.

Stefan

>
>
>
> -----Original Message-----
> From: Iain Dunning [mailto:iaindunning at gmail.com]
> Sent: August-04-11 5:10 PM
> To: Alex Escott
> Cc: cbc at list.coin-or.org
> Subject: Re: [Cbc] Getting Started
>
> Hey,
> Try looking at https://projects.coin-or.org/Cbc/browser/trunk/Cbc/examples/simpleBAB.cpp
> and the other examples in that folder.
> Especially line 25 to line 42. There are some examples in the CLP repository too that are similar I think.
>
> Its pretty baffling at a first look, and I've personally never built a model in memory (although I think I'm going to try today!), but I think you'll be able to work it out from the examples.
> Oh and .MPS, like .LP, is a file format for describing the formulation of a linear programme.
> Good luck!
>
> Cheers,
> Iain
>
> On 5 August 2011 05:23, Alex Escott<AE at malaspina-labs.com>  wrote:
>>
>> Hi all, new to CBC and trying to get something simple (I think!) working. I have an objective function and set of parameters which is pretty small in comparison to the 1000s of params that I see people talking about.
>>
>> My params will be integer, floating point, or Boolean, and they don't have any constraints between them. I only have ranges for the values themselves. I have only 10-15 of these. They look something like:
>>
>> int     num1, where 0<= num1<= 20
>> float num2, where -1.0<= num2<= 1.0
>> bool num3, where num3 == 0 or 1 (true or false)
>>
>> I've spent the last day or two going through the code, docs and examples and am still wondering how to get started...
>>
>> 1. What class do I create for my solution? A CBCSolver?
>> 2. How are these .mps files created... are they a serialized state of the solver, or do I create one from scratch to start?
>> 3. How do I declare my params and their types/bounds and input them to the solver?
>> 4. How do I hook up my objective function?
>>
>> Any help is greatly appreciated, thanks a lot!
>>
>> -ake
>>
>>
>> _______________________________________________
>> Cbc mailing list
>> Cbc at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/cbc
>
>
>
> --
> Iain Dunning
> Email:    iaindunning at gmail.com
> Web:      www.iaindunning.com
> LinkedIn: nz.linkedin.com/in/iaindunning
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
>


-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan



More information about the Cbc mailing list