Skip to content

Inventory Optimization tool devloppped in the scope of my master's thesis

Notifications You must be signed in to change notification settings

Ervin66/Inventory-Optimization

Repository files navigation

Inventory-Optimization

Inventory Lot Size Optimization tool devloppped in the scope of my master's thesis

This tool was developped in order to address the need of a company to have a standardized process of performing inventory lot size optimization. A mathematical model was created and later implemented with the help of the PuLP library. The model can be solved using various open-source and commercial solvers. Additional capabilitites include the ability to resolve a model stored in memory while modifying some of the constraints and a bi-objective extension of the mathematical model which is then solved using the epsilon constraint.

Mathematical Model

Introduction

This model was intended to solve the problem of Company X which suffered from high level of inventories while providing low service levels. For this purpose, a multi-commodity, capacitated, three-echelons inventory lot sizing model will be presented. This model considers holding costs, production costs, transportation costs between the facilities and shortage costs occurring from lost sales while respecting the holding capacity limitations at the different facilities and production capacity at the first echelon.

Throughout the model, the unit for expressing the amount of product will be in pallets which do not have to be entire pallets (i.e., no integer requirement). The products have to be produced at the first echelon whilst taking lead time into consideration if the product in question is internally produced. This lead time will vary depending on the product. Enough quantities should be produced in order to satisfy demand occurring at the producing facilities and the shipments required by the lower echelon in order to satisfy their respective demand.

At the second echelon, shipments sent in the prior time periods are received which should be enough to cover for the demand occurring at that location, the shipments needed at the last echelon and the safety stock requirements which can be offset by the inventory carried over from the previous time period.

Finally, warehouses belonging to the last echelon receive shipments from the preceding echelons in quantities which should again cover their demand together with a smaller safety stock requirement. There is also the possibility to transfer the inventory from previous time periods.

The origin and destination of the shipments is determined by the cost matrix of sending a full-truck load between those two locations given that the capacity constraints have not been reached. Additionally, the shipments occur in multiple of 33 which represent the maximum number of pallets transported in a full-truck load.

Further, a distinction is made between products produced by Company X and those produced by external suppliers. For internal SKUs, the lead time is accounted for the first echelon whilst for external SKUs it is assumed that a lead time of one time period (one week) is sufficient.

Sets

The set of time period is given by:

t ∊ T = {1, 2,…,|T|}

The set of products is indexed by:

i ∊ I = {1, 2,…,|I|}

The subset of products produced internally is indexed by:

k ∊ K = {1, 2,…,|K|}

The subset of products supplied externally is indexed by:

e ∊ E = {1, 2,…,|E|}

The set of facilities is indexed by:

w ∊ W = {1, 2,..,|W|}

The subset of facilities in the first echelon is indexed by:

f ∊ F = {1, 2,…,|F|} and F ⊆ W

the subset of central warehouses is indexed by:

d ∊ D = {1, 2,…,|D|} and D ⊆ W

The subset of regional warehouses is indexed by:

j ∊ J = {1, 2,… ,|J|} and J ⊆ W

The set of all external factories is indexed by:

o ∊ O = {1, 2,…,|O|}

The set of factories that are allowed to receive shipments from other factories is denoted by:

g ∊ G = {1, 2, …,, |G|} and G ⊆ F

Variables

In order to account for the inventory present in the system, a variable is introduced which reflects the inventory levels present at the end of a time period. For all, i ∊ I, w ∊ W and t ∊ T, let

iiwt: Inventory level for product I at facility w at the end of period t

The decision variable representing the shipments between the facilities is defined for all i ∊ I, o ∊ W, d ∊ W and t ∊ T, let

sodit: Shipment for product i from facility o to facility d at time t

Since costs are computed on a full-truck load basis, the shipments need to be aggregated per FTL, this variable represents the number of full-truck load going between two facilities during a certain time period which is given by, for all o ∊ W, d ∊ W and t ∊ T let

fodt: the amount of full truck load going between facility o and d at time t

The production is also accounted for in order to measure production costs as well as to ensure production capacity is not exceeded. For all, k ∊ K, f ∊ F and t ∊ T let

pfkt: Production of product i at facility f at time t

As the minimum amount of a production run is restricted, a binary variable indicating whether production is taking place or not is needed. For all k ∊ K, t ∊ T let

ykt: 1 if the production of product k is taking place in time period t, 0 otherwise

The last variable will measure by how much (in pallets) the demand was not satisfied for a given period. For all, I ∊ I, w ∊ W and t ∊ T, let

lsiwt: lost sales for product I at facility w at time t

Parameters

Parameters Holding costs are dependent per product and location at which they are being held. Within this model, they are denoted by:

Chiw: holding costs for product i at facility w

Production costs only vary per product since each product has a unique production site. They are denoted by:

Cpi: production costs of product i

Transportation costs are defined on a full-truck load basis. They are denoted by:

Dod: cost of sending a full-truck load from facility o to facility d

The shortage costs need to be defined in order to penalise not meeting the demand. As this value is purely theoretical it is equal for all products. It is given by:

Cs: shortage cost when demand is not met

The lead time for each product was provided and varies depending on the product. In the model, lead time is only considered for internally produced articles as it assumed that other suppliers always have enough products on hand. The following notation is used: lti: lead time for product k

In this model, safety stock is a parameter. It is given by:

SSiw: safety stock level for product i at facility w

Objective

Let the holding costs be defined by:

The transportation costs are then given by the following function:

The production costs are then given by:

The following cost function representing the stock-out costs is devised:

The different cost functions are then combined to form the objective function of a Mixed-Integer Linear Program (MILP)

Constraints

In order to ensure that demand is satisfied at the first echelon as well as enough that enough internal SKUs products will be shipped to the following echelons, the following constraint is needed:

In order to produce meaningful results in the initial time periods, lead time is assumed to be of one week until the time period being iterated over surpasses the lead time for that SKU. In practice, this gives place to the following constraint:

For the next echelon, a similar constraint is required, which will provide its inventory balance. The shipments from the echelon above sent in the previous time period are received while shipment sent to the next echelon are deducted. This is where most of the safety stock is also held which gives the following constraint:

The third echelon inventory balance follows a similar logic. The major difference is that shipments can only be received as this is the last echelon. As prior, enough products should be supplied to satisfy the SKU specific demand, this is given by the following constraint:

. In certain cases, demand takes place for articles in factories that are not produced at said location. This usually occurs when orders are placed for multiple articles at a facility of the first echelon. By allowing it, shipments can be consolidated. This is the only case where lateral shipments can happen. The inventory balance for lateral shipments is given by:

Next, the inventory balance constraints that will treat external SKUs need to be defined. The principle remains largely the same but the variable involved slightly differs as the supply is no longer insured by the first echelon but by shipment originating from outside of Company X’s network. For the first echelon, the inventory balance is given by the following constraint:

At the second echelon, the equation is similar as in Equation 35, where shipments from the first echelon are replaced by external shipments, it can be formulated as such:

The inventory balance for external products at the third echelon is given by:

In order to ensure that the safety stock is held at the relevant locations, the next constraint is introduced:

The initial inventory is set to be enough for the demand occurring in the first period and the eventual safety stock requirement, this is given by the following equation:

In order to define the variable representing the full-truck load all shipments at given time between a given origin-destination pair are aggregated and divided by 33, the following formula is used:

As the amount produced cannot exceed the capacity at each of the facilities member of the first echelon, the next constraint is needed:

Similarly, the holding capacity for all facilities in the supply chain needs to be respected. This is defined by the following constraint:

The following two constraints ensure that the minimum batch production size is respected and a big-M constraint is also needed for the first constraint to hold:

The last set of constraints ensure that non-negativity and binarity in the case of the production setup variable.

bi-objective extension

The already formulated model while containing different cost function components, deals solely with improving economical performances but it is worthwhile to enlarge the focus of the model to other business considerations. For this purpose, a second objective will be added which this time considers the service level provided by a certain solution. For this purpose, a new variable is introduced which will measure the service level: sl: the average service level over the complete planning horizon

Complimentary to this new variable, a new constraint is required to reflect its purpose:

The epsilon constraint is then implemented this way:

until the model is no longer solvable.

About

Inventory Optimization tool devloppped in the scope of my master's thesis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages