Software choice for discrete event simulations
From Wikipedia, the free encyclopedia
Contents |
[edit] Tools for discrete event simulations
Discrete event simulations may be written in any general purpose computer language such as C++ but to construct an industry grade project in reasonable time with a general computing language consumes too much effort. No wonder that many tools have been developed during the last 40 years aiming to reduce the required efforts as much as possible.
The tools may be classified from the viewpoint of the user into four types that will be reviewed below. Choosing the correct tool for a specific situation in view of the available human capital has a major impact on the cost and time of a simulation project as well as the quality of the simulation results. For the question as what is the "best" tool, there is no unequivocal answer, but this classification helps at least to shed a light on the trade-off involved
The four types are the libraries, simulation languages, GUI-based systems and wizards. This classification is artificial in two senses. First, there are many tools that are hybrid of these kinds. Further, these classes are far from being homogeneous; much variation is present within each type. Still, it is useful to discuss them in the said framework for the purpose of helping the choice.
In each type two specific tools will be cited to illustrate the variation inside of "pure" types, without any claim to their superiority or being even representative of their class.
[edit] General observations
Each tool has some variate generators as functions returning random variates for given statistical distributions. These variates are some transformations of sequences of pseudorandom numbers. Each such sequence is called a ‘’stream’’. Most tools provide more than one stream. It is recommended to check the number of streams and the transformation algorithms from random numbers to variates, used by the tools.
The number of streams is important because the best practice is that each random effect is fed from a distinct stream as this reduces the possibility of obtaining correlated random effects when statistical independence is assumed. Further, if variance reduction techniques are used then the transformation algorithm must be by the inversion method and not other methods. There are many tools that do not comply with this requirement for certain distributions and instead of reducing the variance of the results, they increase it.
[edit] Libraries
There are library routines for variate generation according to specified statistical distribution, statistics collection, simulation clock management (thus, mainly event sequencing) and treating various aspect of queues. Most libraries are written for the languages Java, C++ and Fortran, there are free and commercial packages.
Library with general purpose languages is the preferred choice if
- an experienced programmer and a simulation specialist are available (they may be two members of a team or embodied in the same person),
- the same simulation problem with different inputs is recurrent that justifies the effort,
- the logic cannot be easily expressed in GUI-based systems.
[edit] Simulation languages
GPSS was the first simulation language that appeared in the 60’s and soon more able languages followed it such as SIMSCRIPT. The expressive power of the languages differ considerably: there are as expressive languages as general purpose languages and there are ones that beyond simulation chores hardly can do any extra. Expressive power is important if more involved logic is required.
Another basic feature that may differ among simulation languages is with the general world-view inherent in language design. There are several such views possible:
- Event oriented view: the model centers around the discrete events.
- Process oriented view: the model is described as a sequence of time-delays due to processes and waiting times.
- Cycle oriented view: the simulation is described as interaction of cycles. An example of a cycle is the state of a machine alternating between states of being busy and being idle.
- Net oriented view: the simulation is considered as a network.
The problem with simulation languages is that the simulation builder has to memorize the syntax and be familiar with the word-view. Therefore, their use might be considered only if the user has already gone over an intensive course or it is worthwhile to invest in such a course.
[edit] GUI-based systems
To circumvent the difficulty of syntax memorizing in simulation languages, an instruction or a group of instructions that are used often together, is signified graphically by an icon. Placing the icons on the screen (by dragging icons from a displayed icon-library), connecting them as a network and filling some details about parameters constitute the model building.
The advantage of GUI-based system is the avoidance of syntax and the visual depiction of the model. The main disadvantage is that they are less expressive than many simulation languages and the fact that the user has to be familiar with the world-view as well as all the intricacies of the icons to utilize the system properly. Thus, a necessary course introducing the user to use of GUI-based system should be somewhat less intensive than that needed for simulation languages, but it is still required.
[edit] Wizards
Wizards in general are programs that direct the user through a predefined set of steps. The program solicits information from the user at each step. At the end of the process a useful task is performed such as installation of a computer program. Regarding simulation the useful task is simulation model is built and run. The wizard can be as simple as a single input window or a sequence of steps that depend on the user responses in earlier steps. Most wizards are aimed to a very specific niche of application such as call centers or vehicular traffic. The advantage of wizards is that their use requires minimal training. The disadvantage is that dedicated wizards cannot simulate systems that are not prepared for; a wizard for a call center cannot simulate vehicular traffic.
[edit] Conclusions
The ordering of types as libraries (together with general purpose computer languages), simulation languages, GUI-based systems and wizards tries to convey the main advantages and disadvantages of the tools. As one descends in the order from libraries to wizards the needed human capital decreases while flexibility decreases. If human capital is a scarce resource, choose the first tool from below - a dedicated wizard. If flexibility is the only concern, choose the first tool from up - a library and a general purpose computer language. In real-life situation the aims are multiple so the correct choice is somewhere in the middle.