cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
LP Solver
David_Burnham
Super User (Alumni)

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.

 

 

FN

The profiler can optimize the desirability. Is this interface available as well? Would it solve NLP or MILP problems?

 

No the profiler interface isn't available as well - I assume you would just use the profiler natively if you have a desirability function that you want to optimise.  This was just an illustration of deploying the LPSOLVE function to solve classical types of LP problem articulated as an objective function and a set of linear constraints.  It wouldn't handle nonlinear or integer programming.

Raaed

great job

Recommended Articles