• Subject: [ANN] Rima 0.05: Math Programming for Lua
• From: Geoff Leyland <geoff_leyland@...>
• Date: Mon, 28 Mar 2011 16:14:23 +1300

```Hi,

I'm happy to announce version 0.05 of Rima, a package for symbolic math modelling and a binding to a number of optimization[1] libraries for math programming.

For the cave-dwellers, pedants and hijackers on the list :-) math programming problems involve minimising a function while respecting a number of constraints.  Math programs might be linear programming (LP) problems [2], integer programming (IP) problems [3] or nonlinear problems (NLP) [4].  The full domain of problems that math programs are used for is vast.  Personally I've used them for vehicle routing, plant throughput, electricity network planning, energy integration and various cost optimisation problems.

Rima's documentation starts at http://www.incremental.co.nz/projects/lua.html and development is hosted at github https://github.com/geoffleyland/rima/

If you're wanting to solve LPs, IPs or NLPs from Lua, then as far as I know, Rima's your only choice.  If you're not interested in LPs, then Rima's late-bound symbolic math is still worth a look.  At best it might be pretty nifty, and at the very least it's a horribly complicated way of solving a simple problem.

Changes since 0.04 are
- support for ipopt and consequently nonlinear problems
- symbolic differentiation
- compilation of expressions to Lua functions
- hosting moved to github

The symbolic differentiation and compilation are used to pass functions for evaluating objectives, constraints, gradients, and the hessian to ipopt.  It's quite cool: rima differentiates the symbolic expressions, writes them out as a lua string and then compiles the string.  With LuaJIT, you get native code for a symbolically differentiated function!

Any feedback would be much appreciated.

Cheers,
Geoff

[1] http://en.wikipedia.org/wiki/Optimization_(mathematics)
[2] http://en.wikipedia.org/wiki/Linear_programming
[3] http://en.wikipedia.org/wiki/Integer_programming
[4] http://en.wikipedia.org/wiki/Nonlinear_programming

```