Introduction
The PLT Scheme Simulation Collection implements a combined discrete and continuous event simulation engine for developing simulation models in PLT Scheme. The simulation engine:
Provides a process-based, discrete event simulation engine
Supports combined discrete and continuous simulation models
Provides automatic data collection
Is designed to facilitate construction of component-based simulation models
The source code is distributed with the simulation collection and licensed under the GNU Lesser General Public License (LGPL)[2].
The motivation behind the PLT Scheme Simulation Collection is to provide the simulation engine for developing knowledge-based simulations in PLT Scheme. It is based on work originally done in Symbolics Common Lisp[11][12]. This is not as much a port of the earlier work as a complete re-engineering of the system into PLT Scheme. In particular, it makes extensive use of continuations to provide a process-based approach to building simulation models. It also adds support for building continuous simulation models, which were not part of the original work.
The functionality and terminology of the PLT Scheme Simulation Collection is similar to that found in the SIMSCRIPT II.5[9][1] language from CACI. Some of the example programs in this manual are based on examples from Building Simulation Models with SIMSCRIPT II.5[9] and Introduction to Combined Discrete-Continuous Simulation Using SIMSCRIPT II.5[1]. The most important difference is that SIMSCRIPT II.5 is a simulation language, while the PLT Scheme Simulation Collection runs under an existing programming language, PLT Scheme. In this regard it is similar to SimPy[10], which is a simulation system that runs under the Python[8] programming language; although SimPY was not a major source of inspiration for the PLT Scheme Simulation Collection. Appendix C gives some examples of simulation models in both SimPy and the PLT Scheme Simulation Collection for comparison.
1.1 Routines Available in the Simulation Collection
The PLT Scheme Simulation Collection provides the following functionality for building and executing simulation models:
Simulation Environments (Basic)
Simulation Control (Basic)
Events
Processes
Resources
Data Collection
Sets
Continuous Simulation Models
Monitors
Simulation Classes
Simulation Control (Advanced)
Simulation Environments (Hierarchical)
Components
The use of these functions is described in this manual. Each chapter provides detailed definitions of the functions, with example code.
Version 2.0
Version 2.0 of the PLT Scheme Simulation Collection features a full Reference Manual that is compatible with the PLT Scheme Help Desk. The reference manual was written in TEXand converted to HTML using tex2page. A pdf version of the reference manual is also available.
Version 2.0 also provides priority ordering for events and resource allocation; reneging for resources; and linking event execution.
Finally, Version 2.0 adds a monitor capability for simulation timing and for variables.
Bug Fixes:
The schedule
macro was changed to generate code that is compatible with its use within a module. Previously, it generated code that worked only at the top level.
1.2 The Simulation Collection is Free Software
The PLT Scheme Simulation Collection is free software - this means that anyone is free to use it and to redistribute it in other free programs. The simulation collection is not in the public domain - it is copyrighted and there are conditions on its distribution. Specifically, the PLT Scheme Simulation Collection is distributed under the GNU Lesser General Public License (LGPL)[2]. A copy of the LGPL is provided as Appendix A of this document.
1.3 Obtaining the Simulation Collection
The preferred method for obtaining the PLT Scheme Simulation Collection is via the PLaneT Package Repository (PLaneT), PLT Scheme's centralized package distribution system[6]. The PLaneT identifier for the PLT Scheme Simulation Collection, Version 2.0 (or later) is ("williams" "simulation.plt" 2 0). PLT Scheme will automatically download and install the simulation collection from the PLaneT server. See Chapter 2 for an example.
Note that Version 2.0 of the PLT Scheme Simulation Collection requires PLT Scheme Version 301 or later. Versions later than 301.5 are recommended because of improved performance.
1.4 No Warranty
The PLT Scheme Simulation Collection is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It is your responsibility to validate the behavior of the software and their accuracy using the source code provided. See the GNU Lesser General Public License (LGPL)[2] for more details.