Nick pfp
Nick

@nt

Building a simulation of the one of the biggest problems in supply chains worldwide: the bullwhip effect: A supply chain is the chain of companies that produces all of the things you buy every day. Every company in the chain takes some raw materials from upstream, changes/combines them into a product, and sells downstream. The interesting thing is: while we can conceptualise it as a chain/graph of companies supplying each other, each of those companies likely has a very limited view of that bigger picture - they see orders from their customers, and then they place orders to their suppliers. They have very little idea of what happens in other parts of the bigger system. E.g. if one of the supplier's suppliers faces an issue that causes a delay, they will see only the impact to their own delivery timelines. Often times this creates dynamics similar to a game of telephone - where by having limited connectivity, the information travelling through a connected chain gets seriously distorted. Just like a bullwhip, a small change at the start of the supply chain can cause tremendous disruptions as it travels down the chain. For example: a small spike in demand from consumers might be misinterpreted by a shop as a new trend, so they might place a relatively larger order to their wholesaler, who then interprets this as an even bigger trend than the shop, and place an even bigger order with their distributor. Such a small change in demand might cause a stock outage 5 or 6 links further down the chain. This feels quite similar to an investment bubble, where the last investors see the biggest %+ change and feel confident investing disproportionately large amounts, even though the change is actually caused by people before them doing the exact same thing. I wrote a quick model of a supply chain, where each player is independently controlled by gpt-5. Every week they see incoming demand and decide how much to order from their supplier, next in line. Their job is to manage their inventory, keeping it small (to avoid warehousing costs) whilst making sure they have enough supply to handle orders. After running the simulation for many weeks, you can see in the graph below how tiny changes in consumer demand (grey line) cause chaos in order flow. Orders from the retailer aren't perfect, but they're relatively tame to what happens at the factory, which experienced huge stock-outs and had to overcorrect to carry a huge inventory that stuck around for half a year during low season. Supply chains would be much more efficient if every part could talk to every other. But in reality, supply chains are actually dense graphs, where every part is often in low-trust competition with its neighbour and even customer! Sharing information can often lead to leverage against you - e.g. in commercial negotiations between customers and suppliers. Despite the complexity of the consequences of the bullwhip effect, the decisions made at each step are actually quite simple - how much stock to keep, how much to order from neighbours in the chain, how to price inventory to stimulate demand. Perhaps this is one of those things we can train AI models to do better, and perhaps they might even be able to smooth out some of the chaos.
0 reply
0 recast
10 reactions