       Spreadsheet Optimizer  Version 1.1
       
       Copyright 1985, 1988, Ray Yeargin.   All rights reserved
       
       
       If you find this macro useful a donation of $10 would be appreciated.
       Please send all donations and questions to:
       
            Ray Yeargin
            Post Office box 5821
            Tallahassee, Florida
                      32314-5821
       
       
       I believe the information contained in this manual to be complete,
       correct, and up-to-date.  I also believe that the software described
       in this manual is reasonably free of logical defects.  However, I
       cannot and do not accept any responsibility for damages or losses,
       financial or otherwise, arising out of the use of this manual or the
       software described herein.
       
       
       overview
       
            Spreadsheet Optimizer is a program that automatically plays "what
       if" with your Lotus 1-2-3(tm) spreadsheet.  You tell it which cells to
       vary and within what limits and it will try tens of thousands of
       different configurations (depending on available time).  It will watch
       a result cell and, depending on a parameter assigned by you, will seek
       a specific value, the highest value, or the lowest value obtainable
       within the limits assigned.
       
       
       terminology
       
            The instructions for the use of this program differentiate
       between different classes of cells with (hopefully) appropriate
       terminology.  A list of terms along with explanations follows:
       
       source cell:  This refers to a cell
            into which different values
            will be substituted by
            Spreadsheet Optimizer.
            This is any cell that you
            would try different values
            in if you were manually
            playing "what if".
       
       minimum value, maximum value: These
            are the lower and upper limits
            that Spreadsheet Optimizer asks
            you to assign to each source
            cell.  The program will vary
            each source cell within its
            assigned limits.
       
       target value:  This is used only if
            the option to seek a specific
            value is invoked.  If you
            wanted the spreadsheet source
            cells manipulated to produce
            a figure of 10000 in the output
            cell, then 10000 would be
            assigned as the target value.
       
       output cell:  This is the cell that
	    Optimizer attempts to change
            by manipulating the source
            cells.  (This cell will be the
            direct or indirect result of
            calculations involving the
            source cells.)
       
       time to recalc:  This is the number
            of seconds required to
            recalculate your spreadsheet
            prior to loading Spreadsheet
            Optimizer.
       
       
       operation
       
            Because Spreadsheet Optimizer works best when allowed to do many
       thousands of recalculations, it is recommended that as much time as
       possible be allotted to optimize each spreadsheet.  Short runs (less
       than 8 hours) should be allowed only for a run using three or less
       variable source cells and with a spreadsheet that will recalculate in
       something less than ten seconds.  In general, always allow as much
       time as possible for each run (full weekends [64 hours] or more
       preferred) and vary only the cells that you feel are the most
       critical.  Also, the range (difference between the minimum and maximum
       for a particular source cell) should be restricted to realistic limits
       - going beyond usable limits only decreases the precision with which
       Spreadsheet Optimizer can examine more pertinent ranges.  In addition,
       you should use the fastest PC or PC compatible that you have access
       to.  The PC-AT or any of the modern 80286-based compatibles are
       excellent computers to use with this program.  Also, monochrome
       adapters are sometimes substantially faster than color adapters.
       
            Spreadsheet Optimizer uses many labels internally.  In an effort
       to prevent a conflict with existing label names in your spreadsheet,
       all of Spreadsheet Optimizer's internal labels begin with the letters
       "QQ".  In the event that your spreadsheet uses labels starting with
       "QQ", you can ensure that there will be no conflict by changing any
       such labels to start with other letters.
       
       
       narrative
       
            Prior to using this software, a backup copy should be made using
       either the DISKCOPY or the COPY command of the Disk Operating System
       (DOS).  The use of these commands is explained in the DOS manual.
       
            The following is a step-by-step guide to running Spreadsheet
       Optimizer with your spreadsheet.
       
            First you must determine the time required to recalculate your
       spreadsheet.  Using a stopwatch or a sweep second hand, measure the
       elapsed time between the pressing of the F9 key and reappearance of
       the READY light.  Spreadsheet Optimizer will use the results of this
       timing to determine the number of recalculations that can be performed
       in the available time.
       
        1)  Load your spreadsheet into Lotus 1-2-3(tm) and locate an unused
       block of cells into which to C(ombine) Optimizer.  This block of cells
       must be 6 columns wide and 75 rows deep.  (It is preferable to load it
       to the right of the rightmost used column, since it will reformat
       those six columns with a width of "12".)
       
        2)  Place the highlighted cursor on the upper left cell of the
       selected block.
       
	3)  Remove your data disk and put the disk containing Spreadsheet
       Optimizer into the same diskette drive.
       
        4)  Perform the following 1-2-3(tm) menu commands:
           /   F(ile)   C(ombine)   C(opy)
           E(ntire file)
       
        5)  Now 1-2-3(tm) will ask for the name    of the file.  Select
       "Optimize".
       
        6)  After Spreadsheet Optimizer loads, the cursor should be sitting
       on a cell containing the following:
       "_________________Spreadsheet Optimizer!____Version
       1.1__________________"
       Press the {pgdn} key once.  This will place the cursor on a cell that
       begins:
       {goto}\q~... (in case you somehow got lost, this cell is exactly 20
       rows below the top left corner cell [___Spreadsheet Optimizer!__...])
       
        7)  (This step names the program as the label "\Q".  If this name is
       currently in use by an existing macro, you must rename the existing
       macro as another label.)
          Now enter following:
            /   R(range)   N(ame)   C(reate)
            \Q   <return><return>
       
        8)  Since Spreadsheet Optimizer does change your spreadsheet in
       several ways, do not save the spreadsheet - at least not with with the
       original name.
       
        9)  Ensure that <scroll lock> is off.
       
        10)  You are now ready to begin.  To invoke Spreadsheet Optimizer,
       press the <alt> key, then, while still holding the <alt> key, press
       the "Q" key.  For the next few moments, your screen will flash and
       scroll about as Spreadsheet Optimizer formats the screen and names the
       cells which will be used for the run.
       
        11)  When all the movement stops, you should see "1)Increase,
       2)Decrease, 3)Seek Value?" at the top of your screen.  If you want the
       value of your output cell to increase, then type 1 <return>.    Of
       course, if you want to decrease the output cell, type 2 <return>.
       
        11.1)  This paragraph (11.1) refers only to the option "3)Seek
       Value".  To cause the output cell to seek a specific value, first type
       3 <return>.  Then you will be prompted for "Target Value?".  At this
       time, type the figure that you wish for the output cell to "seek",
       followed by <return>.
       
        12)  You will then be asked for the "Number of Source Cells? (1-6)".
       As the prompt indicates, a value of at least 1 and no greater than 6
       is required here.  This refers to the number of cells that you want
       Optimizer to vary in its search for the optimum set of values.  If you
       feel that you really need to vary more than 6 values, you should pick
       the cell or cells that are the least sensitive and vary them manually
       over several runs.  This program is limited to 6 source cells not
       because it is difficult to include more, but because currently
       available hardware is too slow to allow Spreadsheet Optimizer to
       consider enough values for a meaningful run - unless, of course, a
       couple of months of uninterrupted time is set aside for the run!
       
        13)  Next you will be asked for the "First Source Cell".  Respond by
       typing either the column/row coordinates or a name that you have
       assigned to a cell that you want the program to vary.
       

	14)  The program will then ask for "[1]Minimum Value?" and
       "[1]Maximum Value?"  (the [1] refers to the fact that this is the
       first source cell).  Type the lower and upper limits of the first
       source cell - following each with <return>, of course.
       
        15)  Next, the program asks for any additional source cells and their
       associated minimums and maximums.  Enter them in the same way that the
       first source cell was entered.
       
        16)  You will then be prompted for "Output Cell?".  Type the
       column/row coordinates or name of the result cell that Spreadsheet
       Optimizer will be monitoring.
       
        17)  Next you will be asked for the "Number of hours to run?".  Type
       in the number of uninterrupted hours that the program can use the
       computer followed by <return>.  For example, for a run from 5pm on
       Friday until 9am on Monday, you would type 64<return>.  (this value is
       later converted into seconds by the program).
       
        18)  The program will then ask for "Number of Seconds to recalc?".
       Respond by typing in the number of seconds that it takes 1-2-3 to
       recalculate the entire spreadsheet (on the same computer you are now
       using) and <return>.
       
        19)  Leave for the weekend.
       
            Spreadsheet Optimizer will calculate a few final parameters and
       then start to work on optimizing your spreadsheet.  When you return
       your spreadsheet should have the final figures from the run in the
       appropriate fields.  These figures will be in the "Best Set" column as
       well as the original source cells of the spreadsheet.  Do NOT save the
       spreadsheet in this form (or, for that matter, any spreadsheet that
       has been modified by Spreadsheet Optimizer).  Simply enter the result
       figures in the appropriate fields of the original, unmodified
       spreadsheet.


















