You are on page 1of 5

VRS User Manual

Name:

vrs variable response smoothing.


Usage: vrs (product_type, vrsConfigParams, vrsControlParams, vrsInitParams, vrsState, history, seasonality, forecast, mad, sdts, madts, trip, exceptions [, override, vrsBypassParams] ) Desription: Generates a smoothened forecast value based on history and other input parameters. product_type Numeric code indicating the type of the product. One of: 0 Constant 1 Extra Slow 2 Slow 3 Medium 4 Fast 5 Very Fast 6 Lumpy vrsConfigParams A Lua table with following fields. alpha_mad_init Table containing initial values of alpha_mad for every product type. e.g.
config.alpha_mad_init = {0.03, 0.05, 0.08, 0.1, 0.2, 0.3, 0.03}

mad_dd_factor Table containing array of MAD initialization factors. Every element contains the minimum DD for which the corresponding MAD factor should be used. Should be sorted in the decreasing order of DD.

e.g.
config.mad_dd_factor = {} config.mad_dd_factor[1] = config.mad_dd_factor[2] = config.mad_dd_factor[3] = config.mad_dd_factor[4] = {10, 0.4} {5, 0.5} {2, 0.6} {0, 0.8}

This implies,
if DD >= 10 then MAD_Factor = 0.4 else if DD >= 5 then MAD_Factor = 0.5 else if DD >= 2 then MAD_Factor = 0.6 else if DD >= 0 then MAD_Factor = 0.8

vrsControlParams Parameters controlling behavior of VRS. A Lua table with following fields. alpha Smoothing constant used for computing smoothed Signed Deviation. damp Damping factor to apply on tracking signal to get alpha alphaMAD Smoothing constant for MAD. alpha_min Minimum value of the level smoothing constant, alpha. alpha_max Maximum value of the level smoothing constant, alpha. tolerance_high Upper limit for causing a trip on filter test. This is a factor applied to current MAD. tolerance_low Lower limit for causing a trip on filter test. This is a factor applied to current MAD. trip_count number of trips on filter test for upon which updation of state variables is activated CADL Current Absolute Deviation Limit. Unless demand varies more than CADL from forecast, the filter test is not applied, and is considered automatically passed.

DD_change_limits Flag (0 / 1) indicating whether following optional DD change limits are applied. minDD Limiting value of minimum deseasonalized demand. maxDD Limiting value of maximum deseasonalized demand. max_up_change_percent Limiting value of percent increase in deseasonalized demand. max_down_change_percent Limiting value of percent decrease in deseasonalized demand. vrsInitParams VRS initialization parameters. A Lua table with following fields. product_start Index to beginning of product if start period is in stored history. Negative value indicates product is initialized before all of stored history. init_forecast Starting value of demand for initialization. init_length Number of initial periods to use if initializing using average. vrsState VRS state parameters. Used only when product_start is negative. A Lua table with following fields. forecast Last updated forecast value. SDTS Last updated Signed Deviation for Tracking Signal. MADTS Last updated Absolute Deviation for Tracking Signal. MAD Last updated Absolute Deviation for forecast. trip sum of last trip_count trip signals.

history Input measure holding realized history. seasonality Input measure holding seasonality values. forecast Output measure generated holding forecast values. sdts Output measure generated holding smoothed Signed Deviation for Tracking Signal. madts Output measure generated holding smoothed Absolute Deviation for Tracking Signal. mad Output measure generated holding Smoothed Absolute Deviation of forecasts. trip Output measure generated holding filter trips. exceptions Output measure generated holding update exceptions raised. The complete list of exception codes is: 0 No Exception was raised 1 Item classified as LUMPY and sales are zero. 2 Seasonality indicates forecasts are zero. 3 Sales data is negative. 4 Bypass the sales rate update. 5 Bypass and scale sales. 6 Bypass time period. 7 Bypass on below minimum seasonality. 8 Bypass until first sales. 9 Bypass when sales are zero. 10 Bypass when on hand is zero. 11 Bypass when sales and on hand are zero. 12 Bypass periods before promotion. 13 Bypass periods after promotion. 14 Bypass less than current absolute min deviation.

override Optional input measure containing flags to override bypasses. vrsBypassParams Optional table containing bypass parameters. sales_rate_update Optional input Measure. Type flags 0 or 1. scale_sales_rate Optional input Measure. Type number >= 0 time_period Optional input Measure. Type flags 0 or 1. minimum_seasonality Optional input number >= 0. False when 0. until_first_sales Optional input flag. zero_sales Optional input flag. zero_onhand Optional input flag. zero_sales_and_onhand Optional input flag. onhand Input Measure holding on hand values. Required when zero_onhand or zero_sales_and_onhand is true. before_promotion Optional input number >= 0. FALSE when 0, bypasses promoted period only when equals 1. after_promotion Optional input number >= 0. FALSE when 0, bypasses promoted period only when equals 1. promotion Input Measure holding promotion variable. Required when before_promotion or after_promotion is non zero.

You might also like