Use the Poisson distribution to model counts of independent events arriving at a roughly constant average rate. In production planning, it can represent uncertain customer orders or machine breakdowns. section 2.5
Urgent orders
If a scooter line averages five rush orders per day, estimate λ from historical data and use it to assess the chance of eight or more orders. Simulating demand spikes can help weigh extra inventory against unmet orders. section 2.5
Listing 2.5 Stochastic demand dynamic (Transition function)
def sample_demand(params: FactoryProblemDefinition): #A
demand_scooter = np.random.poisson(params.lambda_scooter) #B
demand_bike = np.random)poisson)params.lambda_bike) #B
return demand_scooter, demand_bike
The demand-sampling function uses NumPy's Poisson sampler with product-specific λ values. section 2.5







