25 Intro
Demand & Supply Planning | S&OP :: with R
We now master the basics of R, for data manipulations and visualizations (ETL, Charts, Tables) and are ready to start practicing on some Demand and Supply Planning cases.
In this chapter, we will present the R package planr, that I’ve especially created for Supply Chain Management.
The goal is to provide some functions to perform quickly some classic operations in the scope of Demand and Supply Planning or to run some parts of the S&OP (Sales & Operations Planning) process.
There are currently 7 groups of functions :
Calculation of projected inventories & coverages :
simple calculation :
light_proj_inv()- based on 3 variables : Demand, Supply and Opening SoH (Stocks On Hand).
calculation & analysis :
proj_inv()- comparing the projected inventories to some stocks (min & max) targets.
Calculation of projected inventories & constrained demand :
const_dmd()- to calculate the possible Demand we can answer (when and how much) based on the projected inventories.
Calculation of Replenishment Plan (also called DRP) :
drp()- considering some classing parameters : safety stocks target, frequency of replenishment, frozen horizon and MOQ (Minimum Order Quantity).
Breakdown of Monthly Demand into Weekly Buckets :
to move from a a high level (monthly) view to a more granular (weekly) one, for a more precise calculation or monitoring.
by default the Demand is evenly distributed among each week using the function
month_to_week().or the Demand can have custom distribution across the weeks, with the function
month_to_weekx().
Calculation of Short Shelf Life (SSL) stocks :
ssl()- considering the expiry dates of some current stocks, to calculate more precise (relevant) projected inventories, and also to project the non-salable stocks.
Projection of In Transit inventories :
proj_git()- knowing the ETD (Estimated Time of Departure) and ETA (Estimated Time of Arrival), to project the stocks which will be in transit between 2 locations.
Projection and Conversion of coverage into volumes :
proj_cov()- to project and get the equivalent in quantity (volume) of a coverage (expressed in periods of time). The quantity being calculated based on the Demand Forecasts.
All the calculations are performed either at monthly or weekly buckets.
To learn how to use those functions, we can refer to the Cheatsheets or Get Started sections of the planr package website and also to the glossary in the appendix section of this book.
To install the CRAN version:
To install the latest development version from GitHub :
Now, let’s explore the different functions of the package!