UPSTAGE#
The Universal Platform for Simulating Tasks and Actors with Graphs and Events (UPSTAGE) library is a Python framework for creating robust, behavior-driven Discrete Event Simulations (DES). The primary goal of UPSTAGE is to enable the quick creation of simulations at any desired level of abstraction with built-in data recording, simulation integrity and runtime checks, and assistance for the usual pitfalls in custom discrete-event simulation: interrupts and cancellations.
UPSTAGE - which is built on the SimPy library - contains two primary components that are assembled to create a broad array of simulations.
The components are Actor
- which contain State
- and Task
, which can be assembled into a TaskNetwork
. Actors can have multiple networks running on them, their states can be shared, and there are features for interactions between task networks running on the same actor. Those tasks modify the states on their actor, with features for real-time states that update on request without requiring time-stepping or modifying the existing events.
Additional features include:
Context-aware
EnvironmentContext
, accessed viaUpstageBase
, enabling thread-safe simulation globals for the Stage and Named Entities (see below).Active States, such as
LinearChangingState
which represent continuous-time attributes of actors at discrete points.Spatial-aware data types like
CartesianLocation
, and states like the waypoint-followingGeodeticLocationChangingState
.Geodetic and cartesian positions, distances, and motion - with ranged sensing.
NamedUpstageEntity
in a thread-safe global context, enabling easier “director” logic creation with fewer args in your codeThe stage: a global context variable for simulation properties and attributes. This enables under-the-hood coordination of motion, geography, and other features.
Rehearsal: Write planning and simulation code in one place only, and “rehearse” an actor through a task network using planning factors to discover task feasibility.
All States are recordable
Numerous runtime checks and error handling for typical DES pitfalls: based on years of custom DES-building experience.
And more!
Note
This project is under active development.
Installation#
In a suitable Python environment (3.11+):
(venv) $ pip install upstage-des
Installation from source#
Alternatively, you can download UPSTAGE and install it manually. Clone, or download the archive and extract it. From the extraction location (and within a suitable Python environment):
(venv) $ python -m pip install .
(or just pip install .
)
User Guide#
Contributing#
To contribute to UPSTAGE, or to learn the steps for building documentation, running tests, and putting in PRs, see CONTRIBUTING.MD)
License and Attribution#
This software is licensed under the BSD 3-Clause. Please see the LICENSE
file in the repository for details.
Reference#
This section contains information-oriented reference materials for developers looking to understand the UPSTAGE software components and its API.
The API documentation is auto-generated.