SimPy Performance Optimization: Making Simulations Faster
Your simulation works. But it's slow. Here's how to fix that.
Read More →Insights, articles, and tutorials on simulation, Python, and SimPy from the School of Simulation.
Your simulation works. But it's slow. Here's how to fix that.
Read More →Your simulation starts. Then stops. No error. No output. Just... nothing.
Read More →You wrote the code. You ran the simulation. Nothing happened.
Read More →Something's broken. You need to find it. Here's how.
Read More →Every SimPy error message has a story. Here are the ones you'll meet.
Read More →Simulation tells you what happens. Optimisation tells you what's best.
Read More →Static charts tell a story. Animation tells it better. Watch your simulation unfold in real time.
Read More →Python's random module is fine. NumPy's random is better. More distributions. Better seeding. Faster analysis.
Read More →Numbers tell the story. Visualisations make people believe it.
Read More →SimPy generates data. pandas makes sense of it. Together, they're unstoppable.
Read More →Production lines are sequences of stations connected by buffers. Material flows from start to finish. Bottlenecks determine throughput. Simulation finds them.
Read More →Warehouses are logistics engines. Goods flow in, get stored, get picked, and flow out. Simulation reveals the bottlenecks between receive and ship.
Read More →Airports are complex systems under constant pressure. Passengers flow through multiple touchpoints. Delays cascade. Simulation helps you see where things go...
Read More →The machine shop is a classic simulation problem. Jobs arrive. Machines process them. Breakdowns happen. The question: can you meet your deadlines?
Read More →Restaurants are fascinating systems. Multiple resources. Parallel processes. Variable service times. Customer behaviour. All in one simulation.
Read More →Supply chains are networks of queues, buffers, and delays. Orders flow one way. Goods flow the other. Simulation reveals where they get stuck.
Read More →The bank queue is the "Hello World" of simulation. It's simple enough to understand, complex enough to be interesting, and applicable to dozens of other...
Read More →Call centres live and die by their metrics. Average wait time. Abandonment rate. Service level. Simulation helps you hit your targets without overstaffing.
Read More →Hospitals are complex systems. Patients arrive unpredictably. Resources are constrained. Lives depend on getting it right. Simulation helps.
Read More →Manufacturing is where simulation proves its worth. Every minute of downtime costs money. Every bottleneck limits output. SimPy helps you find them before they...
Read More →Real systems have many things happening at once. Customers shopping. Machines running. Trucks delivering. SimPy handles them all.
Read More →Sometimes you don't know when to stop. Run until the queue is empty. Until 1000 customers are served. Until something interesting happens.
Read More →Normal SimPy runs as fast as possible. Simulation years pass in seconds. But sometimes you need simulation time to match real time.
Read More →Real systems have interruptions. Machines break. Priorities change. Shifts end. SimPy lets you model all of this with interrupts.
Read More →Print statements are fine for tiny simulations. Real simulations need proper logging.
Read More →Numbers tell the story. Visualisations make people listen.
Read More →A point estimate without a confidence interval is a guess with false precision. Here's how to do it properly.
Read More →Your simulation starts empty. Reality doesn't. This mismatch corrupts your results unless you handle it properly.
Read More →One simulation run proves nothing. Run it again—different results. Which is right? Both. Neither. You need replications.
Read More →A simulation without statistics is just an animation. You need numbers. Trends. Distributions. Evidence.
Read More →Randomness is the soul of simulation. But uncontrolled randomness is chaos. Here's how to do it right.
Read More →Service times—how long things take—are rarely fixed. Choosing the right distribution makes your simulation realistic or useless.
Read More →Every simulation needs entities entering the system. Customers arrive. Jobs appear. Packets flow. How you model arrivals shapes your entire simulation.
Read More →Servers are the workhorses of simulation. Tills, machines, staff, computers—anything that processes entities and takes time.
Read More →Queues are the bread and butter of discrete event simulation. Customers waiting. Jobs pending. Packets buffering. If you can model a queue, you can model...
Read More →Store gives you the next item. FilterStore lets you be picky.
Read More →Resources count slots. Containers track levels. Stores hold distinct items.
Read More →Not everything is about counting slots. Sometimes you need to model levels—fuel in a tank, items in a buffer, water in a reservoir. That's what Container is...
Read More →PreemptiveResource is the aggressive sibling of PriorityResource. It doesn't just jump the queue—it kicks out whoever's currently using the resource.
Read More →Not all customers are equal. Not all jobs are equally urgent. PriorityResource lets important requests jump the queue.
Read More →Resources are where the interesting stuff happens. Queues form. Waiting occurs. Bottlenecks emerge.
Read More →SimPy is built on Python generators. If generators feel mysterious, SimPy will too. Let's fix that.
Read More →If you've looked at any SimPy code, you've seen yield everywhere. It's not decoration—it's the mechanism that makes simulation work.
Read More →The timeout is the most frequently used event in SimPy. It's how you say "wait for X time units."
Read More →Events are the heartbeat of SimPy. Every time something happens—a timeout expires, a resource becomes available, a process completes—that's an event.
Read More →If the environment is the heart of SimPy, processes are the muscles. They do the actual work.
Read More →The SimPy Environment is the least glamorous and most important part of every simulation. It's the clock, the scheduler, and the coordinator all in one.
Read More →AnyLogic is the Swiss Army knife of simulation—it does agent-based, system dynamics, and discrete-event simulation in one package. SimPy does discrete-event...
Read More →Arena is the Microsoft Office of simulation software—ubiquitous, expensive, and often used because it's what everyone else uses. SimPy is the open-source...
Read More →Simulation is powerful. But it's not always the right tool.
Read More →You don't need a week to learn SimPy. You need ten minutes and this guide.
Read More →Every programming journey starts with "Hello World." Simulation is no different—except instead of printing text, we're modelling events over time.
Read More →The installation process for SimPy is not exactly complicated. Open a terminal. Run one command. Done.
Read More →If you've ever Googled "discrete event simulation Python," you've probably stumbled across SimPy. But what actually is it? And more importantly, should you...
Read More →Discrete event simulation sounds academic. It's not. It's one of the most practical tools an engineer can learn.
Read More →A head-to-head comparison of Gemini CLI and Claude Code (Opus) for writing SimPy simulations. Discover which AI tool comes out on top for conciseness, accuracy, and intelligence.
Read More →Explore the new era of 'vibe modelling' as Claude 4 Opus excels in a complex simulation benchmark, delivering clean code and near-perfect results. Is this the future of simulation?
Read More →How can you be sure your simulation's settings reflect the future? Learn to build credible models through validation, sensitivity analysis and stakeholder engagement.
Read More →Discover real-world examples of discrete-event simulation. See how it saved one firm $50M, cut hospital wait times by 30%, and optimized supply chains.
Read More →Compare Python's SimPy and salabim simulation libraries. We build an assembly line model in both to see how they tackle the same problem, side-by-side.
Read More →Discover why SimPy is essential for discrete-event simulation in Python, even if you're proficient in coding. Learn about SimPy's core mechanisms.
Read More →Explore how close predictive models can get to reality. Understand the factors influencing model accuracy and their role in decision-making and systems thinking.
Read More →Explore the distinct roles and synergistic relationship between simulation and optimisation. Learn how simulation models provide data to guide optimisation efforts.
Read More →Transform your SimPy simulations from abstract logic into compelling visual stories. Learn static plots, animations, and professional visualisation techniques.
Read More →