DigitalCommons

.


INTRODUCTION
Computer software and hardware advances have had an important impact on discrete-event simulation.One result of these advances is Mathematica, a general software system and language for mathematical applications.Wolfram (1991) describes Mathematica as "A System for Doing Mathematics by Computer."Mathematica is an ideal general-purpose analysis tool since it integrates several features into a unified, interactive environment: numerical and symbolic calculations, functional, procedural, rule-based, and graphics programming.Additional features include: -manipulating complicated symbolic expressions, -graphing and animation, -performing numerical calculations to arbitrary precision, -its own programming language for constructing elegant and efficient programs, -portability of programs to a wide range of computer platform without any modification.The ability to perform symbolic as well as numerical manipulations places Mathematica with programs such as Derive, Macyma, Maple, and Reduce (Swain 1989).In contrast, TK!Solver and MathCAD are primarily numerical in their manipulations.
Mathematica is an interpreted language -it reads and evaluates an expression and then computes and prints out a result.Wickham-Jones (1994)

describe that
Mathematica is split into two parts.The kernel is the computational engine of the system that receives and evaluates all expressions sent to it.The front-end provides the program interface to the user and is concerned with such issues as how input is entered and how the results are displayed.Even though the front-end differs between computer platforms, the underlying kernel provides essentially the same set of functions.
The objective of this paper is to illustrate how Mathematica can aid a simulation analysis.The next two sections present numerical and graphical simulation examples.The paper concludes with some final comments on Mathematica and offers sources for further information.

Queueing Theory
One of Mathematica's advantages is its ability to effectively manage equations.To see this, consider the function Queue[] which implements the queueing formulas for describing an M/M/S queue.The function works by prompting a user to specify the arrival rate (e.g., 0.1), the service rate (e.g., 0.2) and the number of servers (e.g., 3) to a queue.Using this information, the function computes M/M/S summary statistics.

GRAPHICAL EXAMPLES
Mathematica represents graphics as expressions that can be manipulated.Sometimes one can achieve a desired graphical effect by using the options of the built-in plotting commands; at other times, the only way to accomplish a goal may be to modify the expressions returned by a plotting command or even to create an expression from scratch.

RANDU Generator
As discussed by Law and Kelton (1991), the RANDU random number generator, ( )

Surface Plot
Experimental design permits evaluating alternative system designs by varying combinations of the decision variable settings.Simulation is primarily concerned with deciding how to develop a set of simulation runs that allow an analyst the ability to select which variables to measure and how to test if they significantly affect the output/response of the model.That is, perform optimization with simulation.Mathematica can aid in this process.Figure 4(a) presents the response surface resulting from running 35 simulation models (Hoover and Perry 1989, Illustrative Problem 10.7) in which a number of expert and apprentice mechanics are varied from 0 to 5 (the 0,0 combination was not run) to estimate the cost of repairing a group of machine.Each model was replicated five time for each combination of mechanics resulting in a total of 175 simulation runs.

FINAL COMMENTS
Computers have brought about a fundamental change in the nature of research and in science and engineering education (Gaylord, Kamin, and Wellin 1993).One of these changes is Mathematica, a useful tool for those who do quantitative analysis, symbolic calculations and manipulations, and need to visualize functions or data.Mathematica has enormous power for aiding a simulation analysis.
In addition to the examples presented in the paper, Mathematica provides functions for computing confidence intervals, performing hypothesis tests, estimating regression lines, solving linear programming problems, and assisting with matrix manipulations.
Mathematica is not without problems.Its key disadvantages is that it is slow.Based on my own experience, I estimate that a Mathematica program runs Figure 1: Output from executing function KSTest[] which tests whether a set of ten data points(31, 31.4,33.3, 33.4,33.5, 33.7, 34.4,34.9,  36.2, 38)  follow a normal distribution.The function concludes that there is not enough evidence to reject the normality assumption

Figure 2 :
Figure 2: Output resulting from running the function Queue[].The arrival rate, service rate, and number of servers are specified as 0.1, 0.2, and 3, respectively.
random numbers are used in groups of three.Using Mathematica, it is easy to observe this dependency.Figure3(a) shows the default view of 6000 tuples generated from the RANDU generator.Based only on this view, the generator appears to be sufficiently random.By changing the orientation, Figure 3(b) and (c) show a different view of the same cubic.In Figure 3(d), the dependency among the three-dimensional lattice structure is clearly evident.The code for the RANDU generator and for the plotting the data is given in Appendix C.

Figure 3
Figure 3(a): Default view of 6000 tuples from the RANDU generator.

Figure 3
Figure 3(b): Different view of (a).Note the formation of the parallel planes.

Figure 3
Figure 3(c): Different view of (a).The parallel planes are becoming more significant.

Figure 3
Figure 3(d): Different view of (a).Fifteen parallel planes are clearly evident.
Figure 4(a): Response surface generated from plottingthe repair cost for various levels of expert and apprentice mechanics.For instance, 5 experts and 1 apprentice mechanic has an approximate cost of $550.