This is a guest post by Linnart Felkl M.Sc. and originally appeared on Supply Chain Data Analytics

It has been more than five years now that I graduated from university and entered the corporate world. Since then, I have dedicated most of my time to production and supply chain planning. Besides ERP-based model implementations, such as e.g. lot size optimization or production levelling in SAP, I have always been heavily involved with discrete-event simulation modeling. I have worked with several tools and in this article I will summarize a end-to-end simulation-based poultry supply chain analysis tool that I implemented in Python.

Simulation fosters better understanding of control logics

The simulation tool described by me in the article helped the client in several ways:

The tool optimized a vertically integrated poultry meat processing business in the Mediterranean region. The regulatory framework for poultry meat farming is comprehensive, and while regulatory authorities were not involved in the development and deployment of this simulation tool it could very well serve regulatory authorities in similar ways. Regulatory constraints, such as e.g. All-In All-Out rules (also known in e.g. swine production), were however off course considered by the model and implemented accordingly.

Conceptional poultry supply chain model description

The poultry supply chain comprises many stages. Below figure provides an overview.

The relevant entities that I would like to highlight for a conceptual overview are the following:

Below conceptual model drawing provides another overview of the processes considered by the poultry supply chain simulation tool.

The poultry supply chain is a heavily regulated supply chain. As mentioned regulatory constraints are part of the model. Such rules e.g. aim at reducing the risk of disease spread and they are common to meat production beyond poultry meat production (e.g. swine production).

Control logics, regulations and information flow models

The simulation model comprises a wide range of control logics, rules and order-related information flows. Below table provides an overview.

Egg supplier, customer order logicEgg supplier ships based on order logWith a specified interval, the egg supplier checks the order book and ships the requested quantity
Egg supplier, order shipping logicFull order quantity shippedFull quantity is shipped the same day, but arrives after a specified transportation lead time
Hatchery, inventory management logicInventory for incoming eggs ahead of incubatorOrder point policies control the egg inventory. When demand falls below a specified level, an order is placed at the egg supplier that targets a fixed higher inventory level
Hatchery, incubation and hatching processIncubation and hatching black box processesIncubation and hatching have a specified duration and a specified production capacity. There also is a specified hatching success ratio and a specified mortality
Hatchery, brooding at brooderBrooder process follows incubation and successful hatchingBefore chicks are sent to a farm coop they stay at the brooder for a specified duration. Mortality rates are defined for this process, too
Hatchery, flock assignment to hatchery coopsAfter chicks have stayed at brooder for a minimum specified amount of time they are forwarded to a farm coopFarm coops must be ready for a new flock, and toms and hens cannot be mixed. Farm coops have different capacities, as they are located at different farms. Chickens should be assigned to coops with the least excess capacity
Farm coops, chicken growthChicken growth in farm coop differs from chicken species and sexChickens, depending on their sex and species, stay at the farm coop for a specified amount of time. This duration time models chicken growth until slaughter ready weight
Farm coops, forwarding chicken turkey to slaughterChickens forwarded to slaughterhouse when matureOnce chickens have reached slaughter-ready weight they are forwarded if the slaughterhouse has capacity. Otherwise they wait in the farm coop. After that the farm coop is sanitized. At this stage, relevant regulatory rules considered and embedded into the simulation model
Slaughterhouse, slaughter processDaily slaughter processSlaughterhouse slaughters chicken up to a specified maximum daily production capacity
Slaughterhouse, carcass inventoryProduction on stock, but demand-pulled inventoryThe meat processor pulls its carcass demand from the slaughterhouse inventory
Slaughterhouse, order backlogMeat processor places backlog at slaughterhouse if carcass inventory does not sufficeBacklog is satisfied in the upcoming production cycle and carcass is only produced on stock if no backlog orders are open
Slaughterhouse, external chicken purchaseExternal chicken are purchased if slaughterhouse inventory and current slaughter process volume is too lowIf demand for poultry carcass is higher than the carcass inventory and the carcass currently in production external poultry is purchased and slaughtered, occupying production capacity accordingly. Externally purchased poultry is always slaughtered first
Meat processor, carcass demandCarcass demand distribution, to be pulled from slaughterhouse carcass inventoryDifferent demand models can be implemented. For example, a deterministic or stochastic demand schedule can be implemented with specified demand by period

