Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Models queues, shared resources and timed events in Python with SimPy's process-based discrete-event simulation for logistics and networks.
86% 95%+9 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 19 of 22 without it.
I need an in-memory storage buffer that holds Python dataclass objects in FIFO order with maximum capacity 10, where producer processes add items and consumer processes fetch them. Which resource class should be instantiated?
Uses Store to hold arbitrary Python objects in FIFO order
3 of 3 safety checks passed
SimPy is a process-based discrete-event simulation framework using standard Python generators. Model systems where entities (customers, vehicles, packets) interact with shared resources (servers, machines, bandwidth) over time, with event-driven scheduling and optional real-time synchronization.
solve_ivp# pip install simpy
import simpy
import random
import simpy
import random
def customer(env, name, server):
"""Customer arrives, waits for server, gets served, departs."""
arrival = env.now
with server.request() as req:
yield req # Wait in queue
wait = env.now - arrival
yield env.timeout(random.expovariate(1/3)) # Service time
print(f'{name}: waited {wait:.1f}, served at {env.now:.1f}')
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.