ORMS Today
April 1999

MICRO SAINT


Ease of use, additional functionality highlight discrete-event simulation-modeling tool

By Andreas T. Ernst, Mohan Krishnamoorthy, Helen Nott and David Sier

Simulation models provide a method for analyzing and understanding the behavior of complex, real-world systems. A simulation model attempts to mimic the behavior of large and complex systems as they evolve over time. The model takes the form of a set of assumptions about the operation of the system. These assumptions are usually expressed in the model as mathematical or logical relationships between the principal objects in the system.

Solutions to the system may be obtained by carrying out many experiments with the simulation model, each over a sufficiently long period of time and each with different parameter values. Each run generates a set of representative samples of the principal measures of performance of the system. Hypotheses on the behavior of the system are then made based on these estimates. Randomness in the real system is reproduced by using appropriate random distributions for generating events in the simulation, while still maintaining the deterministic and logical relationships between objects in it.

Micro Saint version 3.0 is one of the commercially available simulation packages. In this review, we highlight the principal feature of Micro Saint and assess its strengths and weaknesses. We review the software from the point of view of three prospective users: (1) those who use heavy-duty, industrial-strength simulation models; (2) users who require a simulation modeling tool for analyzing small-to-medium sized models; and (3) those who require a simulation modeling tool for educational purposes.

Overview


Micro Saint version 3.0 is a PC-based discrete-event simulation-modeling tool that can be used for building simulation models. It was developed and is marketed by Micro Analysis & Design Inc. The software is advertised as a "quick and effective simulation that enables you to evaluate the simplest to the most complex processes." The package consists of several modules. The basic software allows users to build and execute simulation models. It also contains some features for analyzing results that are gathered during the simulation. A module called ActionView, used for producing simple animations, and an optimization module called OptQuest, used to selectively fine tune simulation parameters, are included with Micro Saint.

Micro Saint is well presented and follows the look and feel of Windows products. The software is driven principally through mouse interactions, although some keyboard shortcuts are available.

System Requirements


Micro Saint runs under Microsoft Windows 95, Windows 98 or Windows NT 4.0; we reviewed it under Windows NT. It requires a minimum of 16 MB RAM and 25 MB disk space. The software is protected by a hardware key, which must be installed in the parallel port before using it.

Installation


Micro Saint is a standard Windows product, and installation is straightforward. The software is supplied on a CD-ROM, and we followed the installation "wizard" to get Micro Saint up and running without any difficulties. The wizard follows the Windows conventions for file locations. Once installed, Micro Saint can be launched from the Start menu.

The software uses the standard multiple document interface that we have come to expect from Windows products. It allows users to look at different aspects of the same simulation model in different windows; it also allows multiple models to be simultaneously open.

Creating Simulations


A simulation model can be thought of as a network of tasks. So the first step in building a Micro Saint simulation model is to create a flowchart of the system. This flowchart specifies the basic tasks in the network and how they interact. The flowchart also provides the logic for the movement of entities through the system. Once the user has conceptualized the simulation model in terms of a flow chart, it is relatively straightforward to create simulation experiments using Micro Saint. In this network, tasks can be drawn and connected using a set of simple tools provided by the software, as shown in Figure 1.

figure

Figure 1: Creating a simulation model in Micro Saint.

A Micro Saint simulation model consists of tasks, each of which can have:
  • A release condition when the task (server) becomes available;

  • A beginning effect that is to be executed when the release condition is true;

  • A probability distribution for the duration of the task;

  • A launch effect intended mainly for animation, which is executed after calculating the duration of the task; and

  • An ending effect to be executed at the completion of the task.

Each of the above (including the mean and standard deviation of the distribution of task durations) may consist of a series of statements or expressions. A task may be preceded by a queue of entities waiting for the release condition; and a decision point, from which the entity is routed to the next task, may follow it. Alternatively, multiple copies of the entity may be sent to different tasks simultaneously, based on some decision criteria.

Queues may also have statements attached to them. These statements are executed when an entity enters or leaves the queue. Furthermore, the queue may be sorted in a FIFO, a LIFO or some user prioritized order. This is adequate for most simulations. In some cases, it is necessary for servers to pick entities from a queue depending on a match of some attributes. Indeed, in some cases it is more natural to think of servers of the queue in this manner. This can be emulated in Micro Saint, but with a lot of additional code. Apart from tasks, Micro Saint allows "scenario events" to be defined. These consist of a series of expressions to be performed at specific times in the simulation and possibly repeating at regular intervals.

A nice feature is the ability to select and edit all objects (such as tasks, variables and functions) by double clicking on them in the appropriate window. This brings up a dialogue box containing the object's properties. Each object has a field in which its purpose and other comments may be documented. This is an effective way to encourage good coding practices.

Micro Saint comes with a well-written manual. It should be easy for most users, even those with little exposure to computers and simulations, to understand it. The software comes bundled with a relatively large number of example simulation models. A nice feature of the manual is that it contains detailed descriptions of a selection of these example models. This includes a step-by-step guide on how to build the models from scratch, as well as some discussion of the modeling decisions made. It includes details on how to analyze the results of running the simulations. Apart from the printed manual, online help is also available. While the electronic information in the online help is not as detailed as the printed manual, it does cover some additional features.

The Micro Saint Simulation Language


The language constructs of the Micro Saint modeling language are primitive. Conditional execution is provided by an "if-then-else" statement and looping by a "while" statement. All other statements fall into the category of assignment statements or expressions, which may contain simple function calls.

Multiple statements can be combined into a single statement by separating them with the comma operator. This aspect of the modeling language could be improved by using standard programming language practices in which groups of statements can be delimited to form blocks of code which can be of arbitrary length and can be nested.

Micro Saint's language contains five data types: integers, reals, arrays of integers, arrays of reals and resources. Resources are a variable type to be used for tracking the amount of a limited resource that is being used. A second variable is automatically generated when defining a resource variable. This second variable contains the total number of resources. The main purpose for defining variables as resources rather than variable types is to allow easy data collection on the resource usage.

Arrays are limited to a maximum of three dimensions. While this would be sufficient for most circumstances, it should be very simple to extend the language to allow an arbitrary number of array dimensions. Note that there are no string or character data types, making it impossible to generate messages or deal with non-numeric data. Another useful addition to the set of data types would be records allowing a number of fields to be grouped. All variables are global and need to be defined in a separate window. While this can be tedious, it allows typing errors to be trapped. Scalar variables, but not arrays, can be initialized with a constant value.

The ability to define functions is a nice feature. This is, however, marred by the absence of a mechanism for passing arguments. Since there are no local variables in Micro Saint, functions are just macro definitions that serve only as shorthand for expressions or a series of statements operating on global variables. It is possible to define and set appropriate global variables before calling the function. However, this is an unnecessary work-around.

A library of built-in functions is supplied with the software. Unlike user-defined functions, library functions can take a fixed number of arguments. The library includes the essentials, such as the usual mathematical functions and about 20 probability distributions. Our view is that this library needs to be extended to include more functions.

New in version 3 is the "Resource Wizard." The resource wizard prompts the user through a series of dialogue boxes to enter the name and total quantity for a resource. For each task, the user can specify the number of resources used or released when an entity enters or leaves the task. Micro Saint then adds appropriate statements to the release condition, beginning effect and end effect of each task. This provides a slightly quicker way to add resources than inserting them manually.

The software normally does not check any of the statements entered as part of the simulation prior to execution of the model. However, in version 3 (unlike the earlier version 2.0), there is a menu option for checking the code syntax. The syntax checker evokes Notepad with a list of syntax errors, showing a small fragment of code and the job location. Empty statements are also treated as errors. Perhaps a more appropriate mechanism would be to automatically check the syntax prior to commencing a simulation run. The cursor can then be placed at the relevant position of the code.

Running Simulations


In the simulation, tasks are executed by entities. The start of a simulation is defined by a unique task, which creates a single entity. This initial entity is used to create additional entities if required. New entities can be created by routing an entity from its current task to multiple other tasks, one of which could be the original task-creation entity. The only property of an entity is its tag value (or identifier). Any other data pertaining to that entity must be stored in arrays using the tag value as an index to the entity's entry. (In addition, a spinner task may be implemented as a stand-alone task that routes only to itself and generates new entities.)

Curiously, the tag value need not be unique. Indeed, unless the user specifically modifies the tag value, all entities have the same tag value of zero. Entities with identical tag values can run through the simulation independently with one exception. This exception is an undocumented feature, which could cause serious problems to unwary users. Whenever two or more entities with the same tag value enter the same queue and wait for a task, these entities are merged into a single entity.

There are two possible ways to fix this. The software should either keep a unique internal identifier of entities to ensure that they never get merged accidentally, or it should prevent two entities from having identical tag values (possibly by setting these whenever an identity is split, with no way for the user to modify them).

The usual set of tape-recorder-style icons is provided for running simulations. Several windows provide alternative views of the simulation. The network window is used for building the logic for flow of entities in the simulation. During the simulation run, this highlights all of the active tasks and also provides a symbolic representation of the entities moving through the system. The variable catalogue continually updates the current values of all of the variables. However, a limitation is that array values cannot be viewed in this window.

During the debugging of a simulation the user can manually change the values of variables during the simulation using the execution monitor. The Event Queue Window displays the calendar of all scheduled events, including the animation events, which are added by the software.

The execution monitor shows the current status of the simulation. It also allows a list of expressions to be entered, which are evaluated after every step of the simulation. Depending on the width of the characters in the variable width font used for the window, users can enter expressions in a fixed width field, which can contain between 26 and 80 characters. However, all expressions get truncated, without warning, to 39 characters. Another potential source of errors is that the execution monitor will accept expressions, which modify the global variables after each step of the simulation.

Collecting Statistics


Statistics can be generated from four different sources: queues, tasks, resources and snapshots. Each of these generates ASCII data files in a similar format. The following information is collected for these:
  • Queues: Simulation time, entity tag, simulation run number, queue length, waiting time trigger.

  • Resources: Simulation time, resource used, resources initialized, utilization and trigger.

  • Snapshots: User defined list of variables, trigger type.

  • Tasks: For each task, the minimum, mean, maximum and standard deviation of task duration.

The trigger for generating an entry in the data file can occur at:
1. A regular simulation time
2. When entering a queue
3. When leaving a queue
4. At the end of the simulation run
5. At the end of a task.

In addition, resources generate data whenever the resource variable is modified. These files can be read back into Micro Saint (or other applications, such as a spreadsheet) for statistical analysis and plotting.

The statistical analysis provided by Micro Saint produces a table with the minimum, maximum, mean and standard deviation for fields in any data file produced during a simulation run. However, this is inappropriate for the resource data, as the average is calculated over the number of entries rather than the time over which the resource is used. For example, a resource of one unit that is used from time one till 100 (the end of the simulation run) would generate two entries in the resource data file. Micro Saint will calculate a mean utilization of 50 percent for this resource, rather than the correct utilization of 99 percent.

In addition, several types of graphs can be plotted for the data files. The graphs provided are scatter graph, line graph, bar chart, step graph and frequency distribution. The user can specify the field to plot on the x-axis and one or more fields for the y-axis. For example, histograms of queue waiting time and queue length can be plotted against the simulation time. The graphs produced by Micro Saint can be copied via the clipboard into other applications.

These features work well for simple graphs. When working with a large problem, each time the simulation is restarted, two buttons have to be pressed for each snapshot or queue file just to get Micro Saint to overwrite the previous version. This seems unnecessarily tedious.

Animation


The animation module of Micro Saint is called ActionView. It allows simple animations to be performed by moving icons in a window. The ActionView window can contain drawings imported from other graphics programs via the clipboard, but there are no drawing tools provided in Micro Saint itself. A set of 200 icons is provided with the software. While the manual states, "If you want to create your own icons use an icon editor," no icon editor is supplied with Micro Saint.

figure

Figure 2: The ActionView animation window.

Animations are created using commands to assign an icon to a tag at some position. Also available are commands that allow users to change the icon's color and to move it to a new position. The time taken for the icon to move to its new position can be specified as part of the movement command. The ActionView window has tools to place and move icons. The tools generate the commands for use in the simulation. These commands can then be copied and pasted into the appropriate part of the simulation and modified as necessary.

It would be useful to have commands that allow users to create other animation features, for example, to show the capacity usage of a storage facility. Even a simple line drawing command would be sufficient for this type of usage. The animations run reasonably smoothly. It was noticeable though, that when a window is open that displays the simulation clock (for example, the execution monitor window), the animation speed slows down significantly.

Optimization


An interesting feature of the software is the optimization option, which takes the form of a separate but compatible program called OptQuest. OptQuest is also distributed with CrystalBall as a solver for problems in Excel Spreadsheets. To use OptQuest, a simulation has to be built and saved in Micro Saint. This simulation should set a variable called "objective" to indicate the value, which is to be optimized. Micro Saint provides a menu function, which exits Micro Saint and starts OptQuest with the current simulation.

Once a simulation has been loaded into OptQuest, the user can select the scalar variables to be changed; and for each scalar variable, the range of initial values should be given. Here again, the inability of Micro Saint to initialize arrays can make things tedious, preventing the user from optimizing vector decision variables. The feasible space can be further defined with arbitrary linear constraints in the variables. Once the feasible space of decision variables has been set up, the user can optimize the simulation.

OptQuest uses a heuristic technique developed by Glover [1,2] called scatter search to find good solutions. Scatter search maintains a population of reference points, initially filled with random solutions. New solutions are then generated as linear combinations of these reference points. The search for new reference solutions is guided by a tabu search procedure, which reduces the likelihood of finding solutions that are only locally optimal. The user is given several options to modify what heuristic techniques are used for finding new solutions (neural network search, gradient descent and Taguchi methods). The user can also change the population size and the amount of time spent on an optimization run.

We tested the capability of this optimizer with two different simulations. The first simply evaluates a quadratic f(x) = 5x2 - 15x + 17. In two runs of the optimizer we imposed -106 x 106 and limited the time to 4 minutes. In the first case we used the default optimization options and completed 95 simulations to obtain a best solution x = 1.44719, f(x) = 5.76395. In the second case we used a smaller population and only a gradient search. In this case we completed 111 simulations to find x=1.49997 and f(x) = 5.75. While this is probably not a very typical example, it shows that there is a high overhead for the setup of the simulation and for passing of the results back to OptQuest (about 2 seconds per simulation since the evaluation of a quadratic should take almost no time).

A larger test example involved a M/G/s queuing simulation in which multiple transaction types can be assigned to two sets of servers. In this example there are 10 transaction types with different arrival rates and processing times, two queues and four servers. The servers are identical and can be assigned to either queue. The transaction types can also be assigned to either queue. The objective is to minimize the sum of the mean queue lengths. The first attempt at this included a constraint that the number of servers must be less than or equal to four with at least one for each queue. After 15 minutes, OptQuest found a solution with total mean queue length of 2.046 in the 177th of 188 simulation runs.

In an attempt to improve these results, we tried to impose a constraint that the number of servers must be exactly four, and eliminated some of the degeneracy by arbitrarily assigning the first transaction type to the first queue. In this second attempt, 187 simulations (out of 1,536 different possible solutions) were evaluated to obtain a best solution of 3.664 in a 15-minute time limit. The best solution we have been able to find for this type of problem is 1.788, and this was obtained through a special-purpose simulated annealing algorithm.

This shows that, while OptQuest does a reasonable job of optimizing arbitrary simulations, it is difficult to get good solutions with this type of approach to even relatively simple simulations. Naturally, there are better ways of achieving this — for example, by using steady state equations to determine queue lengths. However, it seems natural that someone with limited queuing theory or statistical background may try to obtain solutions by optimizing a simulation model of a queuing system over a set of possible scenarios.

Presently, in our view, the interaction between OptQuest and Micro Saint has two deficiencies. The first is that the focus is switched each time OptQuest invokes Micro Saint to evaluate a simulation. Thus, while the optimizer is running, it is almost impossible to use any other applications that require user interaction. The second defect is that OptQuest and Micro Saint communicate via the clipboard. This means that the optimization run can be corrupted by standard clipboard interaction such as using copy and paste in another text application. Furthermore, this communication method limits the user to one active optimization run at any given time.

So, although the inclusion of an optimization capability is a welcome addition to a simulation package like Micro Saint, and although OptQuest appears to be a product that is based on sound ideas and principles, its integration into Micro Saint is not excellent. We feel that this may deter users from using this nice feature.

Summary


Micro Saint still has a few rough edges. For example, it complains about long filenames, and can be crashed without too much difficulty (for example, by creating a variable overflow or deleting the total resources variable associated with a resource variable). However, the software has a nice look and feel to it, making it easy to use for small simulation projects. The software is easy to install under Windows.

On the whole, this is a nice simulation package suitable for beginners and for organizations wanting to build small simulations. It is also quite useful for educational purposes since it is easy to set up simulations rapidly. For larger, heavy duty uses, our view is that Micro Saint is not entirely suitable from a number of viewpoints. It does not provide ways of importing custom data from or to ASCII files. Also, the editing methods and language features, which are nice for learning about simulations, become limitations when trying to build big simulations. For example, most of the boxes for entering code are so small that only two or three statements can be viewed (although more can be entered).

For small discrete event simulations, however, the package works very well. It is easy to use and has enough features to allow, at least in theory, arbitrarily complex behavior to be simulated. The optimization module, which is a very useful addition to the basic software, provides significant additional functionality.

PRODUCT SUMMARY
Micro Saint is distributed by:
Micro Analysis & Design Inc.
4900 Pearl East Circle, Suite 201E
Boulder, CO 80301
Phone: (303) 442-6947 • Fax: (303) 442-8274
E-mail: sales@maad.com
Web: http://www.maad.com

Distribution outside North America:
Rapid Data Ltd, Amelia House, Crescent Road
Worthing, West Sussex BN11 1RL, U.K.
Phone: 01-903-821266 • Fax: 01-903-820762
E-mail: msaint@radata.demon.co.uk

Distribution in Japan:
Urban Dynamics Institute of TAKAHA Inc.
1-3-2, Nishi-azabu, Minato-ku
Tokyo 106-0031 JAPAN
Phone: 03-3479-7412 • Fax: 03-3479-6359
Email: region@udit.co.jp
Website: http://www.udit.co.jp

Pricing Information:
Prices available on request.
Send email to sales@maad.com



VENDOR COMMENTS
Editor's note: It is the policy of OR/MS Today to allow software developers an opportunity to clarify and/or comment on the review article. Following are comments from Sam Savage, developer of Insight.xla.

Micro Saint has been sold commercially for more than 15 years and has been used to model a variety of applications. Some examples of models that were built to replicate extremely complex systems are military command and control, large bulk mail processing facilities, and fleet component-level maintenance facilities. The bulk mail facility model represented the maintenance of 248,000 vehicles over a 24-year period, taken day-by-day. In fact, Micro Saint has often been used to solve modeling problems after end users have struggled, literally for years, with other more expensive modeling tools (with no results).

In several of these instances, a complex system was modeled in Micro Saint and produced actionable results within weeks. Because the language used in Micro Saint is easier to understand, learn and use than some other tools available, it may give the false impression that it cannot be used for complex problems. The fact that our program is easier to understand benefits people who did not develop the model or who aren't programmers. They will still be able to understand and evaluate the models built in Micro Saint.

We would like to clarify a few specific points in the review:
  • Running Simulations - The authors state that whenever two or more entities with the same tag value enter the same queue and wait for a task, these entities are merged into a single entity. This is true, and the authors imply that this is a problem. However, Micro Analysis and Design views this as a feature, since in many modeling situations, once the entities are back together they need to be seen as one entity.


  • Animation - Our ActionView animation feature has the ability to include number fields in the animation as well as specify size, color, precision, etc.


  • Optimization - While the overhead is high for setting up each simulation run and passing the solutions back to OptQuest, this computer time is relatively small compared to the simulation time. Therefore, we don't see this as a major deficiency in the current design.

    We question the validity of the comparison between OptQuest and the specialized simulation annealing algorithm. This isn't relevant to running optimization that relates to a simulation model.

    In the next version of Micro Saint, several of the issues mentioned in the review will be fixed. In the "Collecting Statistics" section, the authors noted that statistical analysis provided on the resource data is inappropriate and we agree. It had already been identified as a bug and is currently being corrected. In addition, we agree that the small spaces for editing code are inconvenient and that they should be enlarged. This improvement will also be made in the next version.


  • References


    1. Glover, F., (1977), "Heuristics for Integer Programming Using Surrogate Constraints," Decision Sciences, Vol. 8, No. 1, pp. 156-166.
    2. Glover, F., (1995), "Scatter Search and Star-Paths: Beyond the Genetic Metaphor," OR Spectrum, Vol. 17, pp. 125-137.




    The authors work as research scientists in the Operations Research Group of CSIRO Mathematical and Information Sciences (CMIS) in Australia.





  • Table of Contents

  • OR/MS Today Home Page


    OR/MS Today copyright 1999 by the Institute for Operations Research and the Management Sciences. All rights reserved.


    Lionheart Publishing, Inc.
    506 Roswell Street, Suite 220, Marietta, GA 30060, USA
    Phone: 770-431-0867 | Fax: 770-432-6969
    E-mail: lpi@lionhrtpub.com
    URL: http://www.lionhrtpub.com


    Web Site Copyright 1999 by Lionheart Publishing, Inc. All rights reserved.