simpy

Model discrete-event systems with SimPy processes and shared resources.

322|45|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Microck/ordinary-claude-skills --skill simpy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simpy
Source: https://github.com/Microck/ordinary-claude-skills/tree/main/simpy
Command: npx skills add https://github.com/Microck/ordinary-claude-skills --skill simpy

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Modeling and optimizing complex systems with interacting entities, shared resources, and time-based events (like manufacturing lines or service queues) is challenging without a flexible simulation framework. This Skill leverages SimPy for process-based discrete-event simulations in Python.

Core Features & Use Cases

  • Process-Based Modeling: Define system behavior using Python generator functions for entities, resources, and events.
  • Resource Management: Simulate contention for limited resources (servers, machines, containers) and analyze their utilization.
  • Queue Analysis & Optimization: Study waiting lines, service times, and throughput to identify bottlenecks and improve system efficiency.
  • Use Case: If you need to optimize the flow of customers through a service center with limited staff, use this skill to build a SimPy simulation. You can model customer arrivals, service times, and staff capacity to analyze wait times and staff utilization, helping you make data-driven decisions.

Quick Start

Create a basic SimPy simulation with two processes that each wait for 5 time units and print their start and finish times.

Frequently Asked Questions about simpy

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

FAQPage Schema
How do I model discrete-event systems with interacting processes and shared resources?

Discrete-event simulation models time-based systems by scheduling events and managing resource contention. SimPy uses Python generators to define processes, track resource allocation, and advance simulated time, letting you analyze manufacturing lines, service queues, and logistics networks without building custom event engines.

Can I use SimPy to optimize queue performance and identify bottlenecks?

Yes. SimPy simulates queue behavior by modeling customer arrivals, service times, and resource capacity. You collect wait times, throughput, and utilization metrics to identify bottlenecks and test staffing or process changes before deployment.

What's the difference between discrete-event simulation and continuous modeling?

Discrete-event simulation advances time in steps triggered by scheduled events—ideal for systems with distinct arrivals, departures, and state changes like manufacturing or service centers. Continuous modeling solves differential equations for smoothly changing systems. SimPy handles discrete-event scenarios.

Do I need programming experience to build a SimPy simulation?

You need Python familiarity, particularly generator functions and basic object-oriented patterns. SimPy abstracts event scheduling and time management, so you focus on defining processes and resources rather than low-level mechanics.

How do I collect and analyze data from a SimPy simulation run?

SimPy's event-driven architecture lets you attach monitoring logic to processes and resources. Log metrics during simulation execution—wait times, resource utilization, event timestamps—then export to CSV or pandas for statistical analysis and visualization.

Can SimPy handle real-time execution or only accelerated simulated time?

SimPy runs in simulated time by default, advancing instantly through events for fast analysis. You can integrate real-time delays if needed, but the strength is running thousands of simulated years in seconds to stress-test system designs.