2 Simulation Languages And Tools

Simulation and Modeling · Unit 2

Simulation Languages and Tools

Exam-focused notes for Simulation Languages and Tools (Simulation and Modeling, BIT407): what the TU syllabus asks and how it has actually been tested, with 3 solved past questions from this unit.

Simulation Languages and Tools in short

Writing a simulation in an ordinary language means coding the clock, the event list, and the statistics by hand. Simulation languages do this work for us. This chapter looks at their features and at two well known examples, CSMP and SIMSCRIPT III.

Simulation Languages and Tools: notes

Definition and features of simulation languages

A simulation language is a programming language with built-in tools for building, running, and analysing simulation models. The user describes the model, and the language handles the mechanics.

Main features:

  • Clock handling: the language keeps the simulation time and moves it forward by itself.
  • Event scheduling: events are stored in time order and run one by one.
  • Random numbers: ready-made generators give values from common distributions.
  • Entities and attributes: objects and their properties are created and removed easily.
  • Queues and sets: waiting lines and groups of entities are managed with simple statements.
  • Data collection: averages, counts, and histograms are gathered with little coding.
  • Report output: results are printed or plotted in a standard format.
  • Debugging help: trace options show what the model did and when.

Advantages over a general language such as C or Java:

  • The model is shorter and faster to write.
  • There are fewer programming errors in the timing logic.
  • Statistics come built in.

Disadvantages:

  • The user must learn a special language.
  • Running time can be longer than for hand-written code.
  • Some tools are costly.

Languages are of two kinds. Continuous languages, such as CSMP, solve differential equations. Discrete event languages, such as GPSS and SIMSCRIPT, handle events and queues.

What this unit covers

  • Definition and features of simulation languages
  • CSMP language overview
  • CSMP statement types and syntax
  • CSMP examples and applications
  • SIMSCRIPT III language and features

CSMP statement types and syntax

0 · 10 marks

Define CSMP. Describe different types of statements in CSMP with example. Explain mathematical models in detail.[10]

CSMP (Continuous System Modeling Program) is a simulation language designed for modeling and simulating continuous dynamic systems. It is a high-level programming language specifically developed for solving differential equations and analyzing the behavior of continuous systems over time. CSMP al...

Open this answer on its own page →

Definition and features of simulation languages

0 · 5 marks

What is simulation language? Explain the features of simulation language. [5]

Show solved answer

Model Answer: Simulation Language

Definition of Simulation Language

A simulation language is a specialized programming language or software tool designed specifically to model and simulate the behavior of real-world systems over time. It provides built-in constructs and features that facilitate the creation, execution, and analysis of discrete-event or continuous simulations without requiring extensive low-level programming.

Features of Simulation Language

1. Time Management

  • Automatic handling of simulation clock and time advancement
  • Support for both discrete-event and continuous time progression
  • Efficient scheduling of events in chronological order

2. Entity and Attribute Handling

  • Easy definition and manipulation of entities (objects being simulated)
  • Support for attributes to represent properties of entities
  • Dynamic creation and destruction of entities during simulation

3. Event Processing

  • Built-in mechanisms for defining and scheduling events
  • Automatic event sequencing and execution
  • Efficient event list management

4. Statistical Collection and Analysis

  • Automatic gathering of performance metrics
  • Built-in statistical functions (mean, variance, confidence intervals)
  • Data collection without explicit programmer coding

5. Resource Management

  • Facilities to model queues and resource allocation
  • Automatic handling of resource contention
  • Support for resource scheduling and prioritization

6. Ease of Use

  • High-level, problem-oriented syntax
  • Reduced programming complexity compared to general-purpose languages
  • Shorter development time for simulation models

7. Debugging and Visualization

  • Trace facilities for model verification
  • Animation and graphical output capabilities
  • Interactive debugging tools

8. Modularity and Reusability

  • Support for modular model design
  • Library of pre-built components
  • Code reusability across simulations

These features collectively enable efficient development and analysis of complex system simulations.

Open this answer on its own page →

SIMSCRIPT III language and features

0 · 5 marks

Write short notes on SIMSCRIPT III Write short notes on Multiple Server Queuing Systems [2.5+2.5]

Definition and Purpose: SIMSCRIPT III is a high-level, general-purpose simulation language designed for modeling and simulating discrete event systems. It provides a structured environment for building complex simulation models with minimal programming effort. Key Characteristics: 1. Language Str...

Open this answer on its own page →