Module for representing forecast.
More...
Detailed Description
Module for representing forecast.
The forecast module provides the following functionality:
- A new demand type to model forecasts.
A forecast demand is bucketized. A demand is automatically created for each time bucket.
A calendar is used to define the time buckets to be used.
- Functionality for distributing / profiling forecast numbers into time buckets used for planning.
This functionality is typically used to translate between the time granularity of the sales department (which creates a sales forecast per e.g. calendar month) and the manufacturing department (which creates manufacturing and procurement plans in weekly or daily buckets ).
Another usage is to model a delivery date profile of the customers. Each bucket has a weight that is used to model situations where the demand is not evenly spread across buckets: e.g. when more orders are expected due on a monday than on a friday, or when a peak of orders is expected for delivery near the end of a month.
- A solver for netting orders from the forecast.
As customer orders are being received they need to be deducted from the forecast to avoid double-counting demand.
The netting solver will for each order search for a matching forecast and reduce the remaining net quantity of the forecast.
- A forecasting algorithm to extrapolate historical demand data to the future.
The following classical forecasting methods are implemented:
- single exponential smoothing, which is applicable for constant demands .
- double exponential smoothing, which is applicable for trended demands.
- moving average, which is applicable when there is little demand history to rely on. The forecast method giving the smallest mean absolute deviation (aka "mad"-error) will be automatically picked to produce the forecast.
The algorithm will automatically tune the parameters for the forecasting methods (i.e. alfa for the single exponential smoothing, or alfa and gamma for the double exponential smoothing) to their optimal value. The user can specify minimum and maximum boundaries for the parameters and the maximum allowed number of iterations for the algorithm.
The XML schema extension enabled by this module is (see mod_forecast.xsd):
<xsd:complexType name="demand_forecast">
<xsd:complexContent>
<xsd:extension base="demand">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="calendar" type="calendar" />
<xsd:element name="discrete" type="xsd:boolean" />
<xsd:element name="buckets">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="bucket">
<xsd:complexType>
<xsd:all>
<xsd:element name="total" type="positiveDouble"
minOccurs="0" />
<xsd:element name="net" type="positiveDouble"
minOccurs="0" />
<xsd:element name="consumed" type="positiveDouble"
minOccurs="0" />
<xsd:element name="start" type="xsd:dateTime"
minOccurs="0"/>
<xsd:element name="end" type="xsd:dateTime"
minOccurs="0"/>
</xsd:all>
<xsd:attribute name="total" type="positiveDouble" />
<xsd:attribute name="net" type="positiveDouble" />
<xsd:attribute name="consumed" type="positiveDouble" />
<xsd:attribute name="start" type="xsd:dateTime" />
<xsd:attribute name="end" type="xsd:dateTime" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:choice>
<xsd:attribute name="discrete" type="xsd:boolean" />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="solver_forecast">
<xsd:complexContent>
<xsd:extension base="solver">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="loglevel" type="loglevel" />
</xsd:choice>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
The module support the following configuration parameters:
- Net_CustomerThenItemHierarchy:
As part of the forecast netting a demand is assiociated with a certain forecast. When no matching forecast is found for the customer and item of the demand, frePPLe looks for forecast at higher level customers and items.
This flag allows us to control whether we first search the customer hierarchy and then the item hierarchy, or the other way around.
The default value is true, ie search higher customer levels before searching higher levels of the item.
- Net_MatchUsingDeliveryOperation:
Specifies whether or not a demand and a forecast require to have the same delivery operation to be a match.
The default value is true.
- Net_NetEarly:
Defines how much time before the due date of an order we are allowed to search for a forecast bucket to net from.
The default value is 0, meaning that we can net only from the bucket where the demand is due.
- Net_NetLate:
Defines how much time after the due date of an order we are allowed to search for a forecast bucket to net from.
The default value is 0, meaning that we can net only from the bucket where the demand is due.
- Forecast_Iterations:
Specifies the maximum number of iterations allowed for a forecast method to tune its parameters.
Only positive values are allowed and the default value is 10.
Set the parameter to 1 to disable the tuning and generate a forecast based on the user-supplied parameters.
- Forecast_madAlfa:
Specifies how the MAD forecast error is weighted for different time buckets. The MAD value in the most recent bucket is 1.0, and the weight decreases exponentially for earlier buckets.
Acceptable values are in the interval 0.5 and 1.0, and the default is 0.95.
- Forecast_Skip:
Specifies the number of time series values used to initialize the forecasting method. The forecast error in these bucket isn't counted.
- Forecast_MovingAverage.buckets
This parameter controls the number of buckets to be averaged by the moving average forecast method.
- Forecast_SingleExponential.initialAlfa,
Forecast_SingleExponential.minAlfa,
Forecast_SingleExponential.maxAlfa:
Specifies the initial value and the allowed range of the smoothing parameter in the single exponential forecasting method.
The allowed range is between 0 and 1. Values lower than about 0.05 are not advisible.
- Forecast_DoubleExponential.initialAlfa,
Forecast_DoubleExponential.minAlfa,
Forecast_DoubleExponential.maxAlfa:
Specifies the initial value and the allowed range of the smoothing parameter in the double exponential forecasting method.
The allowed range is between 0 and 1. Values lower than about 0.05 are not advisible.
- Forecast_DoubleExponential.initialGamma,
Forecast_DoubleExponential.minGamma,
Forecast_DoubleExponential.maxGamma:
Specifies the initial value and the allowed range of the trend smoothing parameter in the double exponential forecasting method.
The allowed range is between 0 and 1.
Function Documentation