
                  Queueing Theory Library
                        Version 1.1
                      Library ID 1494


This library contains most of the important equations for elementary
Queueing Theory, along with a menu-driven interface to access and
solve them.

The Queueing Theory Library is NOT public domain software. It is
copyright (c) 1994 by Stephen A. Thomas. You are free to use the
library for any purposes, however, provided,

1) You don't sell it. (If you distribute the library, you
   may charge a reasonable fee for materials, shipping, and
   handling. You must also include this copyright notice and
   license with all copies.)

If possible, I would also appreciate it if

2) You drop me a line (sat@eng.tridom.com) to let me know what
   you think. Constructive criticism is encouraged. Please let
   me know about any bugs or defects!


Installing the Queueing Theory Library
--------------------------------------

1. Download Q.LIB to your HOME directory in binary mode.
2. Press [VAR] ['] |Q.LIB| [ENTER] [ENTER] [RIGHT-SHIFT] [RCL]
   [LEFT-SHIFT] [SWAP] [LEFT-SHIFT] [PURGE] 0 [STO]
3. Turn off your HP48 and turn it back on again.


Using the Queueing Theory Library
---------------------------------

To access the library, press [LEFT-SHIFT] [LIBRARY] and search
through the menus for |QUEU|. Press that and you'll see a list
of library commands. |Q.ING| starts the library.

I hope everything from then on is pretty intuitive. Use the up
and down arrows to scroll through your list of choices. The
right arrow selects an item, and the left arrow backs up. The
status line at the bottom of the screen gives you more
information about the current selection.

Once you get far enough down into the menu structure, you'll
come to an equation. Instead of menu choices, you can scroll
through equation variables. Now the status line tells you
more about the selected variable. Enter values for the known
variables or guesses for the unknowns (using |INPUT|, left
arrow, or [ENTER]). Mark the known values (as opposed to your
guesses) by pressing the [+/-] key. Once your values are
entered in, press |SOLVE|.

A few queueing systems in the library are too complex to be
solved with ordinary equation solvers. For those systems, the
menu looks slightly different. The first item in the menu will
be "---Parameters---" and it will be followed by several variables.
You must enter known values for all of these variables. There is
no need to mark them with [+/-]. The rest of the menu will have a list
of additional variables beginning with "---Results---". Any value you
enter here will be ignored when you solve the system. When you solve
one of these complex systems, be aware that the HP48 may take several
minutes to find the solution. (Note: most of these systems require
PROOT, see below.)

The library remembers your last location and returns to it
when you restart the library again. It stores this information
in the QLIB subdirectory of your home directory. When run the
first time, the library will create this directory.

Here are all the menu soft keys defined by the library. In
general, a key is only shown if its function is available.

             |ABOUT|  Show copyright and version info
             |BACK|   Go back one menu level
             |CLR|    Clear selected variable
[LEFT-SHIFT] |CLR|    Clear all variables for current system
             |HOME|   Jump to main menu
             |INPUT|  Enter value for selected variable
             |PICT|   Show picture illustrating system(s)
             |QUIT|   Exit library
             |SLCT|   Execute current selection
             |SOLVE|  Solve current system

In addition, the following keys may also be used.

 up (^)    scroll up
 shift ^   scroll to top of menu
 down (v)  scroll down
 shift v   scroll to bottom of menu
 right     Execute current selection / input selected variable
 left      Go back one level / exit library
 [ATTN]    Exit the library
 [DEL]     Clear selected variable
 [ENTER]   Execute current selection / input selected variable
 [OFF]     Power off calculator
 [PURGE]   Clear all variables for current system
 [+/-]     Toggle marking variable as known


Additional Commands
-------------------

In addition to the main |Q.ING| command, the library has 5 other
user commands.

 |ABOUTQ|  Show copyright and version info

 |GO.Q|    Jumps directly to a specific place in the library
             level 2: list of integers describing path to use
             level 1: list of 2 integers identifying offset of
                      of first menu item and current selection

 |B|       Erlang's Loss Formula
             level 2: number of servers (m)
             level 1: traffic intensity (a)

 |C|       Erlang's Delay Formula
             level 2: number of servers (m)
             level 1: traffic intensity (a)

 |Q.INIT|  Re-initialize library
        

Recommended Enhancements
------------------------

Although the Queueing Theory library works fine as a standalone
library, you can enhance it's functionality by adding a few other
programs and libraries to your HP48. 

Note: Since I don't have a HP48GX, some of the suggestions below
have not been tested. If anyone wishes to donate one to me, I'll
be happy to test and (if necessary) release a fixed version. ;^)

PROOT or equivalent - A few of the queueing system equations
  require solutions to polynomial equations. The equations find
  these roots by executing PROOT. If you have a 48GX, the
  PROOT command is built in. If (like me) you've only got a
  trusty 48SX, you can get your own PROOT (thanks to Bill
  Wickes) from Goodies Disk 7.
  
  If you have an equivalent program (such as POLYR on many Sparcom
  cards), simply create a program called PROOT in your home directory
  and have that program call your root finder. For example:

      HOME
      << POLYR >>
      'PROOT'
      STO

  If you don't have a PROOT, the library will not be able to
  solve those particular queueing system equations.

UPGROB - All of the pictures in the Queueing Theory library are compressed
  with Erik Bryntse's handy PGROB program. To view the pictures,
  you'll need UPGROB to decompress them. UPGROB is on Goodies Disk 6.
  If you don't have UPGROB, you won't be able to view the pictures.


Special Notes for HP48 Programmers
----------------------------------

  o  The interface code is completely separate from the actual
     Queueing Theory equations and programs. If you have your own
     set of equations, and you'd like to use this user interface,
     send me a note at sat@eng.tridom.com.

  o  Everything in the library is 100% User RPL. Unfortunately,
     that means it's not lightning fast. (Though I have gone to
     quite a lot of effort to make it as fast as possible.) If
     you're a System RPL or machine language guru and are interested
     in re-writing some key routines, let me know.


Sources
-------

  The equations and programs are from three primary sources. Kleinrock's
  _Queueing_Systems_, Allen's _Probability_Statistics_and_Queueing_Theory_,
  and my own _Queuing_Theory_ [a Mathcad Electronic Book]. As of version
  1.1, I've verified every equation and program with two sources where
  possible. Of course, this doesn't guarantee that the library is error-
  free. So please don't use this library to design nuclear power plants
  and such ;^)


History
-------

  1.1  Fixed equation for N in M/M/1/M systems
       Fixed intermediate functions 2 and 3 for M/M/m/K systems

