home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
118.lha
/
SIMPLICA.doc
< prev
next >
Wrap
Text File
|
1986-11-20
|
6KB
|
191 lines
HERMES' SIMPLICA (Version 1.0)
Copyright (c) 1988 A. G. Kartsatos
(CIS = 76617,121, GEnie = XTH58515, PLink = HERMES)
March 31, 1988
*** Shareware Program ***
This is a program on the Simplex Method of linear programming. It can
be used to maximaze (or minimize) a linear function of N variables subject
to M linear constraints in the form of inequalities.
This version supports problems with up to 10 variables and up to 8
constraints.
All variables are supposed to be nonnegative.
ATTENTION: The "TOPAZ 11" font should be in your current "fonts"
directory. If it is not there, you will get the program running with funny
fonts, or even crashes!
To use it from the CLI: Press "RUN SIMPLICA".
To use it from the Workbench: Click its icon (Rename it: SIMPLICA.info)
To exit, click into the "EXIT" gadget.
In order to use Simplica, do the following:
(1) Insert the coefficients of the function to be evaluated in the
"OBJECT." (= Objective Function) gadget. See examples below.
(2) Insert the coefficients of the constraints in their respective
"CONSTR."gadgets. There are 8 gadgets available for up to 8 linear
constraints. The inequality symbols should also be included. See
examples below.
(3) Insert the number M of constraints in the "C" gadget.
You must have 1 <= M <= 8.
(4) Insert the number N of variables in the "V" gadget.
You must have 2 <= N <= 10.
(5) Choose MAX or MIN by clicking into the MIN gadget.
(6) Click the "GO" gadget.
The results are given in a separate window that opens in the middle
of your screen.
REMEMBER:
(I) You have 250 spaces available for writing in the coefficients
of the objective function and/or the constraints.
(II) The program will catch several input errors involving the number
of coefficients and the numbers of constraints and variables.
(III) The program will detect cycling. However, it will not handle
the cycling of "feasible" problems. When cycling occurs, the
program will exit.
(IV) Do not use numbers with more than 11 digits before
the decimal point and/or 6 digits after the decimal point.
(V) Use mathematically sound expressions. The author did not want
to fill the program with error statements. This would slow the
program down considerably.
(VI) To clear ONE of the string gadgets, click into it and press
RIGHT-AMIGA-X. Press "CLEAR" to clear ALL the string
gadgets.
(VII) Use spaces between any consecutive coefficients. Also, use
spaces to separate the inequality symbols from the neigh-
boring numbers.
(VIII) The result is always given with 6 decimal places. The program
will prohibit the generation of numbers that are too large to
print and/or prone to carry prohibitive sizes of error.
(IX) CTRL-N gets you to the Workbench and CTRL-M gets you back to
SIMPLICA. If you are planning to work on the Workbench while
SIMPLICA is running, make sure to run it with "RUN SIMPLICA"
and not just "SIMPLICA".
(X) This version does not support scientific notation.
(XI) Do not forget to put 0's in the place of missing constraint
variables. For example, if the constraint is x1 - x3 <= 5., you
should input "1. 0. -1. <= 5." in the corresponding constraint
gadget.
(XII) All VARIABLES are supposed to be NONNEGATIVE.
HERE IS AN EXAMPLE:
MINIMIZE the function 2x1 + 3x2 + x3 subject to:
x1 + x2 +x3 <= 6
x1 - x3 <= -4
x2 + x3 <= 5
x1,x2,x3 >= 0
IN THE "C" GADGET ENTER: 3
IN THE "V" GADGET ENTER: 3
IN THE "OBJECT." GADGET ENTER: 2. 3. 1.
ENTER THE FOLLOWING 3 CONSTRAINTS IN THE 1ST 3 CONSTRAINT GADGETS
RESPECTIVELY:
1. 1. 1. <= 6.
1. 0. -1. <= -4.
0. 1. 1. <= 5.
RESULT: F = 4.000000, x1 = 0.000000, x2 = 0.000000, x3 = 4.000000.
ANOTHER EXAMPLE:
MAXIMIZE the function 3x1 - 4x2 + 5x3 + x4 subject to:
-3x1 - 2x2 + 6x3 - 9x4 >= 0
2x1 + 4x2 + 8x3 - 5x4 >= -3
3x1 - x2 + 2x3 + 4x4 <= 15
x1,x2,x3,x4 >= 0
CLICK THE MIN GADGET TO GET MAX
IN THE "C" GADGET ENTER: 3
IN THE "V" GADGET ENTER: 4
IN THE "OBJECT." GADGET ENTER: 3. -4. 5. 1.
ENTER THE FOLLOWING 3 CONSTRAINT COEFFICIENTS GROUPS IN THE 1ST 3
CONSTRAINT GADGETS RESPECTIVELY:
-3. -2. 6. -9. >= 0.
2. 4. 8. -5. >= -3.
3. -1. 2. 4. <= 15.
RESULT: F = 37.500000, x1 = 0.000000, x2 = 7.500000, x3 = 0.000000
x4 = 0.000000
*** <<<-->>> ***
This is a SHAREWARE copyrighted program. If you find it useful,
please send $15.00 to:
A. G. Kartsatos (= HERMES = SOULI)
8524 Caladesi Island Drive
Tampa, FL 33637
(Telephone: 813-988-2146)
With this contribution you will receive more programs written by the
author.
FOR SUPPORT, call HERMES BBS in Tampa, FL. A bulletin board with 1300
files online and a healthy message base.
HERMES BBS Telephone: 813-985-7624.
NOTE: The author will configure your copy of SIMPLICA so that it can
afford larger numbers of constraints and variables.
Feel free to distribute this program, with the doc intact, to any
bulletin boards and other non-profit establishments in the US and abroad.
These include PLink, Compuserve, GEnie, Delphi, etc.
The inclusion of this program, or any part of it, in any form in a
commercial package, or its use for commercial purposes, requires the
written permission of the author.