
Simple Simplex Solver
=====================
from Bruno Schfer (bup.schaefer@planet-interkom.de)
29.Sept.2000
 
This is a program to solve problems of LINEAR PROGRAMMING (LP) also called LINEAR OPTIMIZATION. It is a rough console program, which means that I have not checked all possibilities for LP problems. So you can use it as a SIMPLEX-module and change it for your needs or transform it that it fits in your application. In a next Version it will work with a GUI input-window.

How to use this Program ?

To see how it works run the program runs with the following example: 

EXAMPLE: 
A manufacturer wishes to produce 100 kg of an alloy which is 83% lead, 14% iron and 3% antmony. He has five available alloys with the following compositions and prices: 

Alloy #1: 90% lead, 5% iron, 5% antimony, price: 6.13 EURO 
Alloy #2: 80% lead, 5% iron, 15% antimony, price: 7.12 EURO 
Alloy #3: 95% lead, 2% iron, 3% antimony, price: 5.85 EURO 
Alloy #4: 70% lead, 30% iron, 0% antimony, price: 4.57 EURO 
Alloy #5: 30% lead, 70% iron, 0% antimony, price: 3.96 EURO 

How should he combine these alloys to get the desired product at minimum cost ? 

This problem results in the following system of equations: 

x1 + x2 + x3 + x4 + x5 = 100 
0.90x1 + 0.80x2 + 0.95x3 + 0.70x4 + 0.30x5 = 83 
0.05x1 + 0.05x2 + 0.02x3 + 0.30x4 + 0.70x5 = 14 
0.05x1 + 0.15x2 + 0.03x3 = 3 
6.13x1 + 7.12x2 + 5.85x3 + 4.57x4 + 3.96x5 = Z (min) 

Compare this with the matrix "SiMatrx()" at the beginning of the SIMPLEX program ! 

Now start the SIMPLEX program and then you will get the result of the problem: 
The manufacturer should take 10.43 kg of alloy #2, 47.83 kg of alloy #3 and 41.74 kg of alloy #4. 
He doesn't need alloy #1 and alloy #5. His costs are 544.83 EURO. 

If you want to use this program for other LP problems (your LP problem), load the program and change the "SiMatrx()" values. 


