One-click install
npx skills add https://github.com/tamagusko/linux-cfg --skill simpy-tamagusko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simpy
Source: https://github.com/tamagusko/linux-cfg/tree/main/dotfiles/claude/skills/simpy
Command: npx skills add https://github.com/tamagusko/linux-cfg --skill simpy-tamagusko

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Modeling systems where entities compete for shared resources over time—queues, servers, machines, network bandwidth—is hard to get right with ad-hoc code. This Skill provides structured guidance, templates, and monitoring utilities for building correct discrete-event simulations with SimPy. ## Core Features & Use Cases - Process and Resource Modeling: Define generator-based processes and shared resources (Resource, PriorityResource, PreemptiveResource, Container, Store, FilterStore, PriorityStore) with ready-made patterns for customer-server queues, producer-consumer, and parallel task execution. - Event and Interaction Patterns: Covers timeouts, composite events (AllOf/AnyOf), process interruption, barrier synchronization, and real-time simulation with RealtimeEnvironment. - Monitoring and Statistics: Includes reusable ResourceMonitor, MultiResourceMonitor, and ContainerMonitor classes plus a configurable simulation template with statistics collection and CSV export. - Use Case: Simulate an emergency room with limited doctors to measure average patient wait time and staff utilization before changing staffing levels. ## Quick Start Ask the AI to build a SimPy simulation of a customer service queue with two servers and report average wait times and utilization.

Frequently Asked Questions about simpy

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

FAQPage Schema
How do I build a discrete-event simulation in Python?

Use SimPy to define processes as Python generator functions that yield events like env.timeout(). Create an Environment, add shared resources such as simpy.Resource, start processes with env.process(), and run with env.run(until=time).

How do I model a customer-server queue with SimPy?

Create a simpy.Resource with the server capacity, then have each customer process request the resource using a with resource.request() context manager. A generator process yields exponential inter-arrival timeouts and spawns customer processes continuously.

What is the difference between SimPy Resource, Container, and Store?

Resource models limited-capacity servers, Container holds homogeneous bulk amounts like fuel with put/get by quantity, and Store queues discrete Python objects. FilterStore and PriorityStore add selective or priority-ordered retrieval.

Can SimPy run simulations in real time?

Yes, simpy.rt.RealtimeEnvironment synchronizes simulation time with wall-clock time using a factor parameter, where factor=1.0 maps one simulation unit to one second. Strict mode raises errors when computation exceeds the real-time budget.

When should I not use SimPy for simulation?

SimPy is not suited for continuous simulations with fixed time steps, which fit SciPy ODE solvers better. It also does not apply to independent processes without resource sharing or pure mathematical optimization problems.

How do I measure resource utilization and wait times in SimPy?

Patch or subclass the resource's request and release methods to log queue lengths and timestamps, then compute time-weighted averages. The included ResourceMonitor class automates this and exports results to CSV.