r/SimPy • • Sep 09 '24

r/SimPy New Members Intro

2 Upvotes

If you’re new to the community, introduce yourself!

What do you do for fun? What’s your background? What are you looking forward to in the future?


r/SimPy • • Sep 08 '24

Using SimPy in work

2 Upvotes

I first came across SimPy in 2014 when working for the London Underground. I ended up developing simulations of depots and complex sites like termini and junctions to help steer engineering decisions. For example: “10 new trains will be added to this line, how does the depot need to be changed such that the same level of daily availability can be met?”

We also made simple animations in tkinter which were surprisingly easy to make. Fast forward a few years and 4 people in the team are programming simulations in SimPy. I’ve since moved on but I understand the same simulations and built on and used today!

Curious to hear others’ experiences of using SimPy in the workplace?


r/SimPy • • Sep 05 '24

Some Helpful Resources

2 Upvotes

SimPy official documentation: https://simpy.readthedocs.io/en/latest/

Code on GitLab: https://gitlab.com/team-simpy/simpy

A free guide to SimPy (required email signup): http://www.teachem.digital


r/SimPy • • May 29 '26

[Release] Dynamic DES v0.8.1: Dual-mode execution (batch and real-time) from a single simulation codebase

1 Upvotes

Hey r/SimPy,

In version 0.8.1 of Dynamic DES, a new feature has been introduced to solve a common architectural issue when using discrete event simulation for machine learning data pipelines: managing schema mismatches between training and inference environments.

Typically, generating synthetic data for ML requires two distinct data pipelines:

  1. Historical Batch Data: Massive datasets (e.g., Parquet files in S3) for model training.

  2. Live Event Streaming: Real-time event streams (e.g., Kafka) for testing production inference pipelines.

Maintaining separate simulation codebases to handle these two environments often leads to schema drift and redundant engineering effort.

The latest release allows the exact same simulation logic to serve both environments by adjusting the clock scaling factor and swapping the egress connector:

  • Batch Mode (Fast-Forward): Setting factor=0.0 runs the simulation at maximum computational speed without waiting for wall-clock time. A new Parquet Egress connector chunks, compresses, and writes schema-enforced historical data directly to Object Storage (S3 or SeaweedFS).

  • Real-Time Mode (Streaming): Changing the pacing factor=1.0 slows the simulation to match real-world time. Swapping the egress to Kafka streams the identical event schemas live to feed deployed models.

The primary goal of this architecture is to ensure absolute schema parity between historical training sets and live inference streams while reusing 100% of the simulation engine code.


r/SimPy • • Nov 30 '24

Does anyone have any other recommendations for transport modelling?

Thumbnail reddit.com
1 Upvotes

r/SimPy • • Nov 29 '24

Has anyone worked on SimPy projects that require custom priorities and complex logic?

1 Upvotes

I have a project where I need to to manage patients for a dentist in the waiting room, I need to estimate when patients will enter based on their arrival times and and their appointments, I need also to prioritize patients who have appointments over the others and I need to handle cases where patients who have appointments arrive late or too early, can this be done using SimPy library?

So far, I have tried developing an algorithm using Python and Matplotlib for visualization. For a dentist with only a few patients, the solution works great. However, it struggles in more complex situations, such as when patients without appointments arrive, or when patients with appointments arrive late or early. There are also cases where the dentist arrives late to work or spends extra time on a consultation. My objective is to make the initial estimation as close as possible to the actual start time while avoiding the generation of excessive estimations due to changes. I believe this would enhance the credibility of my estimations.


r/SimPy • • Sep 05 '24

The Engineer’s Way

1 Upvotes

When a project is young and the questions are vast,
And the engineers gather to plan,
They measure and model, they simulate fast,
To make sense of the world if they can.
For the world’s full of numbers, both steady and sly,
And the future's a path none can see—
But give them a system, and charts reaching high,
They’ll show what the outcome shall be.

They’ll start with a question, a humble request:
“What drives this machine we must know?”
They’ll sketch out the pieces, then run with the rest,
In the dance where the data must flow.
With inputs and outputs, assumptions made plain,
They’ll build up a model so tight,
And test it again, through the sun and the rain,
Till it shines in the cold morning light.

But mind you the pitfalls, the variables wild,
For a model’s no better than clay—
If handled too loosely or trusted too mild,
It’ll crack when you send it to play.
So verify swiftly, and validate strong,
Let no idle error slip by,
And only when sure that the outputs belong,
Can you trust it to run or to fly.

Then pass it along to the folks at the head,
The managers keen to decide,
Show them the paths where their choices are led,
And let insight be their guide.
For decisions are forged in the heat of the race,
Where time and the budget press near,
But a model well-tuned will hold steady the pace,
And bring certainty out of the fear.

So here’s to the ones who shape futures untold,
With code and a clear, steady hand—
For the truth in their numbers is worth more than gold,
As they help us to build and to stand.