[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Rima 0.05: Math Programming for Lua
- From: Gaspard Bucher <gaspard@...>
- Date: Mon, 28 Mar 2011 21:39:39 +0200
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)...
Cheers,
Gaspard
On Mon, Mar 28, 2011 at 5:14 AM, Geoff Leyland
<geoff_leyland@fastmail.fm> wrote:
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/
You can get the tarball from https://github.com/downloads/geoffleyland/rima/rima-latest.tar.gz
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