Icon

01_Data_Preparation

Inventory Optimization Use Case: Data Preparation, Modeling and Business Logic Workflow
Annotations and comments
  • Inventory Optimization Use Case Data Preparation, Modeling and Business Logic Workflow Inventory supply and consumption data is loaded, prepared and later forecasted using ARIMA providing the primary output. Secondary output contains various Inventory KPIs calculated from the primary output and original dataset.
  • Data Manipulation
  • Forecasting & Quality Measures
  • Consumption forecast
  • Initial data reader node
  • Calculating Lead Time
  • Calculating time diffs
  • Extracting Year, Month and Week from transaction date
  • Loop for selecting observations for last 36 periods per each parts
  • Calculating mean value and sd of Lead Time for each parts
  • Avreage Inventory for all periods and max tr_date for each parts
  • Calculating mean value and sd of Lead Time for each parts for last 36 periods
  • Raw data with lead time and basic stats of lead time
  • Fixing missing dates
  • Filtering observations for last 36 periods
  • Generating order date
  • Filtering Supply Data
  • Casting Lead Time to Integer
  • Generating YearMonth col
  • ARIMA learner (6, 0, 0)
  • ARIMA predictor - forecasting next 12 periods
  • Appending columns
  • Collecting the results of the forecast
  • Calculating estimation error
  • Filling the gaps for MA with the mean value
  • Calculating moving average of consumption for a window lenght of 3
  • Correcting the year and month columns
  • Fixing MA effect & Negative Predictions
  • Extracting 'year' and 'month' from the alldates column
  • Converting 'alldates' column to date format
  • Running the loop for each part id
  • Unique count of PartId's
  • Aggregating consumption on a monthly level
  • Joining the two tables - inputing missing weeks
  • Adding empty rows for defining initial inventory
  • Remove unused columns
  • Remove ForecastedValue
  • Loop Start for running sum
  • Getting minimum inventory level for each part
  • Calculating mean value of inventory per each parts for last 36 periods
  • Calculating summation of consumption = sold for all periods
  • Calculating summation of consumption = sold for 36 periods
  • Last Inventory
  • Summation of Inventory value
  • Final join for all KPIs
  • Calculating Inventory turn for all periods
  • Calculating Inventory turn for last 36 periods
  • Calculating days to sell for all periods
  • Calculating absolute val of qtychg
  • Inventory value calc
  • Calculating inventory value pctg
  • Filtering TrDate=MaxDate
  • Creating flag TrDate = MaxDate
  • Round Forecast
  • Calculating negative values for consumption
  • Calculating initial inventory
  • Assigning initial inventory, tr_part to empty row
  • running sum for final inventory (for both forecasted and historical values)
  • Calculating running sum
  • Filtering forecasted values
  • Distinguish Historical and Forecast values
  • For Forecasts Consumption = Forecasted
  • Assigning initial inventory to tr_qty_chg
  • Sorting according to date and part number
  • Calculating mean, sd of consumption for each parts
  • Calculating mean value and sd of Lead Time per each parts for last 12 periods
  • Filtering consumption
  • Filtering observations for last 12 periods
  • Concatenating two tables
  • Calculating sd of consumption
  • Joining histrorical values and table with leadtime
  • Join with sd of cons and rest of values
  • Joining forecasted values and table with leadtime sd and mean value
  • Pre safety stock calculation for historical values
  • Pre safety stock calculation for forecasted values
  • Filtering historical values
  • Last Safety Stock
  • Safety stock value calculation
  • Conversion to Date not possible in R (order_date)
  • Last Excess Stock
  • Joining table includes inventory and the table includes inventory
  • Getting Unit Cost
  • Calculating excess stock
  • Calculating Excess Stock Value
  • Filtering Overstocks
  • Excess stock classifcation
  • Add final measure names
  • Unit Cost approximation
  • Mean of Consumption and Supply
  • calculating the absolution error (in a range from 0 to 100)
  • Calculating the 'balanced error'. It's an aggregation of total errors made in forecast divded by the aggregated consumption
  • Forecasted Stock Level
  • Formula for classifying parts according to risk type

Nodes

Extensions

Links