1.Functional Description
1.1Purpose
This function will generate the forecast numbers for Method 9, Weighted Moving Average, if the
processing option is set to do so. It will also decide if this method is the Best Fit forecast.
1.2Setup Notes and Prerequisites
1.3Special Logic
2.Technical Specifications
Method 9- Simulate Weighted Moving Average
If NumberOfBuckets is less than MonthsBestFit + NumberWeightedPeriods
Move '1' to DataError
End Function
End
Load the 12 period weights into the array Weights with the weight for period 1 in
position 1,
weight 2 in position 2, etc.
Subtract MonthsBestFit from LastBucketPosition to get $X
Move zeroes to $$SIM
Do MonthsBestFit times
Subtract (NumberWeightedPeriods - 1) from $X
Move NumberWeightedPeriods to $I
Move zeroes to $TOT
Do NumberWeightedPeriods times
If ForecastAmounts is not set to '1'
Multiply PntrActualSales,$X by Weights,$I to get $P
Else
Multiply PntrActualAmounts,$X by Weights,$I to get $P
End
Add $P to $TOT
Add 1 to $X
Subtract 1 from $I
End
If MeanAbsoluteDeviation is not equal to '1'
Add $TOT to $$SIM
Else
If ForecastAmounts is not set to '1'
Subtract $TOT from PntrActualSales,$X to get $DIFF
Else
Subtract $TOT from PntrActualAmounts,$X to get $DIFF
End
Add the absolute value of $DIFF to $$SIM
End
End
If MeanAbsoluteDeviation is not equal to '1'
If ForecastAmounts is not equal to '1'
Divide $$SIM by QtyBestFit to get MethodYield
Else
Divide $$SIM by AmtBestFit to get MethodYield
End
Decide if this method is the Best Fit Method
If MethodYield is greater than 1
Subtract 1 from MethodYield to get $SPER
Else
Subtract MethodYield from 1 to get $SPER
End
If $SPER is less than BestFit
Move $SPER to BestFit
Move 9 to Method
End
Else
Divide $$SIM by MonthsBestFit to get MethodYield
Decide if this method is the Best Fit Method
If MethodYield is less than BestFit
Move MethodYield to BestFit
Move 9 to Method
End
End
^
D3400865 - Forecast Simulate Method 9
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnNumberOfBuckets | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnQtyBestFit | MN29D9 | MATH_NUMERIC | NONE | NONE |
This is a generic field used as a work field in Everest. | ||||
mnAmtBestFit | MN29D9 | MATH_NUMERIC | NONE | NONE |
This is a generic field used as a work field in Everest. | ||||
cMethod | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cDataError | ERR | char | NONE | NONE |
The Data Field Error Code field is simply a generic data field to pass an error condition flag. This field is one of the fields that make up the
| ||||
cForecastAmounts | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnMethodYield | MN29D9 | MATH_NUMERIC | NONE | NONE |
This is a generic field used as a work field in Everest. | ||||
mnBestFit | MN29D9 | MATH_NUMERIC | NONE | NONE |
This is a generic field used as a work field in Everest. | ||||
mnLastBucketPosition | MATH02 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance High Value. | ||||
idPtrToActualValues | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
mnWeight1PeriodPrior | MATH03 | MATH_NUMERIC | NONE | NONE |
- - - Bad Performance Low Value. | ||||
mnWeight2PeriodPrior | MATH04 | MATH_NUMERIC | NONE | NONE |
Event point for Math Numeric. | ||||
mnWeight3PeriodPrior | MATH05 | MATH_NUMERIC | NONE | NONE |
Event point for Math Numeric. | ||||
mnWeight4PeriodPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight5PeriodPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight6PeriodPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight7PeriodPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight8PeriodPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight9PeriodPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight10PeriodPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight11PeriodPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight12PeriodPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
cMeanAbsoluteDeviation | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnNumberWeightedPeriods | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnMonthsBestFit | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. |
B3401050 Forecast Accumulate Actuals |
None |