BookmarkSubscribeRSS Feed

Super User


Jul 13, 2011

LP Solver

Did you know that JMP has an LP Solver?  Linear programming (LP) is a technique for optimising a function subject to a set of linear constraints.  [See here for the Wiki description of linear programming].

The solver takes the form of a function called LPSolve.  This can be quite tricky to use, so I wrote a front-end to make the functionality more accessible:


The problem specification can also be loaded from a text file or entered using a text editor:


This is a project that has gone from work-in-progress to on-hold for sometime now so I'm posting the code in good faith on an as-is basis.  The code illustrates how to use the LPSolve function and also how to use pattern matching to parse elements of the problem specification.

Attached is a journal file that launches the script (the code is embedded in the run button) together with a sample text file containing a problem specification.  The front-end also has a couple of demo buttons that will load some content to illustrate how problems should be specified.

Article Labels
Article Tags