BookmarkSubscribe
Choose Language Hide Translation Bar
David_Burnham
Super User

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:

10614_lpsolver.png

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

10613_lpsolver-2.PNG

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.

Comments
dsianita

Do you have another front-end that can handle more than 2 decision variables?

@dsianita it's not limited to 2 decision variables.  I just used 'x' and 'y' as a simple example.

 

 

Article Labels
Article Tags