AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

simpy

Builds, inspects, tests, and analyzes bounded process-based discrete-event simulations with SimPy. Use for event scheduling, resource queues, interrupts, monitoring, independent replications, warm-up, and reproducible output analysis.

Original source
K-Dense-AI
License
MIT
Pinned revision
5f2bc0341354fd5590aef76a533ada1e1e5b4e62

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read k-dense-ai--simpy at revision 5f2bc0341354fd5590aef76a533ada1e1e5b4e62, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 9

references/sources.md

Sources and verification record

Current API/source/runtime review: 2026-10-01, SimPy 4.1.2, Python 3.13.3. Official PyPI metadata still identifies 4.1.2 as the latest release. The 410,129-byte official source distribution and the cached installed release were inspected; core/event/resource/real-time signatures and implementation behavior agree. Versioned documentation is preferred over the moving latest build.

The release and bibliographic notes below retain their original 2026-07-23 access dates where that historical review was not repeated. They are not fresh live-probe claims. On this refresh, the core/events/resources/rt/util/exceptions API pages, monitoring guide, and Law/L'Ecuyer/Sargent proceedings were opened directly. Several topical pages were inaccessible through the browser extraction tool; the corresponding official 4.1.2 sdist documentation/source supplied the fallback.

Current audit findings

| Surface | Verified behavior / correction | |---|---| | Environment(initial_time), run, step, peek, schedule, now, active_process | Queue minimum chosen at each step; callbacks can insert urgent same-time work. Numeric horizon excludes ordinary boundary events. Stop callback reschedules remaining callbacks at priority -1. | | Event, Timeout, Process, AnyOf, AllOf, ConditionValue, Interrupt | Values, failure propagation, conditions and interrupt lifecycle reproduced. Event.trigger() returns None despite an inconsistent prose docstring; fail() source accepts BaseException despite its Exception annotation. | | Resource/Priority/Preemptive, Request/Release, Preempted, Put/Get cancellation | Resource request key includes (priority, time, not preempt); context exit cancels pending requests and releases acquired slots. | | Container/Store/FilterStore/PriorityStore/PriorityItem | Blocked requests wait; filtering can bypass earlier unmatched gets. PriorityStore is a heap and equal-priority items are not FIFO without an explicit tie-breaker. | | RealtimeEnvironment, factor, strict, sync | Mapping and lag check inspected in released rt.py. Constructor does not enforce positive finite factor. sync resets wall origin, not the initial simulation origin. | | Monitoring | Native deterministic checks cover urgent trace insertion, final time weighting, warm-up windows, cancellation, and monitor non-interference. | | Queue/replication helpers | Schema 1.2 counts throughput by window departures and loss by window arrivals; arrival-cohort completed customer means remain censored. Runtime version and metric definitions are recorded. |

There are no service/API endpoints, credentials, request bodies, pagination, or remote mutations in these helpers. The URLs here are package documentation, source, and methodological references. Native discrete-event fixtures verify software mechanics, not a calibrated operational system. Real-time strict/sync unit checks use a controlled clock; a short wall-clock smoke is only a timing sanity check, not a hardware-in-the-loop performance claim.

The isolated suite is under repository-level tests/simpy/. CLI round trips use tiny local JSON/JSONL/CSV files; no user data or live service was exercised. The complete minimal model in SKILL.md and ten CLI workflows were executed. All 46 Python documentation fragments parsed; context-dependent reference snippets are illustrative patterns, with representative behaviors exercised by the native suite rather than every fragment executed independently.

Release, packaging, and source

  • SimPy on PyPI — 4.1.2, released 2026-05-24; Requires-Python >=3.8; classifiers list Python 3.8-3.14, CPython, and PyPy; MIT; no runtime dependencies. Verified 2026-07-23.
  • GitLab source project — canonical repository, MIT license, tagged source, tests, and documentation. Accessed 2026-07-23.
  • GitLab tag 4.1.2 — protected/verified tag, commit f43816490c6f76f336ad6e457d3cab9f386894af, dated 2026-05-24.
  • Tagged CHANGES.rst — 4.1.2 entry dated 2026-05-23: Python 3.13/3.14 support, modern-interpreter test/doc fixes, ConditionValue explicitly unhashable, lint/type cleanup.
  • Tagged pyproject.toml — Python requirement/classifiers, no dependencies, setuptools build, pytest, mypy, and ruff configuration. Dated 2026-05-23; accessed 2026-07-23.
  • Tagged tox.ini and tagged tests — upstream test matrix and behavior tests. Accessed 2026-07-23.
  • Tagged simpy/core.py — authoritative Environment.run(), step(), queue tuple, and StopSimulation implementation. Accessed 2026-07-23.

PyPI file hashes observed 2026-07-23:

  • wheel simpy-4.1.2-py3-none-any.whl SHA-256 43071f84b6512c9b4fcb33ef057f240ccb1d1f3b263f9b4f9229d072e310b372;
  • sdist simpy-4.1.2.tar.gz SHA-256 76ef36b71e0436ba94e55febc001c78879e493a323f045bbcfbb0b216e9b1fbc.

Use the pinned package command in SKILL.md; hashes are recorded for provenance, not embedded into uv pip install syntax.

Official SimPy 4.1.2 documentation

Entry points

All accessed 2026-07-23. The examples index covers condition events, interrupts, Resource, PreemptiveResource, Container, Store, shared events, and process waiting.

Core topical guides

All accessed 2026-07-23.

API pages

All accessed 2026-07-23.

Source-level semantic finding

The 4.1.2 Environments topical guide informally says Event-based run() returns when the Event has been processed. The 4.1.2 API docstring says "triggered." Tagged core.py is decisive:

  • run(until=event) appends StopSimulation.callback;
  • step() sets callbacks to None, executes them, catches StopSimulation, restores callbacks remaining after the stopping callback, and reschedules that Event at priority -1.

Therefore the target value can be returned while target.processed is still false, until one more step processes the rescheduled empty-callback Event. This was reproduced under the exact PyPI 4.1.2 wheel on Python 3.13 and is covered by the repository-level tests/simpy/test_scripts.py.

Numeric run(until=time) creates an urgent internal stop Event, so normal Events at that exact time are excluded. This was verified from both tagged source and runtime tests.

Primary simulation-method sources

These sources describe simulation-study design and output analysis. They are not SimPy API documentation.

Research queries used

Parallel searches/extractions covered:

  • latest SimPy stable version, Python support, PyPI files, GitLab tags/changelog;
  • Environment/Event/Process/Timeout/Condition and scheduling;
  • all Resource, Container, and Store variants;
  • interrupts, monitoring, stepping, real-time, examples, API, and testing config;
  • independent replications, confidence intervals, warm-up/transient bias, random streams, conceptual modeling, V&V, sensitivity, and reproducibility.

No Parallel JSON artifacts were written into the repository.