The libraryFree book
The SimPy Handbook
A practical guide to discrete-event simulation in Python: the patterns behind queues, factories and service desks, explained in plain English beside code you can run tonight. Free, in exchange for nothing grander than an email address.
Get the free copy
The PDF and companion code arrive within minutes, and new chapters follow as the guide grows. Occasional simulation notes too; unsubscribe whenever you like.
Prefer a bound copy? The paperback is on Amazon.
- Title
- Simulation in Python with SimPy: Discover how to make practical simulations in Python
- Author
- Harry Munro, CEng MIMechE
- Format
- PDF eBook with runnable companion code
- Readers
- 2,000+ engineers and analysts
- Updates
- New chapters and examples, sent to readers at no charge
- Also available
- Paperback, via Amazon
- Price
- One email address
01 The problem
Written for the gap the tutorials leave
Teaching yourself SimPy from the public internet is a curious experience. The documentation tells you precisely what every class does and almost nothing about what to build with it; the tutorials escort you politely as far as a car wash and then wave you off; the forum threads have a habit of ending one reply before the answer. None of it is wrong. It is simply not a method.
This handbook is the missing middle. It collects the patterns a working simulationist actually reaches for, queues that misbehave, resources that fail, processes that interrupt one another, and sets each beside code you can run as written, adapt to your own system and put to work the same afternoon. More than a decade of professional modelling, reduced to the parts you will use.
02 The contents
Five threads, each ending in code
The handbook is short on theory and long on patterns. These are the five it teaches.
-
The fundamentals
Environments, processes, events and resources: the small vocabulary from which every discrete-event model is built.
-
Real systems
Queues, production lines and service desks, modelled as they actually behave; arrival by arrival, breakdown by breakdown.
-
Code that lasts
Structure that keeps a model clean, maintainable and fit for production, rather than trapped forever in a notebook.
-
What-if experiments
Questions answered in simulation before they cost anything in reality; which is, after all, the entire point of the exercise.
-
Debugging and validation
The practitioner habits for finding out whether a model deserves the trust you are about to place in it.
03 The notices
What readers say
I have worked extensively with simulation tools throughout my career. Harry's guide to SimPy provided clarity and practical insights beyond what I've encountered in official documentation. I believe this guide will be highly valuable to professionals and researchers alike.
Harry consistently impressed me with his mastery of both the technical side of simulation modelling and coding as well as the nuanced aspects of simulation project management. He possesses a rare combination of modelling expertise and a keen understanding of how to translate complex business needs into effective simulation models. His leadership, focus on results and exceptional communication skills make him an ideal person to learn from.
Rory Greig Research Engineer at Google DeepMind Harry is the ultimate professional when it comes to simulation. I had the privilege of working alongside him at Anglo American, where he led the creation of a cutting-edge simulation product from scratch. Harry's ability to bridge simulation, software and systems engineering while keeping everything practical and results-focused is unmatched. If you're considering learning simulation from Harry, you couldn't be in better hands.
Chris Samiullah Technical Programme Manager at Pydantic Harry's expertise spans the entire simulation lifecycle; from engaging with stakeholders to gather clear requirements, to modelling, designing and developing SimPy simulations, as well as analysis and communication of results. If you wish to master every aspect of applying simulation to improve business decisions, then Harry is an expert guide.
Dr Peter Malkin Principal Operations Researcher at CloudNC Working with Harry was an incredible learning experience. His technical mastery of simulation is impressive, but what really sets him apart is his ability to align simulation projects with real-world business challenges. He's also a brilliant teacher; patient, enthusiastic and genuinely invested in helping others succeed.
Dr Alastair Heggie Senior Modelling and Simulation Engineer 04 The author
About Harry Munro
05 The signup
Where shall we send it?
The book and the code are free, and they remain yours whether or not you stay on the list.
Get the free copy
Unsubscribe whenever you like; the book stays yours.
Your details are handled as described in the privacy policy. Prefer a bound copy? The paperback is on Amazon. And when you are ready for more than a book, the Simulation Bootcamp is the next step.