Skip to main content

asimpy

A simple discrete event simulation framework in Python using async/await.

Thanks to the creators of SimPy for inspiration.

Core Concepts

Discrete event simulation (DES) simulates systems in which events occur at discrete points in time. The simulation maintains a virtual clock and executes events in chronological order. Unlike real-time systems, the simulation jumps directly from one event time to the next, skipping empty intervals. (Time steps are often referred to as "ticks".)

Async/Await

Python's async/await syntax enables cooperative multitasking without threads. Functions defined as async def return coroutine objects when called. These coroutines can be paused at await points and later resumed. More specifically, when a coroutine executes value = await expr, it:

  1. yields the awaited object expr to its caller;
  2. suspends execution at that point;
  3. resumes later when send(value) is called on it; an thend
  4. returns the value passed to send() as the result of the await expression inside the resumed coroutine.

asimpy uses this mechanism to pause and resume coroutines to simulate simultaneously execution. This is similar to the yield-based mechanism used in SimPy.

Metadata

Release files for asimpy 0.20.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asimpy 0.20.0
File Size Uploaded
asimpy-0.20.0.tar.gz 469.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asimpy 0.20.0
File Interpreter ABI Platform
asimpy-0.20.0-py3-none-any.whl Python 3 none any Details

Total release size: 487.3 kB

Release files / asimpy-0.20.0.tar.gz

Download URL asimpy-0.20.0.tar.gz
Size 469.4 kB
Tags Source
SHA-256 checksum
How to use checksums
773edb09a20450876e0a2e76061c8639310904cc01174065126f5104700134aa
BLAKE2b-256 checksum
How to use checksums
619b3e8621fdf25c29741b4181c5e3eeb712f8daf1091f997156f7f305c93652
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / asimpy-0.20.0-py3-none-any.whl

Download URL asimpy-0.20.0-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f521ca2c64b5b99b4ccbbc2e761fe15c57990a017791a7553d2f7b028396e888
BLAKE2b-256 checksum
How to use checksums
557f19cba572f54ecc9a92697241ef0ed07deeb90377b881b22be499cb18e7c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

0.20.0 This release

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.11.0

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.2

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page