Lecture II Simulation Languages
Lecture II Simulation Languages
Lecture II Simulation Languages
Lecture II
Francis Botchey
Introduction
• Simulation languages are versatile, general purpose classes of simulation
software that can be used to create a multitude of modeling applications.
• Some examples of modern simulation languages are GPSS/H, GPSS/PC, SLX, and
SIMSCRIPT III.
• Other simulation languages such as SIMAN have been integrated into broader
development frameworks.
Introduction
• These features are intended to free the analyst from recreating software tools and
procedures used by virtually all modeling applications.
• Not only would the development of these features be time consuming and difficult, but
without them, the consistency of a model could vary and additional debugging, validation
and verification would be required.
• Most simulation languages provide the features shown in the next slide
Simulation Language Features
1) Simulation clock or a mechanism for advancing simulated time.
3) Tools to collect and analyze statistics concerning the usage of various resources and entities.
4) Methods for representing constrained resources and the entities using these resources.
• For instance, Repast Simphony is a free and open source, agent-based modeling toolkit that adds
features to Java in order to simplify model creation and use.
• This blended approach provides the advantages of both the traditional language and the
simulation modeling extensions.
Flexibility: Programming languages inherently are flexible, giving the analyst freedom to
create the model using his or her preferred methodology.
Cost: Programming language software is usually more accessible and far less expensive
than specific simulation software.
• This may not always be true since several leading simulation languages can be
downloaded for no cost. However, other leading simulation language packages can be
very expensive.
Comparison to Traditional Languages
Hardware Concern: General purpose software may be available on any hardware
platform while some simulation languages may require special machines and memory
configurations.
Lack of Analyst Knowledge: The analyst may not understand simulation languages and
may lack knowledge on the advantages of using a simulation language package.
Training: Available classes in the use of traditional languages are more likely to be
available than specialty simulation training.
Comparison to Traditional Languages
• In a typical modeling application, the programmer or analyst will find the initial
investment in a simulation language more than pays off.
• Following IBM’s release of GPSS to the public domain, it became a multivendor simulation
language and has been in continuous use since.
• In general, GPSS enjoys widespread popularity due to its sensible world view and overall power.
• Its basic functions can be easily learned while powerful features make it ideal for modeling
complex systems.
Simulation Languages
• In general, GPSS is used to simulate queuing systems that consist of customer entities
interacting and completing in a system of constrained resources.
• The resources are structured as networks of blocks that entities (also called transactions)
enter and use to perform various tasks in certain amounts of simulated time.
• As entities move through these networks, which have been organized to represent a real
world system, statistics are collected and used to determine if the system contains
bottlenecks, is over or under utilization, or exhibits other characteristics.
• Output data is made available for analysis at the end of a production run.
SIMSCRIPT III
• This language is a direct descendant of the original SIMSCRIPT language
produced at Rand Corporation in the 1960's.
• SIMSCRIPT III has constructs that allow a modeler to approach a problem from
either a process or an event oriented world view.
• SIMSCRIPT III offers unique features which add to its appeal. Among these are:
• Object-Oriented Programming
• Modularity
• SIMSCRIPT III Development Studio (SimStudio)
• Object-Oriented Simscript III graphics
• Data Base Connectivity SDBC
SIMSCRIPT III
• In general, SIMSCRIPT III is a free form language with English-like syntax.
• Events and their scheduled times of occurrence are maintained automatically on one of two
ordered lists: the current events chain or the future events chain.
• The current events chain keeps a list of all events that will (or may) occur at the present clock
time.
• The future events chain is a record of all events that can occur at some point in the future.
• A simulation clock moves to the next event on the future events chain and changes the system
state of the model based on that event’s characteristics. See next slide for illustration.
How Simulation Languages Work
How Simulation Languages Work
• Transactions are dynamic entities that traverse through the networks of blocks in a simulation.
• Their meaning is defined by the simulation analyst during the process of building the model.
• They are usually created to represent an active object such an automobile in a traffic simulation,
an AGV in a manufacturing simulation, or a customer in a barber shop simulation.
• They move through the block network as far as the current system state allows and stop either
for a predetermined delay, a logical delay, or because a desired resource is currently unavailable.
• Parallel processes can be simulated since multiple transactions can be present in a model.
How Simulation Languages Work
• Each transaction has associated with it a list of attributes which can be altered
according to logic contained in the model.
• The system state of the model at any given time is defined by the status and
attributes of both permanent and temporary entities in the model.
Simulators and Integrated Simulation
Environments
• Simulators and integrated simulation environments have emerged to provide the
analyst with additional capabilities that further automate and remove drudgery from
the modeling process.
• Models that used to take days or weeks to develop with a simulation language can now
be modeled in minutes with predeveloped representations of commonly modeled real-
world items requiring no more than customization of certain parameters.
• New software, specialized to the application area, allows the analyst to model,execute,
analyze, and animate systems in their domain (such as manufacturing, healthcare,
logistics, communication, et cetera).
• Windows, help systems, and pop-up menus provide guidance and automate the modeling process.
• Facilities for comparing changes and statistical reporting tools are provided.
• Built in system specific templates make analysts more productive and eliminate programming
time.
Simulators and Integrated Simulation
Environments
• Analysts have tools to validate, verify and test designs.
• These models generally are created by a person who is not a simulation analyst or
programmer but still wishes to analyze a system.
• For example, the person who is an automation expert (rather than a computer
programming expert) is able to model a conveyor system with pull-down menus
and user friendly interface tools.
• They typically have user friendly features such as pull down command menus and special
tools to simplify model construction.
• Many simulators are marketed with more emphasis on their user friendliness than on
their underlying system modeling capability. They are meant for use by the domain
expert.
Advantages of Simulators
• Quick Model Development - Many simulators are set up to provide a fast method of constructing a model.
o This development speed is gained because the underlying system model has already been created and the user of the
simulator is only changing parameters through a user interface.
o This interface may be set up to allow model construction through the piecing together of graphic icons, with a series of
questions, or with series of prompts and user screens.
• Base System Simulation Already Complete - At the center of all simulators is a model which has already
been constructed.
o The user of the simulator, in theory, does not need to concern themselves with fully understanding and analyzing the
system to be modeled.
o As long as several key attributes of the system can be identified, the simulator will do the work. This saves time, energy,
and frustration on the part of the model builder.
Advantages of Simulators
• This structure or experimental framework has evolved from repeated use and,
in many cases, is superior to what a first time simulation analyst could devise.
• When used in the proper context, they can be a useful tool. But when misused,
they can provide misleading results.
o In order to sell a simulator, a vendor must be able to apply his product to many
comparable systems.
Disadvantages of Simulators
o This means a generic model forms the basis for the software and that it may
have simplifying assumptions built in.
o Instead of displaying their edge over the competition, the simulator made their
system like everyone else’s.
Disadvantages of Simulators
o The base model has already been built and with it are some general,
unchangeable, underlying assumptions.
• Encourages Jumping the Gun - Due to the nature of simulators and the ease
with which models can be created, the modeler is often tempted to skip
intermediate steps in the model creation process and immediately begin
performing a quick analysis.
• This visual component may give the model users a “warm fuzzy feeling” but it
shouldn't be unconditionally accepted as valid.
oIn most cases, simulators are created for broad and general applications.
oIf a modeler wants a simulation that exploits all specific attributes of his/her system to
gain a competitive edge, a simulation language may provide a better fit for the project.
2. Simulators can make excellent “concept modeling tools.” One of the steps in the
simulation life cycle is the creation of a rough-cut or concept model. Simulators can be
used to build quick models for feasibility studies.
Simulators vs. Simulation Languages
o The company that wishes to purchase a conveyor, for example, can use a simulator to provide a general estimate of what
will be needed.
o A simulator will provide a good idea without actually getting too specific. This is particularly true when a product vendor
has not yet been selected.
o Simulators reduce the time involved in model construction. The other steps in the simulation process still require time
and expertise.
Animation
• In some cases, the term simulation visualization is used for the same thing.
• Produces User Friendly Output - For the non-technical person, an animation will
be much easier to comprehend than a statistical printout.
o By watching simulated entities move about on the screen, the observer can become
familiar with the system's operation and with the logic embedded by the analyst.
• Tool for Debugging - The simulation analyst can use an animation as a debugging aid.
o The analyst is able to verify that the actual model matches his or her conceptual design.
o Animation will make errors and problems obvious, thereby eliminating the temptation to say, “It's such a rare
problem that it's not worth fixing.”
o No matter how rare or inconsequential the problem may be, if an observer can see it happen during an
animation, it has to be dealt with or the face validity of the model will be destroyed.
Using Animation in The Proper Context
• Visual Impact / Sales Tool - One of the most popular reasons for using animation is
the visual impact or sense of reality that it brings to the modeling process.
o It is much easier to sell a system concept when it appears to work when viewed on
the screen of a computer than it is to sell a system represented by a stack of paper
covered with numerical data.
o Most vendors of industrial equipment rely heavily on animation as a tool for use by
its sales force when trying to "sell" a concept to a customer.
• Creation of Overconfidence - A model is still just a model and is only as accurate as the data and
assumptions it uses.
o Animation tends to make model users and creators forget some of the underlying assumptions and
techniques that were incorporated during the construction stage.
o It is easy to think that if it looks realistic on the screen then the system must be modeled properly.
o The animation should be used as a supplement to the simulation not as its focal point.
• A Substitute for Good Statistical Work - Rather than spending time to perform a proper
analysis on the results of a simulation study, the decision maker bases his or her opinions
on a short period of observed animation.
o The animated portion of the simulation observed might not be representative of the system's true
behavior.
o It is very important not to jump the gun and draw conclusions only on the basis of an
animation.
Animation Attributes
• Animation software may be structured in different ways depending on the application. For instance,
most personal computer animators are 3-dimensional, exhibiting graphics with height, width and
depth.
• Some animation packages offer pixel-based graphics and others, like Proof Animation from Wolverine
Software, offer CAD-like 3-dimensional vector-based animation.
• Another attribute of animation software is that it allows a model to run real time or in the post
processor mode.
• The term real time is used indicate that the animation runs on the computer screen while the
simulation program is executing.
• The disadvantages for this type of animator are a loss of speed, possible inaccurate statistical
representation of the time period being modeled, and the need to run the simulation when the
animation is viewed.
Animation Attributes
• Additionally, some animation packages allow model parameters to be changed on the fly. This can result
in the corruption of output statistics.
• The post-processor mode means the animation is displayed after the simulation run is complete.
• The simulation creates a data file that is used as an input to the animation program.
• A post processor offers many advantages such as the ability to fast forward, reverse, speed up or slow
down a viewing.
• The animation can be easily transported requiring only the animator software and data file.
• Since the animation is run from a data file, multiple copies can be running at one time without needing additional
copies of the simulation program.
Example Animation Software Packages
• On the other end of the spectrum are specialty animations developed to accompany
specific models.
• Many animations are created using graphics tools provided simulation software
vendors.
• Among these are the tools found in Arena 3DPlayer and Wolverine Software’s Proof
Animation.
Example Animation Software Packages
• Arena 3DPlayer is a post-processor that enables a simulation analyst to create and view three dimensional
animations of models created in Arena.
• First, a system layout is developed and when an Arena model is run, a simulation history file is created.
• This file feeds information into the 3DPlayer and enables the movement of dynamic, user-defined entities through
the model layout.
• 3DPlayer provides a user-friendly interface which employs pull down menus to allow non-programmers to quickly
develop realistic animations.
• Proof from Wolverine Software Corporation is a low priced, high performance animation program.
Originally designed to work with GPSS/H, Proof’s power and flexibility appeal to analysts using other
simulation software products.
• Run-time Proof intended for displaying Proof animations but lacking development
• Proof Demo Maker and Demo Viewer which allow animations to be distributed
• Proof for Extend which is a custom version of Proof for the Extend simulation product from Imagine That, Inc.
end