LQF_Machine_Learning_E…
LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine learning, modeling,…
Process-based discrete-event simulation framework in Python. Use this skill when building simulations of systems with processes, queues, resources, and time-based events such as manufacturing systems, service operations, network traffic, logistics, or any system where entities
$ npx -y skills add foryourhealth111-pixel/Vibe-Skills --skill simpy --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/simpyContext preview
The summary Claude sees to decide when to auto-load this skill.
Process-based discrete-event simulation framework in Python. Use this skill when building simulations of systems with processes, queues, resources, and time-based events such as manufacturing systems, service operations, network traffic, logistics, or any system where entities
name: simpy
description: Process-based discrete-event simulation framework in Python. Use this skill when building simulations of systems with processes, queues, resources, and time-based events such as manufacturing systems, service operations, network traffic, logistics, or any system where entities interact with shared resources over time.
license: MIT license
metadata:
skill-author: K-Dense Inc.Use this skill only for SimPy or explicit discrete-event simulation work involving SimPy environments, resources, processes, queues, and event scheduling. Do not use it for generic simulation, Monte Carlo work, agent-based modeling, physics simulation, animation, or SymPy symbolic math unless the user explicitly asks for SimPy.
SimPy is a process-based discrete-event simulation framework based on standard Python. Use SimPy to model systems where entities (customers, vehicles, packets, etc.) interact with each other and compete for shared resources (servers, machines, bandwidth, etc.) over time.
**Core capabilities:**
Use the SimPy skill when:
1. **Modeling discrete-event systems** - Systems where events occur at irregular intervals 2. **Resource contention** - Entities compete for limited resources (servers, machines, staff) 3. **Queue analysis** - Studying waiting lines, service times, and throughput 4. **Process optimization** - Analyzing manufacturing, logistics, or service processes 5. **Network simulation** - Packet routing, bandwidth allocation, latency analysis 6. **Capacity planning** - Determining optimal resource levels for desired performance 7. **System validation** - Testing system behavior before implementation
**Not suitable for:**
import simpy
def process(env, name):
"""A simple process that waits and prints."""
print(f'{name} starting at {env.now}')
yield env.timeout(5)
print(f'{name} finishing at {env.now}')
# Create environment
env = simpy.Environment()
# Start processes
env.process(process(env, 'Process 1'))
env.process(process(env, 'Process 2'))
# Run simulation
env.run(until=10)import simpy
def customer(env, name, resource):
"""Customer requests resource, uses it, then releases."""
with resource.request() as req:
yield req # Wait for resource
print(f'{name} got resource at {env.now}')
yield env.timeout(3) # Use resource
print(f'{name} released resource at {env.now}')
env = simpy.Environment()
server = simpy.Resource(env, capacity=1)
env.process(customer(env, 'Customer 1', server))
env.process(customer(env, 'Customer 2', server))
env.run()The simulation environment manages time and schedules events.
import simpy # Standard environment (runs as fast as possible) env = simpy.Environment(initial_time=0) # Real-time environment (synchronized with wall-clock) import simpy.rt env_rt = simpy.rt.RealtimeEnvironment(factor=1.0) # Run simulation env.run(until=100) # Run until time 100 env.run() # Run until no events remain
Processes are defined using Python generator functions (functions with `yield` statements).
def my_process(env, param1, param2):
"""Process that yields events to pause execution."""
print(f'Starting at {env.now}')
# Wait for time to pass
yield env.timeout(5)
print(f'Resumed at {env.now}')
# Wait for another event
yield env.timeout(3)
print(f'Done at {env.now}')
return 'result'
# Start the process
env.process(my_process(env, 'value1', 'value2'))Events are the fundamental mechanism for process synchronization. Processes yield events and resume when those events are triggered.
**Common event types:**
SimPy provides several resource types for different scenarios. For comprehensive details, see `references/resources.md`.
| Resource Type | Use Case | |---------------|----------| | Resource | Limited capacity (servers, machines) | | PriorityResource | Priority-based queuing | | PreemptiveResource | High-priority can interrupt low-priority | | Container | Bulk materials (fuel, water) | | Store | Python object storage (FIFO) | | FilterStore | Selective item retrieval | | PriorityStore | Priority-ordered items |
import simpy env = simpy.Environment() # Basic resource (e.g., servers) resource = simpy.Resource(env, capacity=2) # Priority resource priority_resource = simpy.PriorityResource(env, capacity=1) # Container (e.g., fuel tank) fuel_tank = simpy.Container(env, capacity=100, init=50) # Store (e.g., warehouse) warehouse = simpy.Store(env, capacity=10)
import simpy
import random
def customer(env, name, server):
arrival = env.now
with server.request() as req:
yield req
wait = env.now - arrival
print(f'{name} waited {wait:.2f}, served at {env.now}')
yield env.timeout(random.uniform(2, 4))
def customer_generator(env, server):Intelligent Skill routing and workflow orchestration for AI agents — +21.12 pp reward, −29.6% tokens on SkillsBench with DeepSeekV4Flash-VE.
Repo: foryourhealth111-pixel/Vibe-Skills
LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine learning, modeling,…
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection,…
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code,…
Access real-time and historical stock market data, forex rates, cryptocurrency prices, commodities, economic indicators, and 50+ technical indicators via the…
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex…