| Title: | Tools for Supply Chain Management, Demand and Supply Planning |
|---|---|
| Description: | Perform flexible and quick calculations for Demand and Supply Planning, such as projected inventories and coverages, as well as replenishment plan. For any time bucket, daily, weekly or monthly, and any granularity level, product or group of products. |
| Authors: | Nicolas Nguyen [aut, cre] |
| Maintainer: | Nicolas Nguyen <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.6.5 |
| Built: | 2026-09-28 12:52:16 UTC |
| Source: | https://github.com/nguyennico/planr |
This dataset contains the basic features to calculate the allocation of a Demand between different receiving entities. Just 5 key features are needed for this: a DFU, a Period, a Demand, an initial Opening Inventory and a Supply Plan. And the breakdown of the Demand by receiving entities, here 5 different Distributors. The idea is to use this dataset to calculate a constrained demand for each Product, on top of the projected inventories & coverages. And to allocate this constrained demand based on the percentage of demand that each receiving entities represents for a given period of time. It's a concept of fair allocation. A constrained demand is a possible demand, which can be answered considering the projected inventories. Then we can apply on this dataset the const_dmd() function, it will add 2 variables : a Constrained.Demand and a Current.Stock.Available.Tag . The Constrained.Demand is the Demand which can be answered considering the projected inventories, i.e which quantity can be answered and when it can be answered. The function alloc_dmd() will allocate this constrained demand between receiving entities.
data(alloc_data)data(alloc_data)
A data frame with 85 rows and 10 variables
DFU, an item
Period, a date
Dist1, a consumption in units related to the distributor 1
Dist2, a consumption in units related to the distributor 2
Dist3, a consumption in units related to the distributor 3
Dist4, a consumption in units related to the distributor 4
Dist5, a consumption in units related to the distributor 5
Demand, a consumption in units
Opening, available inventories at the beginning in units
Supply, a Replenishment Plan in units
Nicolas Nguyen [email protected]
Allocates a constrained demand between receiving entities
alloc_dmd(dataset, DFU, Period, Demand, Opening, Supply)alloc_dmd(dataset, DFU, Period, Demand, Opening, Supply)
dataset |
a dataframe with the demand and supply features for an item per period |
DFU |
name of an item, a SKU, or a node like an item x location |
Period |
a period of time monthly or weekly buckets for example |
Demand |
the quantity of an item planned to be consumed in units for a given period |
Opening |
the opening inventories of an item in units at the beginning of the horizon |
Supply |
the quantity of an item planned to be supplied in units for a given period |
a dataframe with the calculated Projected Inventories and Coverages as well as the total Constrained Demand and the allocated demand between receiving entities
alloc_dmd(dataset = alloc_data, DFU, Period, Demand, Opening, Supply)alloc_dmd(dataset = alloc_data, DFU, Period, Demand, Opening, Supply)
This dataset contains the basic features to calculate projected inventories and coverages. And also 2 additional info: a minimum and maximum targets of stock coverage. We can apply on it the proj_inv() function, it will return calculated projected inventories and coverages as well as an analysis of the position of the projected inventories versus the minimum and maximum stocks targets.
data(blueprint)data(blueprint)
A data frame with 520 rows and 7 variables
DFU, an item
Period, a date
Demand, a consumption in units
Opening, available inventories at the beginning in units
Supply, a Replenishment Plan in units
Min.Cov, a Minimum Stocks Targets in number of Periods
Max.Cov, a Maximum Stocks Targets in number of Periods
Nicolas Nguyen [email protected]
This dataset contains the basic features to calculate a Replenishment Plan (also called DRP) and its related projected inventories and coverages. We can apply on it the drp() function, it will return the calculated Replenishment Plan and its related projected inventories and coverages.
data(blueprint_drp)data(blueprint_drp)
A data frame with 520 rows and 9 variables
DFU, an item
Period, a date
Demand, a consumption in units
Opening, available inventories at the beginning in units
Supply, a Replenishment Plan in units
FH, defines the Frozen and Free Horizon. It has 2 values: Frozen or Free. If Frozen : no calculation of Replenishment Plan yet, the calculation starts when the period is defined as Free. We can use this parameter to consider some defined productions plans or supplies (allocations, workorders,...) in the short-term for example.
SSCov, the Safety Stock Coverage, expressed in number of periods
DRPCovDur the Frequency of Supply, expressed in number of periods
MOQ the Multiple Order Quantity, expressed in units, 1 by default or a Minimum Order Quantity
Nicolas Nguyen [email protected]
This dataset contains the basic features to calculate projected inventories and coverages. Just 5 features are needed for this: a DFU, a Period, a Demand, an initial Opening Inventory and a Supply Plan. We can apply on it the light_proj_inv() function, it will return calculated projected inventories and coverages.
data(blueprint_light)data(blueprint_light)
A data frame with 520 rows and 5 variables
DFU, an item
Period, a date
Demand, a consumption in units
Opening, available inventories at the beginning in units
Supply, a Replenishment Plan in units
Nicolas Nguyen [email protected]
Calculates the Projected Inventories and Coverages as well as the Constrained Demand and informs a Tag about the part of the Demand already covered by the Opening Inventories
const_dmd(dataset, DFU, Period, Demand, Opening, Supply)const_dmd(dataset, DFU, Period, Demand, Opening, Supply)
dataset |
a dataframe with the demand and supply features for an item per period |
DFU |
name of an item, a SKU, or a node like an item x location |
Period |
a period of time monthly or weekly buckets for example |
Demand |
the quantity of an item planned to be consumed in units for a given period |
Opening |
the opening inventories of an item in units at the beginning of the horizon |
Supply |
the quantity of an item planned to be supplied in units for a given period |
a dataframe with the calculated Projected Inventories and Coverages as well as the Constrained Demand and a Tag informing the part of the Demand already covered by the Opening Inventories
const_dmd(dataset = demo_const_dmd, DFU, Period, Demand, Opening, Supply)const_dmd(dataset = demo_const_dmd, DFU, Period, Demand, Opening, Supply)
Calculates the calculated coverage expressed in volume of a coverage initially expressed in periods of time
cov_vol(dataset, DFU, Period, Demand, Coverage)cov_vol(dataset, DFU, Period, Demand, Coverage)
dataset |
a dataframe with the demand and supply features for an item per period |
DFU |
name of an item, a SKU, or a node like an item x location |
Period |
a period of time monthly or weekly buckets for example |
Demand |
the quantity of an item planned to be consumed in units for a given period |
Coverage |
the defined Coverage, expressed in number of periods |
a dataframe with the calculated coverage expressed in volume
cov_vol(dataset = cov_vol_data, DFU, Period, Demand, Coverage)cov_vol(dataset = cov_vol_data, DFU, Period, Demand, Coverage)
This dataset contains the basic features to convert a coverage expressed in periods into a coverage expressed in units We can apply on it the cov_vol() function, it will return the related coverage in units
data(cov_vol_data)data(cov_vol_data)
A data frame with 520 rows and 4 variables
DFU, an item
Period, a date
Demand, a consumption in units
Coverage the targeted coverage that we want to convert, expressed in number of periods
Nicolas Nguyen [email protected]
This dataset contains the basic features to calculate projected inventories and coverages. Just 5 features are needed for this: a DFU, a Period, a Demand, an initial Opening Inventory and a Supply Plan. The idea is to use this dataset to calculate a constrained demand for each Product, on top of the projected inventories & coverages. A constrained demand is a possible demand, which can be answered considering the projected inventories. Then we can apply on this dataset the const_dmd() function, it will add 2 variables : a Constrained.Demand and a Current.Stock.Available.Tag . The Constrained.Demand is the Demand which can be answered considering the projected inventories, i.e which quantity can be answered and when it can be answered. The Current.Stock.Available.Tag informs the part of the Demand which is already covered by the Opening Inventories.
data(demo_const_dmd)data(demo_const_dmd)
A data frame with 144 rows and 5 variables
DFU, an item
Period, a date
Demand, a consumption in units
Opening, available inventories at the beginning in units
Supply, a Replenishment Plan in units
Nicolas Nguyen [email protected]
This dataset contains the detailed ETA and ETD for the current and next in transit, as well as the Transit Time for a defined DFU. ETA stands for Estimated Time of Arrival. ETD stands for Estimated Time of Departure. There are 2 types of in transit : the current in transit and the next one, not yet shipped. There are 6 variables in this dataset: a DFU, a Period, an ETA Current Goods In Transit, an ETD & ETA Next Goods In Transit, and a Transit Time. Note that the diffrence between ETD and ETA is the Transit Time. The idea is to use this dataset to project the Goods In Transit. We can apply on this dataset the proj_git() function, it will calculate the Proj.GIT which gathers the current and next In Transit quantities.
data(demo_in_transit)data(demo_in_transit)
A data frame with 447 rows and 6 variables
DFU, a location and an item
Period, a date in weekly bucket format
ETA.Current, some quantities currently in transit displayed at their ETA date in units
ETA.Next, some quantities to be shipped, not yet in transit, displayed at their ETA date in units
ETD.Next, some quantities to be shipped, not yet in transit, displayed at their ETD date in units
TLT, the Transit Lead Time, expressed in weeks, represents the difference between ETA and ETD dates
Nicolas Nguyen [email protected]
This dataset contains a set of Monthly Demand for two Products. There are 3 variables: a DFU, a Monthly Period, a Monthly Demand. The idea is to use this dataset to convert the Demand from Monthly into Weekly bucket. We can apply on this dataset the month_to_week() function, it will create a weekly bucket Period and convert the Demand from Monthly into Weekly bucket.
data(demo_monthly_dmd)data(demo_monthly_dmd)
A data frame with 24 rows and 3 variables
DFU, an item
Period, a date in monthly format
Demand, a consumption in units
Nicolas Nguyen [email protected]
Calculates a Replenishment Plan (also called DRP : Distribution Requirement Planning) and the related Projected Inventories and Coverages
drp(dataset, DFU, Period, Demand, Opening, Supply, SSCov, DRPCovDur, MOQ, FH)drp(dataset, DFU, Period, Demand, Opening, Supply, SSCov, DRPCovDur, MOQ, FH)
dataset |
a dataframe with the demand and supply features for an item per period |
DFU |
name of an item, a SKU, or a node like an item x location |
Period |
a period of time monthly or weekly buckets for example |
Demand |
the quantity of an item planned to be consumed in units for a given period |
Opening |
the opening inventories of an item in units at the beginning of the horizon |
Supply |
the quantity of an item planned to be supplied in units for a given period |
SSCov |
the Safety Stock Coverage, expressed in number of periods |
DRPCovDur |
the Frequency of Supply, expressed in number of periods |
MOQ |
the Multiple Order Quantity, expressed in units, 1 by default or a multiple of a Minimum Order Quantity |
FH |
defines the Frozen and Free Horizon. It has 2 values: Frozen or Free. If Frozen : no calculation of Replenishment Plan yet, the calculation starts when the period is defined as Free. We can use this parameter to consider some defined productions plans or supplies (allocations, workorders,...) in the short-term for example. |
a dataframe with the calculated Replenishment Plan and related Projected inventories and Coverages
drp(dataset = blueprint_drp, DFU, Period, Demand, Opening, Supply, SSCov, DRPCovDur, MOQ, FH)drp(dataset = blueprint_drp, DFU, Period, Demand, Opening, Supply, SSCov, DRPCovDur, MOQ, FH)
Calculates the Projected Coverages related to Projected Inventories
inv_to_cov(dataset, DFU, Period, Inventories, Demand)inv_to_cov(dataset, DFU, Period, Inventories, Demand)
dataset |
a dataframe with the demand forecasts and projected inventories for an item per period |
DFU |
name of an item, a SKU, or a node like an item x location |
Period |
a period of time monthly or weekly buckets for example |
Inventories |
the projected inventories that we aim to convert into their related projected coverages |
Demand |
the quantity of an item planned to be consumed in units for a given period |
a dataframe with the calculated Projected Coverages
inv_to_cov(dataset = inventories_data, DFU, Period, Inventories, Demand)inv_to_cov(dataset = inventories_data, DFU, Period, Inventories, Demand)
This dataset contains the basic features to convert projected inventories into their related projected coverage expressed in periods We can apply on it the inv_to_cov() function, it will return the related coverage in periods
data(inventories_data)data(inventories_data)
A data frame with 72 rows and 4 variables
DFU, an item
Period, a date
Inventories, projected inventories in units that we want to convert in coverage
Demand, a consumption in units
Nicolas Nguyen [email protected]
Calculates projected inventories and coverages
light_proj_inv(dataset, DFU, Period, Demand, Opening, Supply)light_proj_inv(dataset, DFU, Period, Demand, Opening, Supply)
dataset |
a dataframe with the demand and supply features for an item per period |
DFU |
name of an item, a SKU, or a node like an item x location |
Period |
a period of time monthly or weekly buckets for example |
Demand |
the quantity of an item planned to be consumed in units for a given period |
Opening |
the opening inventories of an item in units at the beginning of the horizon |
Supply |
the quantity of an item planned to be supplied in units for a given period |
a dataframe with the calculated projected inventories and coverages and the related analysis
light_proj_inv(dataset = blueprint_light, DFU, Period, Demand, Opening, Supply)light_proj_inv(dataset = blueprint_light, DFU, Period, Demand, Opening, Supply)
Convert a Demand expressed in Monthly buckets into Weekly buckets
month_to_week(dataset, DFU, Period, Demand)month_to_week(dataset, DFU, Period, Demand)
dataset |
a dataframe with the demand in monthly bucket for each item |
DFU |
name of an item, a SKU, or a node like an item x location |
Period |
a monthly period of time that we want to convert into weekly buckets |
Demand |
the quantity of an item planned to be consumed in units for a given period |
a dataframe with the Demand expressed in weekly buckets for each item
month_to_week(dataset = demo_monthly_dmd, DFU, Period, Demand)month_to_week(dataset = demo_monthly_dmd, DFU, Period, Demand)
Convert a Demand expressed in Monthly buckets into Weekly buckets
month_to_weekx(dataset, DFU, W1, W2, W3, W4, Period, Demand)month_to_weekx(dataset, DFU, W1, W2, W3, W4, Period, Demand)
dataset |
a dataframe with the demand in monthly bucket for each item |
DFU |
name of an item, a SKU, or a node like an item x location |
W1 |
percentage of demand done during the first week |
W2 |
percentage of demand done during the second week |
W3 |
percentage of demand done during the third week |
W4 |
percentage of demand done during the fourth week |
Period |
a monthly period of time that we want to convert into weekly buckets |
Demand |
the quantity of an item planned to be consumed in units for a given period |
a dataframe with the Demand expressed in weekly buckets for each item
month_to_week(dataset = demo_monthly_dmd, DFU, Period, Demand)month_to_week(dataset = demo_monthly_dmd, DFU, Period, Demand)
Calculates the projected in transit for a defined DFU
proj_git(dataset, DFU, Period, ETA.Current, ETA.Next, ETD.Next, TLT)proj_git(dataset, DFU, Period, ETA.Current, ETA.Next, ETD.Next, TLT)
dataset |
a dataframe which contains the different variable below for each DFU |
DFU |
name of a node, which is an item x location |
Period |
a period of time, expressed in weekly bucket |
ETA.Current |
quantities currently in transit displayed at their ETA date in units |
ETA.Next |
quantities to be shipped, not yet in transit, displayed at their ETA date in units |
ETD.Next |
quantities to be shipped, not yet in transit, displayed at their ETD date in units |
TLT |
Transit Lead Time, expressed in weeks, represents the difference between ETA and ETD dates |
a dataframe with the projected in transit quantity calculated for each DFU
proj_git(dataset = demo_in_transit, DFU, Period, ETA.Current, ETA.Next, ETD.Next, TLT)proj_git(dataset = demo_in_transit, DFU, Period, ETA.Current, ETA.Next, ETD.Next, TLT)
Calculates projected inventories and coverages and perform an analysis vs stocks targets
proj_inv(dataset, DFU, Period, Demand, Opening, Supply, Min.Cov, Max.Cov)proj_inv(dataset, DFU, Period, Demand, Opening, Supply, Min.Cov, Max.Cov)
dataset |
a dataframe with the demand and supply features for an item per period |
DFU |
name of an item, a SKU, or a node like an item x location |
Period |
a period of time monthly or weekly buckets for example |
Demand |
the quantity of an item planned to be consumed in units for a given period |
Opening |
the opening inventories of an item in units at the beginning of the horizon |
Supply |
the quantity of an item planned to be supplied in units for a given period |
Min.Cov |
minimum stocks target of an item expressed in periods |
Max.Cov |
maximum stocks target of an item expressed in periods |
a dataframe with the calculated projected inventories and coverages and the related analysis
proj_inv(dataset = blueprint, DFU, Period, Demand, Opening, Supply, Min.Cov, Max.Cov)proj_inv(dataset = blueprint, DFU, Period, Demand, Opening, Supply, Min.Cov, Max.Cov)
This dataset contains the detailed Opening Inventories for two Products. There are 4 variables: a DFU, a Period, a Demand and the breakdown of the Opening Inventories by expiry date or minimum Remaining Shelf Life for use. The idea is to use this dataset to calculate the Short Shelf Life quantities, called here SSL Qty. We can apply on this dataset the ssl() function, it will calculate a SSL Qty field.
data(slob)data(slob)
A data frame with 44 rows and 4 variables
DFU, an item
Period, a date in monthly format
Demand, a consumption in units
Opening, the breakdown of the opening inventories in units by expiry date
Nicolas Nguyen [email protected]
Calculates the short shelf life of an opening inventories, also called obsolescence risks
ssl(dataset, DFU, Period, Demand, Opening)ssl(dataset, DFU, Period, Demand, Opening)
dataset |
a dataframe with the demand in weekly or monthly bucket for each item |
DFU |
name of an item, a SKU, or a node like an item x location |
Period |
a period of time, expressed in monthly or weekly bucket |
Demand |
the quantity of an item planned to be consumed in units for a given period |
Opening |
the breakdown of the opening inventories by expiry date, or percentage of minimum remaining shelflife for use |
a dataframe with the SSL.Qty related to the Opening Inventories of each item
ssl(dataset = slob, DFU, Period, Demand, Opening)ssl(dataset = slob, DFU, Period, Demand, Opening)