My Experiments with Simulations

My Experiments with Simulations

Contrary to what you might expect, this piece isn't about whether our world is a simulation.

Rather, I propose that simulation serves not just as a powerful learning tool, but also as a vital component in supply chain strategy.

The Supply Chain Manager in todays day and age is besieged by the "slings and arrows of an outrageous fortune". Though, treading the path of Hamlet, i.e "take up arms...thus by opposing, end them" , is not the answer to the Manager's dilemmas (nor was it for Hamlet).

Instead, I advocate that modelling the supply chain and simulating the vicissitudes of outrageous Murphy, would be the way to go about it; rather than take up arms against: building a robust Supply chain that can channel the shocks into springboards would be the desired outcome.

The model of course would consist of the stocks, the flows, the feedback loops and if you are really getting to work on it, the delays as well (this is when interesting things happen). However, the Model has to be a simplified version of reality.

It's essential to distinguish between detail complexity (stemming from numerous variables) and dynamic complexity (arising from interdependent components where cause and effect are obscured and variable over time), a concept eloquently explained by Senge in "The Fifth Discipline".

So, rather than, let's say, simulating hundreds of products or raw material, abstract the hundreds to one or two, then build the simulation to capture the relationships, the feedback loops and the delays.

Enter Python...

Discarding Shakespeare, for the eloquent Insta influencer: "Python, is just working like a wow!"

In the past couple of weeks, I have been trying to build a user friendly single echelon supply chain model on Python.

The end goal was to make it easy to configure the system constraints and boundary conditions, helping the user get quick feedback without getting bogged down with the nitty gritty of coding.

The below model describes a Voila based web app. I didn't use SimPy, it may have been simpler, but I went the brute force way, this gave me a good understanding of how one could do a simulation on Python.


Step: 1

The first step is to define the capacity of the manufacturing unit.

The below code assumes the capacity is set at the average of monthly demand requirements. Thus, it populates the number of days of production required in each month to satisfy the Month demand. This is just initialisation, I can test the system for various capacities later on.

This way of factorizing the capacity, helps keep the simulation simple. It helps me bring all my parameters to no of days of production for example: FG inventory, lead time, Despatch capacity, storage capacity etc. would be in terms of no. of days of production.

Working days considers weekdays, certain weekends and also takes into consideration mandatory public holidays.

Step: 2

Define the distribution of orders within the month. I had to make one for the rest of the months and another for the month of February. The simulation runs from 1st April 2024 to March 2024.

Below is a view of how one can manipulate the cumulative distribution function of Orders within the month. As you can see, I can simulate various extreme skews in order distribution and test the model.


Step: 3

The rate at which the Finished Goods can be despatched is of course dependent on two parameters, the despatch capacity (I deal with this later) and the truck placement efficiency.

The Truck placement efficiency also follows a distribution function as follows. I can manipulate this to decide what frequency distribution the placement efficiency will follow on a daily basis.

I do the same for Raw material (RM) Lead time variability as well. In this model, I assume there is just a single RM that needs to be serviced for production. The lead time of service would be randomly generated and would follow the frequency distribution below. For example, 30% of the time, it takes 8 days for the RM to connect etc.



Step: 4

The Simulation parameters in days of production would be:

  • RM Reorder Level (ROL): for example 8 would mean, ROL at RM inventory i.e 8 days worth of production capacity.
  • RM MOQ
  • Production range i.e production can fall randomly between let's say 0.8 to 1.1 days of production
  • FG Storage capacity
  • FG derating if storage capacity is exceeded
  • FG Max capacity is the threshold at which production stops due to want of space.
  • FG despatch capacity

The simulation then calculates for the number of Simulations defined, the performance of the System based on:

  • Order SLA (no of days the order that has arrived takes to be despatched)
  • The Target % achievement of SLA across months
  • The probability of achieving or not achieving the %achievement of SLA

The simulator can be tested for various what-ifs and thereby helping us understand our system better, without the detail complexity.


Step: 5

Results.

Of course to understand the % of simulations where the average SLA across the year has been met. Here, of course if the SLA that we decide to achieve is 99% than there is a 8% likelihood that the system will not achieve this on a YTD basis.

Perhaps, look at the results a month level to find how the tides have changed across months.

And also, look at it as a snapshot:

The model can stress test the system in various ways, like: Order skews within month, across months, FG Despatch & storage capacity, Production capacity, Production variability, Truck placement efficiency, to achieve the SLA at an order level and of course see the probability of a achieving this over 100 or more simulations.

I can also plot the number of stock outs, and if there's a certain day in the month I am interested in, I can plot the FG stocks on that day.



Instead of relying on third party softwares to build models, I think an excel or perhaps for more involved simulations Python/R based simulations should be opted for.

Beginner managers would definitely find a lot of learning here.

Other use cases for simulations that I think would be interesting are:

  • Production resource planning, especially for batch manufacturing units. Is also applicable to services industry situations like healthcare etc. Simulating the V, A, T, I type production lines. Here, the Goldratt Simulator does a good job of visualising how a simulator should look like.
  • Warehouse Management: capacity and throughput planning.
  • Inventory Optimisation: Simulating with different Inventory review policies, how much inventory to place at different nodes, re-order levels, safety stock policy at each node,

Post Script:

Though if you are interested in the "world is a simulation" philosophy, here are a couple of links:

https://www.scientificamerican.com/article/confirmed-we-live-in-a-simulation/

https://academic.oup.com/pq/article-abstract/53/211/243/1610975?redirectedFrom=fulltext


Nikhil Zele

Associate General Manager at Asian Paints

1 年

Incredible Experiment Unni !!

Ritesh Baheti

Senior Manager Purchase | Supply Chain Business Finance

1 年

Oh so this was your “What May Come” ! Fab post.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了