[Coin-discuss] Rima 0.03: Math Modelling for Lua

Geoff Leyland geoff_leyland at fastmail.fm
Sun Feb 21 23:27:07 EST 2010


Hi,

I'm happy to announce version 0.03 of Rima, a symbolic math modelling package for Lua[1] binding to CLP, CBC and lpsolve.

Rima has a number of nice features:

- unlike most of the bindings to procedural languages I'm aware of (I'm happy to be corrected here), models are symbolic and functional rather than imperative
- Rima allows very rich interaction with data structures - dynamic objects and duck typing for math modelling
- models are very easily encapsulated and extended
- there's strong and flexible separation between models and data.  All data is late bound, and functions and expressions are just data
- there's just a sniff of a hint of a start of a system for composing models from parts

New is this version is a better syntax for array assignments:

a.b[{i=I}].c[{j=J}].value = i^2 + j

or

assignment.meet_demand[{s=stores}] = rima.C(rima.sum{p=plants}(flow[p][s]), "==", s.demand)

and that constraints are now part of the same namespace as all other problem data, meaning problems are more modular, and that you can structure and name constraints as you wish.

To get an idea of what I'm on about, it's probably best to have a look at http://www.incremental.co.nz/projects/rima/knapsack.html

Documentation starts at http://www.incremental.co.nz/projects/lua.html , development is hosted on google code athttp://code.google.com/p/rima/ , and you can get the tarball from http://rima.googlecode.com/files/rima-0.02.tar.gz

Any feedback would be much appreciated, and if there's interest, I'll start doing what's needed to submit rima to COIN.

Cheers,
Geoff

[1] http://www.lua.org





More information about the Coin-discuss mailing list