simpy

Model discrete-event simulations with Python generators and simpy.Environment.

19|2|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/tondevrel/scientific-agent-skills --skill simpy-tondevrel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simpy
Source: https://github.com/tondevrel/scientific-agent-skills/tree/main/skills/simpy
Command: npx skills add https://github.com/tondevrel/scientific-agent-skills --skill simpy-tondevrel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill enables the creation of discrete-event simulations for modeling complex systems with events occurring at specific points in time, optimizing resource allocation and process flow.

Core Features & Use Cases

  • Process-Based Simulation: Model real-world processes as Python generators.
  • Resource Management: Simulate limited resources like servers, queues, or bandwidth.
  • Use Case: Simulate a hospital emergency room to analyze patient wait times, optimize nurse and doctor allocation, and identify bottlenecks in patient flow.

Quick Start

Use the simpy skill to simulate a basic queuing system with 2 servers and run it for 10 units of time.

Frequently Asked Questions about simpy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a discrete-event simulation in Python for a queuing system?

To run a discrete-event simulation in Python, use simpy.Environment to manage virtual time and simpy.Resource to model limited servers. Define real-world processes as Python generators and execute the environment to simulate event intervals.

What is discrete-event simulation and when should I use it for process modeling?

Discrete-event simulation models system state changes at specific time intervals using virtual time. Use it for process modeling in queuing systems, supply chains, or network traffic to optimize resource allocation and identify process flow bottlenecks.

Can I simulate resource allocation and wait times for a hospital emergency room in Python?

Yes, you can simulate resource allocation for a hospital emergency room by modeling doctors and nurses as simpy.Resource objects. This discrete-event approach analyzes patient wait times and identifies bottlenecks in patient flow using virtual time.

Do I need to install external Python libraries to use this discrete-event simulation Skill?

No, you do not need to install external Python libraries as a prerequisite. The Skill operates with zero dependencies and uses built-in Python generators alongside simpy.Environment and simpy.Resource for event-driven process management.

What is the best way to model limited servers and bandwidth in a network traffic simulation?

The best way to model limited servers and bandwidth in network traffic simulation is using simpy.Resource to represent constrained capacities. This discrete-event approach manages queuing systems by processing events sequentially through Python generators in virtual time.

How does simpy virtual time work with Python generators for event-driven process management?

Simpy virtual time advances by executing Python generators that yield discrete events. This event-driven process management suspends execution until an event occurs, accurately modeling time-based dependencies without real-time waiting.