All of the logic summarized in above table was parametrized. Related values are adjustable in a configuration file. This allows users to run different scenarios, thereby gaining a better understanding of the supply chain.

Simulation model implementation in Python using SimPy

Throughout the past 5 years of model development, I have worked with various tools and software for discrete-event simulation modeling. Some popular tools are FlexSim, simio, AnyLogic, SIEMENS Plant Simulation, VisualComponents, Simul8 and many more. Many commercial simulation tools exist, and all of the just mentioned ones are commercial software. This model, however, I developed in SimPy, a discrete-event simulation framework in Python. This framework is free – but that was not the reason why I chose it.

SimPy is pure code. It does not have a graphical user interface (GUI) that the model developer can use for model development. It furthermore does not have any inbuilt model visualization. In other words, building and verifying a model in SimPy is highly abstract – but, since it is pure Python code, it is also highly flexible. For supply chain modeling, with many different entities and a wide range of possible control logics, this makes SimPy a good choice. In combination with object-oriented programming, that is. Object oriented programming is a requirement in this case, as it allows for framework development and appropriate structuring of the very complex task of modeling a supply chain with all its processes and entities. Users of the model do however need to have some understanding of Python.

Exemplary model output and results

In this section I display some exemplary model output that the poultry supply chain simulator generates. Data is collected and displayed in chicken units, i.e. unit neutral. This delivers a solid foundation for calculating relevant KPIs on top of that. Relevant KPIs could be costs and weight. Such KPIs can be implemented for clients on demand, by adding some few lines of code to the supply chain simulator.

Below chart shows inventory development at the slaughterhouse, i.e. carcass inventory. Too much inventory would result in high holding costs, and ultimately it would mean that carcass would have to be disposed of due to expiration dates and related policies.

Carcass inventory according to poultry supply chain simulator

Above chart shows inventory development at the slaughterhouse throughout one simulated year with 52 weeks (simulation periods). In this run, each week was one iteration of the simulation run. Inventory development at the slaughterhouse is directly connected to backlog development. This development can be seen on below graph.

Carcass backlog according to poultry production simulator

As becomes clear from above chart, no carcass inventory built up at the slaughterhouse because the slaughterhouse was always running behind meat processor demand, resulting in significant backlog.

Due to the existing backlog ordering policies at the slaughterhouse, high backlog triggered high purchasing orders at external poultry farms. Since externally purchased poultry is always slaughtered first, this resulted in excess inventory at the brooder, as it is waiting for farm coops to clear.

Brooder chicken population size resulting from poultry supply chain simulation

The brooder itself had no capacity limit, and the hatchery was thus not impacted by the production bottleneck ahead. This becomes clear from below inventory curve for eggs at the hatchery.

Inventory development in poultry supply chain simulation

Egg inventory development at the hatchery was stable.

Final remarks on poultry supply chain simulation

In this article, I demonstrated how discrete-event simulation is a powerful tool for modeling and analyzing poultry supply chains. The benefits of deploying a supply chain simulator are manifold, with all benefits ultimately aiming at supply chain cost reduction and availability (i.e. customer satisfaction) improvement. This is especially important in a poultry supply chain, as high inventory holdings result in e.g. carcass expiration and disposal. Deploying a supply chain simulator helped my client gain a better understanding about existing supply chain control logics and policies, and equipped the supply chain management team with an effective communication, training and analysis tool.

If you are interested in discrete-event simulation you may also be interested in some of the following related publications: