1.Functional Description
1.1Purpose
This function will generate the forecast numbers for Method 10, Linear Smoothing, 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 10 - Simulate Linear Smoothing
If NumberOfBuckets is less than MonthsBestFit + LinearSmoothingNoMonths
Move '1' to Data Error
End Function
Else
Move Zeros to $$SIM
Multiply LinearSmoothingNoMonths by itself to give $DIV
Add LinearSmoothingNoMonths to $DIV
Divide $DIV by 2
Subtract MonthsBestFit from LastBucketPosition to get $X
Move zeroes to $TOT
Do MonthsBestFit times
Subtract (LinearSmoothingNoMonths - 1) from $X
Do LinearSmoothingNoMonths incrementing $Z and $X
If ForecastAmounts is not equal to '1'
Multiply PntrActualSales,$X by $Z to get $ZOV
Else
Multiply PntrActualAmounts,$X by $Z to get $ZOV
End
Divide $ZOV by $DIV
Add $ZOV to $$SIM
End
If MeanAbsoluteDeviation is not equal to '1'
Add $$SIM to $TOT
Else
If ForecastAmounts is not equal to '1'
Subtract $$SIM from PntrActualSales,$X to get $DIFF
Else
Subtract $$SIM from PntrActualAmounts,$X to get
$DIFF
End
Add the absolute value of $DIFF to $TOT
End
End
If MeanAbsoluteDeviation is not equal to '1'
If ForecastAmounts is not equal to '1'
Divide $TOT by QtyBestFit to give MethodYield
Else
Divide $TOT by AmtBestFit to give 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 'A' to Method
End
Else
Divide $TOT 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 'A' to Method
End
End
End
^
D3400870 - Forecast Simulate Method 10
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. | ||||
mnLinearSmoothingNoMonths | MATH03 | MATH_NUMERIC | NONE | NONE |
- - - Bad Performance Low Value. | ||||
mnMonthsBestFit | 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. |
B3401050 Forecast Accumulate Actuals |
None |