lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi Geoff !

Your project looks amazing. I might say something stupid here, so please don't shout. From my understanding, the constraints used in the models are like walls through which one may never pass. Is there a way to do AI with your tool by moving parts of the constraints into the objective and by using statistical models ? Or is this a totally different domain (the mathematical world of symbols versus the muddy waters of statistics) ?

I will definitely bookmark your project and try to use it in some life simulations (constraints as physics, objective as energy minimization)...



On Mon, Mar 28, 2011 at 5:14 AM, Geoff Leyland <> wrote:

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 and development is hosted at github
You can get the tarball from

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.