ForecastSimulateMethod11

Forecast Simulate Method 11

Major Business Rule

Object Name: B3400900

Parent DLL: CMFG

Location: Client/Server

Language: C

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


^

Data Structure

D3400900 - Forecast Simulate Method 11

Parameter NameData ItemData TypeReq/OptI/O/Both
mnNumberOfBucketsMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnQtyBestFitMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnAmtBestFitMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

cMethodEV01charNONENONE

An option that specifies the type of processing for an event.

cDataErrorERRcharNONENONE

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 
external parameter data structure of the Data Dictionary Server.

cForecastAmountsEV01charNONENONE

An option that specifies the type of processing for an event.

mnMethodYieldMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnBestFitMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnLastBucketPositionMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

idPtrToActualValuesGENLNGIDNONENONE

General purpose ID variable.

mnExponNumberOfMonthsMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnAlphaFactorMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnMonthsBestFitMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

cMeanAbsoluteDeviationEV01charNONENONE

An option that specifies the type of processing for an event.

Related Functions

B3401050 Forecast Accumulate Actuals

Related Tables

None