home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 118.lha / SIMPLICA.doc < prev    next >
Text File  |  1986-11-20  |  6KB  |  191 lines

  1.     
  2.                     HERMES' SIMPLICA   (Version 1.0)
  3.  
  4.                      Copyright (c) 1988 A. G. Kartsatos 
  5.  
  6.            (CIS = 76617,121, GEnie = XTH58515, PLink = HERMES)
  7.  
  8.                             March 31, 1988
  9.  
  10.                      ***  Shareware Program  ***
  11.  
  12.  
  13.      This is a program on the Simplex Method of linear programming.  It can
  14. be used to maximaze (or minimize) a linear function of N variables subject
  15. to M linear constraints in the form of inequalities.
  16.      This version supports problems with up to 10 variables and up to 8
  17. constraints.  
  18.      All variables are supposed to be nonnegative.
  19.   
  20.      ATTENTION:  The "TOPAZ 11" font should be in your current "fonts" 
  21. directory. If it is not there, you will get the program running with funny
  22. fonts, or even crashes!
  23.  
  24.      To use it from the CLI: Press "RUN SIMPLICA".
  25.      To use it from the Workbench: Click its icon (Rename it: SIMPLICA.info)
  26.      To exit, click into the "EXIT" gadget.
  27.  
  28.      In order to use Simplica, do the following:
  29.  
  30.      (1)  Insert the coefficients of the function to be evaluated in the 
  31.           "OBJECT." (= Objective Function) gadget.  See examples below.
  32.      
  33.      (2)  Insert the coefficients of the constraints in their respective
  34.           "CONSTR."gadgets.  There are 8 gadgets available for up to 8 linear 
  35.           constraints.  The inequality symbols should also be included. See 
  36.           examples below.
  37.  
  38.      (3)  Insert the number M of constraints in the "C" gadget. 
  39.           You must have 1 <= M <= 8.
  40.  
  41.      (4)  Insert the number N of variables in the "V" gadget.
  42.           You must have 2 <= N <= 10.
  43.  
  44.      (5)  Choose MAX or MIN by clicking into the MIN gadget.
  45.  
  46.      (6)  Click the "GO" gadget.
  47.  
  48.      The results are given in a separate window that opens in the middle
  49.      of your screen.
  50.  
  51.      REMEMBER:
  52.  
  53.      (I)    You have 250 spaces available for writing in the coefficients
  54.             of the objective function and/or the constraints.
  55.  
  56.      (II)   The program will catch several input errors involving the number
  57.             of coefficients and the numbers of constraints and variables.
  58.  
  59.      (III)  The program will detect cycling.  However, it will not handle
  60.             the cycling of "feasible" problems.  When cycling occurs, the
  61.             program will exit.
  62.  
  63.      (IV)   Do not use numbers with more than 11 digits before
  64.             the decimal point and/or 6 digits after the decimal point.
  65.  
  66.      (V)    Use mathematically sound expressions.  The author did not want
  67.             to fill the program with error statements.  This would slow the
  68.             program down considerably.
  69.  
  70.      (VI)   To clear ONE of the string gadgets, click into it and press
  71.             RIGHT-AMIGA-X.  Press "CLEAR" to clear ALL the string
  72.             gadgets.
  73.  
  74.      (VII)  Use spaces between any consecutive coefficients.  Also, use
  75.             spaces to separate the inequality symbols from the neigh-
  76.             boring numbers.
  77.  
  78.      (VIII) The result is always given with 6 decimal places.  The program
  79.             will prohibit the generation of numbers that are too large to
  80.             print and/or prone to carry prohibitive sizes of error.
  81.  
  82.      (IX)   CTRL-N gets you to the Workbench and CTRL-M gets you back to
  83.             SIMPLICA.  If you are planning to work on the Workbench while
  84.             SIMPLICA is running, make sure to run it with "RUN SIMPLICA"
  85.             and not just "SIMPLICA".
  86.  
  87.      (X)    This version does not support scientific notation.
  88.  
  89.      (XI)   Do not forget to put 0's in the place of missing constraint
  90.             variables.  For example, if the constraint is x1 - x3 <= 5., you
  91.             should input "1. 0. -1. <= 5." in the corresponding constraint
  92.             gadget.
  93.  
  94.      (XII)  All VARIABLES are supposed to be NONNEGATIVE.
  95.  
  96.  
  97.      HERE IS AN EXAMPLE:
  98.  
  99.      MINIMIZE the function 2x1 + 3x2 + x3 subject to:
  100.  
  101.      x1 + x2 +x3 <= 6
  102.  
  103.      x1 - x3 <= -4
  104.  
  105.      x2 + x3 <= 5
  106.                 
  107.      x1,x2,x3 >= 0
  108.  
  109.      IN THE "C" GADGET ENTER: 3
  110.  
  111.      IN THE "V" GADGET ENTER: 3
  112.  
  113.      IN THE "OBJECT." GADGET ENTER: 2. 3. 1.
  114.  
  115.      ENTER THE FOLLOWING 3 CONSTRAINTS IN THE 1ST 3 CONSTRAINT GADGETS
  116.      RESPECTIVELY:
  117.  
  118.  
  119.      1. 1. 1. <= 6.
  120.  
  121.      1. 0. -1. <= -4.
  122.  
  123.      0. 1. 1. <= 5.
  124.  
  125.  
  126.      RESULT: F = 4.000000, x1 = 0.000000, x2 = 0.000000, x3 = 4.000000.
  127.  
  128.      ANOTHER EXAMPLE:
  129.  
  130.      MAXIMIZE the function 3x1 - 4x2 + 5x3 + x4 subject to:
  131.  
  132.      -3x1 - 2x2 + 6x3 - 9x4 >= 0
  133.  
  134.      2x1 + 4x2 + 8x3 - 5x4 >= -3
  135.  
  136.      3x1 - x2 + 2x3 + 4x4 <= 15
  137.                 
  138.      x1,x2,x3,x4 >= 0
  139.  
  140.      CLICK THE MIN GADGET TO GET MAX
  141.  
  142.      IN THE "C" GADGET ENTER: 3
  143.  
  144.      IN THE "V" GADGET ENTER: 4
  145.  
  146.      IN THE "OBJECT." GADGET ENTER: 3. -4. 5. 1.
  147.  
  148.      ENTER THE FOLLOWING 3 CONSTRAINT COEFFICIENTS GROUPS IN THE 1ST 3 
  149.      CONSTRAINT GADGETS RESPECTIVELY:
  150.  
  151.  
  152.      -3. -2. 6. -9. >= 0.
  153.  
  154.       2. 4. 8. -5. >= -3.
  155.  
  156.       3. -1. 2. 4. <= 15.
  157.  
  158.  
  159.      RESULT: F = 37.500000, x1 = 0.000000, x2 = 7.500000, x3 = 0.000000
  160.                             
  161.                             x4 = 0.000000
  162.        
  163.    
  164.                              ***  <<<-->>>  ***
  165.  
  166.      This is a SHAREWARE copyrighted program.  If you find it useful, 
  167. please send $15.00 to:
  168.                
  169.                 A. G. Kartsatos   (= HERMES = SOULI)
  170.                 8524 Caladesi Island Drive
  171.                 Tampa, FL 33637
  172.                 (Telephone: 813-988-2146)
  173.  
  174.      With this contribution you will receive more programs written by the
  175. author.
  176.      FOR SUPPORT, call HERMES BBS in Tampa, FL.  A bulletin board with 1300
  177. files online and a healthy message base. 
  178.  
  179.                 HERMES BBS Telephone: 813-985-7624.
  180.  
  181.      NOTE:  The author will configure your copy of SIMPLICA so that it can
  182. afford larger numbers of constraints and variables.
  183.  
  184.      Feel free to distribute this program, with the doc intact, to any
  185. bulletin boards and other non-profit establishments in the US and abroad.
  186.      These include PLink, Compuserve, GEnie, Delphi, etc.
  187.      The inclusion of this program, or any part of it, in any form in a 
  188. commercial package, or its use for commercial purposes, requires the 
  189. written permission of the author.
  190.      
  191.