{"schemaVersion":"1.0","record":{"label":"SimPy","description":"Python discrete-event simulation framework for interacting processes and shared resources.","aliases":[],"kind":"software","website":"https://simpy.readthedocs.io/","overview":"SimPy is a Python framework for process-based discrete-event simulation. Models describe interacting activities and limited resources in code, making it suitable for queues, service processes and capacity experiments.","license":"MIT","lifecycle":"active","example":false,"features":[{"name":"Queue and resource simulation","status":"supported","detail":"Code interacting processes with capacity, priority and preemption.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://simpy.readthedocs.io/en/stable/topical_guides/resources.html","locator":"Queues, priority/preemption, containers and stores","retrievedAt":"2026-10-07T09:42:40Z","kind":"vendor"}]},{"name":"Custom monitoring","status":"supported","detail":"Model code can collect process/resource observations into chosen storage.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://simpy.readthedocs.io/en/stable/topical_guides/monitoring.html","locator":"Custom process/resource observations and storage","retrievedAt":"2026-10-07T09:42:32Z","kind":"vendor"}]},{"name":"Continuous-model assistance","status":"unsupported","detail":"The project explicitly offers no dedicated continuous-simulation features.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://simpy.readthedocs.io/en/stable/index.html","locator":"Process-based Python simulation; continuous-model limits","retrievedAt":"2026-10-07T09:42:23Z","kind":"vendor"}]}],"alternatives":[],"slug":"simpy","draftAlternatives":[{"targetSlug":"anylogic","status":"limited","detail":"Substitutes for code-first discrete-event queue and resource models after reimplementation; not the full visual multimethod environment.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://simpy.readthedocs.io/en/stable/index.html","locator":"Process-based Python simulation; continuous-model limits","retrievedAt":"2026-10-07T09:42:23Z","kind":"vendor"},{"url":"https://simpy.readthedocs.io/en/stable/topical_guides/resources.html","locator":"Queues, priority/preemption, containers and stores","retrievedAt":"2026-10-07T09:42:40Z","kind":"vendor"},{"url":"https://anylogic.help/anylogic/multimethod/index.html","locator":"Shared namespace and continuous/discrete interactions","retrievedAt":"2026-10-07T09:37:24Z","kind":"vendor"}]}],"evidence":[{"url":"https://simpy.readthedocs.io/en/stable/index.html","locator":"Process-based Python simulation; continuous-model limits","retrievedAt":"2026-10-07T09:42:23Z","kind":"vendor"},{"url":"https://simpy.readthedocs.io/en/stable/topical_guides/resources.html","locator":"Queues, priority/preemption, containers and stores","retrievedAt":"2026-10-07T09:42:40Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://simpy.readthedocs.io/en/stable/about/license.html","locator":"MIT license","retrievedAt":"2026-10-07T09:42:23Z","id":"sp-license","title":"SimPy license","kind":"vendor"},{"url":"https://simpy.readthedocs.io/en/stable/index.html","locator":"Process-based Python simulation; continuous-model limits","retrievedAt":"2026-10-07T09:42:23Z","id":"sp-home","title":"SimPy overview","kind":"vendor"},{"url":"https://simpy.readthedocs.io/en/stable/topical_guides/resources.html","locator":"Queues, priority/preemption, containers and stores","retrievedAt":"2026-10-07T09:42:40Z","id":"sp-resource","title":"SimPy shared resources","kind":"vendor"},{"url":"https://simpy.readthedocs.io/en/stable/topical_guides/time_and_scheduling.html","locator":"Sequential deterministic execution and equal-time ordering","retrievedAt":"2026-10-07T09:43:15Z","id":"sp-time","title":"SimPy time and scheduling","kind":"vendor"},{"url":"https://simpy.readthedocs.io/en/stable/topical_guides/monitoring.html","locator":"Custom process/resource observations and storage","retrievedAt":"2026-10-07T09:42:32Z","id":"sp-monitor","title":"SimPy monitoring","kind":"vendor"},{"url":"https://anylogic.help/anylogic/multimethod/index.html","locator":"Shared namespace and continuous/discrete interactions","retrievedAt":"2026-10-07T09:37:24Z","id":"al-multi","title":"Combining AnyLogic modeling methods","kind":"vendor"},{"url":"https://anylogic.help/anylogic/introduction/anylogic-professional.html","locator":"Development, debugging and integration","retrievedAt":"2026-10-07T09:37:14Z","id":"al-pro","title":"AnyLogic Professional","kind":"vendor"}],"overviewCitations":["sp-home","sp-resource"],"licenseCitations":["sp-license"],"sections":[{"id":"processes","heading":"Processes and resources","paragraphs":[{"id":"processes-detail","content":[{"text":"Python generators describe activities that wait for events, spend simulated time or acquire resources. The framework distinguishes capacity-limited resources, containers holding interchangeable quantities and stores holding individual objects. Priority and preemption support different service policies. Those distinctions matter when translating a real operation into a model: a pool of identical servers is not the same as a store of machines with different attributes."}],"citations":["sp-home","sp-resource"]}]},{"id":"time","heading":"Simulation time","paragraphs":[{"id":"time-detail","content":[{"text":"Runs can advance as quickly as computation allows, follow wall-clock time or be stepped manually. SimPy processes events sequentially; equal-time events are ordered by scheduling sequence. Parallel activity in the modeled world does not mean parallel execution on the computer. Timing resolution and random-input handling therefore belong in the model's reproducibility checks."}],"citations":["sp-home","sp-time"]}]},{"id":"results","heading":"Observations and output","paragraphs":[{"id":"results-detail","content":[{"text":"Monitoring is designed around the modeler's questions. Process variables, resource utilization and queue lengths can be recorded at intervals or when events occur, then stored in lists, files or databases. This flexibility comes with implementation work: the framework does not automatically choose meaningful statistics or produce a complete analysis report for a new model."}],"citations":["sp-monitor"]}]},{"id":"scope","heading":"Scope and licensing","paragraphs":[{"id":"scope-detail","content":[{"text":"SimPy uses the MIT license and runs as part of a Python program. It is not a ready-made graphical modeling application. Its own overview says it offers no special help for continuous simulation and may be unnecessary for fixed-step processes that never interact. Existing graphical projects need their behavior reimplemented rather than assuming a native import path."}],"citations":["sp-license","sp-home"]}]},{"id":"substitution","heading":"When it substitutes","paragraphs":[{"id":"substitution-detail","content":[{"text":"SimPy can replace the discrete-event portion of "},{"text":"AnyLogic","targetSlug":"anylogic"},{"text":" when a team wants a code-first Python model of queues and resource contention. The assessment does not extend to AnyLogic's complete visual environment, animation or mixed-method tooling. Recreate event rules, observations and validation cases before comparing outcomes."}],"citations":["sp-home","sp-resource","sp-monitor","al-multi","al-pro"]}]}]},"id":"Q1314","revision":1362,"updatedAt":"2026-10-14T03:04:39Z","sourceUrl":"https://substitutefor.net/entities/Q1314?revision=1362"}}