1.Functional Description
1.1Purpose
This function will generate the forecast numbers for Method 11, Exponential 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 11 - Simulate Exponential Smoothing
 If NumberOfBuckets is less than MonthsBestFit + ExponNumberOfMonths
 Move '1' to Data Error
 End Function
 Else
 Subtract MonthsBestFit from LastBucketPosition to get $X
 Move 0 to $$SIM
 Do MonthsBestFit times
 Subtract (ExponNumberOfMonths - 1) from $X
 Move 1 to $I
 Move 0 to $AVG
 Do ExponNumberOfMonths times incrementing $X and $I
 If AlphaFactor is not equal to zeroes
 If $I is equal to 1
 Move 1 to $ALPHA
 Else
 Move AlphaFactor to $ALPHA
 Else
 Divide 2 by ($X + 1) to get $ALPHA
 End
 Subtract $ALPHA from 1 to get $ALPH1
 
 If ForecastAmounts is not equal to '1'
 Multiply PntrActualSales,$X by $ALPHA to get $1
 Else
 Multiply PntrActualAmounts,$X by $ALPHA to get $1
 End
 Multiply $AVG by $ALPH1 to get $2
 Add $1 and $2 to get $AVG
 End
 If MeanAbsoluteDeviation is not equal to '1'
 Add $AVG to $$SIM
 Else
 If ForecastAmounts is not equal to '1'
 Subtract $AVG from PntrActualSales,$X to get $DIFF
 Else
 Subtract $AVG from PntrActualAmounts,$X to get $DIFF
 End
 Add $DIFF to $$SIM
 End
 End
 If MeanAbsoluteDeviation is not equal to '1'
 If ForecastAmounts is not equal to '1'
 Divide $$SIM by QtyBestFit to give Method Yield
 Else
 Divide $$SIM 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 'B' 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 'B' to Method
 End
 End
 End
^
D3400900 - Forecast Simulate Method 11
| 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 | EV01 | 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 | MATH01 | MATH_NUMERIC | NONE | NONE | 
- - - Good Performance Low Value.  | ||||
| idPtrToActualValues | GENLNG | ID | NONE | NONE | 
General purpose ID variable.  | ||||
| mnExponNumberOfMonths | MATH01 | MATH_NUMERIC | NONE | NONE | 
- - - Good Performance Low Value.  | ||||
| mnAlphaFactor | MATH01 | MATH_NUMERIC | NONE | NONE | 
- - - Good 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 |