A library for behavior-driven discrete event simulation.
Project description
UPSTAGE
UPSTAGE is a Universal Platform for Simulating
Tasks and Actors with Graphs and Events built atop
SimPy 4
.
What is UPSTAGE for?
UPSTAGE 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. It is designed is to simplify the development process for simulation models of complex systems of systems.
UPSTAGE leverages the extensible SimPy
library and adds two concepts to accelerate the generation of complex discrete-event simulations.
Actor
- i.e., an entity that hasState
Task
- i.e., actions actors can perform and that can be organized into aTaskNetwork
.
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 (e.g.,
LinearChangingState
) represent continuous-time attributes of actors that can be queried at discrete points in time, or trigger events when they reach a certain level. - Spatial-aware data types (e.g.,
CartesianLocation
) and states like the waypoint-followingGeodeticLocationChangingState
. - Geodetic and cartesian positions, distances, and motion - with ranged sensing.
NamedEntity
in a thread-safe global context, enabling easier "director" logic creation with less argument passing in your code- The
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 before the actor attempts to complete the task.
- All States are recordable
- Numerous runtime checks and error handling for typical DES pitfalls: based on more than a decade of custom DES-building experience.
- And more!
See the documentation for tutorials and details.
Requirements
UPSTAGE only requires Python 3.11+ and Simpy 4+.
Installation
In an environment (Python 3.11+) of your choice:
pip install upstage-des
Documentation
See the documentation for tutorials and additional details.
How do I contribute or set up a develpment environment?
See CONTRIBUTING for instructions on setting up an environment and contributing.
For information on how to style your code, see the Style Guide.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file upstage_des-0.2.0.tar.gz
.
File metadata
- Download URL: upstage_des-0.2.0.tar.gz
- Upload date:
- Size: 129.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf1c7d135ffce4d769d4c401c176f6e5f9daf790d261ca661c8578fdadabeea0 |
|
MD5 | ad97bd7cc3d5bad3036f638f8c399d71 |
|
BLAKE2b-256 | 40cbd0a37c889e0f0f452a32ea351dbd555924aeb4f0b92824876a8abe71cf08 |
Provenance
The following attestation bundles were made for upstage_des-0.2.0.tar.gz
:
Publisher:
publish-to-pypi.yml
on gtri/upstage
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
upstage_des-0.2.0.tar.gz
- Subject digest:
bf1c7d135ffce4d769d4c401c176f6e5f9daf790d261ca661c8578fdadabeea0
- Sigstore transparency entry: 157506467
- Sigstore integration time:
- Permalink:
gtri/upstage@e32f34408684035680f4aad09fb7307e631915f9
- Branch / Tag:
refs/tags/v0.2.0
- Owner: https://github.com/gtri
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish-to-pypi.yml@e32f34408684035680f4aad09fb7307e631915f9
- Trigger Event:
push
- Statement type:
File details
Details for the file upstage_des-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: upstage_des-0.2.0-py3-none-any.whl
- Upload date:
- Size: 173.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e556fee7a2773d915703d18b7dadb9a5358c3dacabe0ec44e8307e582a3820de |
|
MD5 | 9d32cfdf048da723c971ddc88a0cc22b |
|
BLAKE2b-256 | 6123ec75650ea521f707ea87f2c5bdd29f2179a69d4546e8763eb2d43399b611 |
Provenance
The following attestation bundles were made for upstage_des-0.2.0-py3-none-any.whl
:
Publisher:
publish-to-pypi.yml
on gtri/upstage
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
upstage_des-0.2.0-py3-none-any.whl
- Subject digest:
e556fee7a2773d915703d18b7dadb9a5358c3dacabe0ec44e8307e582a3820de
- Sigstore transparency entry: 157506468
- Sigstore integration time:
- Permalink:
gtri/upstage@e32f34408684035680f4aad09fb7307e631915f9
- Branch / Tag:
refs/tags/v0.2.0
- Owner: https://github.com/gtri
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish-to-pypi.yml@e32f34408684035680f4aad09fb7307e631915f9
- Trigger Event:
push
- Statement type: