[Cbc] wrapper to create matrix via variables/constraints (not rows/columns)

Mario Souto mariohsouto at gmail.com
Fri Jan 29 08:33:39 EST 2016


Hi Felix,

If you are familiar with the Python language, the PuLP (
https://pythonhosted.org/PuLP/index.html) package does exactly that. After
modeling the problem in a more natural fashion, very similar to the one you
describe in the Gurobi API, you can either call CBC from Python or use it
to write a file that describes the problem. You can write the problem as a
.mps or a .lp, both formats are compatible with CBC.

Another option is JuMP (https://jump.readthedocs.org/en/latest/), a very
similar package for the Julia language.

Cheers,
Mario Souto.

2016-01-29 0:30 GMT-02:00 Stefan Vigerske <stefan at math.hu-berlin.de>:

> Hi,
>
> there are FlopC++ (https://projects.coin-or.org/FlopC++) and Rehearse (
> https://projects.coin-or.org/Rehearse) that should let you do something
> like that.
> FlopC++ is no longer developed, but might still be working.
>
> Stefan
>
>
> On 01/28/2016 07:50 PM, Felix Brandt wrote:
>
>> Dear all,
>>
>> I'm looking for a way to describe the constraints of a CBC model in a
>> more natural way than by using row/column indices. Gurobi has a simple
>> API where vars and constraints can be specified directly, looking like
>> the following:
>>
>> Model model;
>> Variable var1 = model.addVar();
>> Variable var2 = model.addVar();
>> model.addConstr (2 * var1 + var2 <= 5);
>>
>> I wonder if something similar exists for CBC (maybe in other CoinOR
>> projects)? I searched the web and this ML but found nothing so far.
>> Maybe I'm just using the wrong keywords.
>> Technically, this should not be that hard as the objects can just be
>> wrappers for the matrix indices and the matrix can be rendered after all
>> constraints have been added. So, before I reinvent the wheel I thought I
>> better ask here ;) Thanks!
>>
>> Cheers,
>> Felix
>>
>>
>>
>> _______________________________________________
>> Cbc mailing list
>> Cbc at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/cbc
>>
>>
>
> --
> http://www.gams.com/~stefan
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20160129/29c339e5/attachment-0001.html>


More information about the Cbc mailing list