include "css/lp_menuimages.php"; ?> //include body statement and egwald banner include "../common/egwald_oban.php"; include "css/lp_menubar.php"; ?>
Linear Programming Linear programming example | Zero sum two person game | Solve your own l.p. problem | Simplex method algorithm I will use the following example from: Press, William H., et al. Numerical Recipes. Cambridge: Cambridge UP, 1989; to show, step by step, how the linear programming package can be used. (The algorithm is based on the one in the reference above.)
Maximize Z = X1 + X2 + 3*X3 - .5*X4
The first equation is the objective function. The next four equations are the constraints on the independent variables (X1, X2, X3, X4). Notice that the RHS numbers (to the right of <=, >=, or =) must all be positive.
We also need to introduce slack variables (Y1, Y2, Y3), one for each <= and >= constraint, so that the set of constraints are:
Notice the pattern of + and - signs for the <= and >= constraints. Not done yet! Now we create artificial variables (Z1,Z2,Z3,Z4) and rewrite the equations (including the objective function) as:
The above equations are in "restricted normal form". You must convert your linear programming problem to the above form. Then do the following steps.
Certain restrictions apply to the parameters: Once you fill in the table below, another table will be displayed where you will be able to put the data of your table. So you give your linear programming problem a name, and enter it with the parameters into the table. Then click 'submit parameters'. You can also solve a small linear programming problem with the Dual Simplex Method, using a user friendly interface. Return to Linear Programming entry page. |