CallForecastEngine macro
This supports the generation of forecasts for the selected item/location at the base-level or a grouped forecast for the selection with output prorated to the appropriate level to store scenario values. This macro is executed at scenario level.
Parameter Name | Description |
---|---|
Engine Name | The name of the forecast engine to call. The engine determines the type of
engine and the default settings. Note: This parameter must be defined for the current
cycle and module.
|
Algorithm | The algorithm used in the forecast generation process. Possible values:
Note:
|
Item hierarchy level | The level (from the item hierarchy) at which the forecast engine generates the
forecasts. Note: If not specified, the default value from the Forecast Engine
Settings is used.
|
Item hierarchy selection | The base elements at the Item hierarchy level to determine the item selection.
The value is passed as a node. For example, ‘Brand A’. Note:
|
Location hierarchy level | The level (from the location hierarchy) at which the forecast engine generates
the forecasts. Note: If not specified, the default value from the Forecast Engine
Settings is used.
|
Location hierarchy selection | The base elements at the Location hierarchy level to determine the location
selection. The value is passed as a node. For example, ‘EMEA’. Note:
|
Optimize | Indicates, optimization process of the forecast engine. Possible values:
Note:
|
Filter | The filter criteria that is applicable for the selected item and location at
the specified Item and Location hierarchy level. Note:
|
On macro execution, the status is changed to ‘Running’ to indicate that the macro is being processed. The status is changed to ‘Completed’ when the process is completed.
When BEST algorithm is used, the macro call the forecast engine with fitModelPickingAlgorithm() which allows the engine to fit using the algorithm with the lowest decision criteria. The selected algorithm is returned as output.
When the algorithms other than BEST, fitModelGivenAlgorithm() is used for calling the forecast engine.
Requirement | Parameters |
---|---|
Call ‘Test Engine’ passing all the default engine settings and calculating for all items and locations. Results are spread using the default spreading measure. | CallForecastEngine("Test Engine") |
Call ‘BATS engine’, using the default engine algorithm, for valid SKU-level items under the Brand A node in the item hierarchy, for Customer-level locations under the US node in the location hierarchy. No spreading is required as the specified levels are equal to the level for storing scenario values. | CallForecastEngine("BATS engine","","","SKU","Brand A","Customer","US") |
Call ‘BATS engine’, using the default engine algorithm, for the aggregated node Brand A in the item hierarchy, for the aggregated Region node US in the location hierarchy. Uses the Spread measure defined in Engine (TUPLE_EXISTS) to spread results to the base item and location Cycle.level to store scenario values. | CallForecastEngine("BATS Engine","","","Brand","Brand A","Region","US") |
Call ‘New Engine’, passing the LEASTSQUARES algorithm, spreading results to base items and locations via TUPLE_EXISTS measure (as defined in the Forecast Engine), calculating all Product Groups and all Regions at monthly calendar level (as specified by the engine's period level). | CallForecastEngine("New Engine","LeastSquares","","Product Groups","","Regions","","","") |
Call ‘Best Fit’, passing the Best (Picking) algorithm, spreading results via Spreading Measure defined in Engine, calculating all Product Groups and all Regions. Parameter optimization is done prior to selecting the algorithm and generating the forecast. | CallForecastEngine("Best Fit","BEST","","Product Groups","","Regions","","","TRUE") |
Validations are performed when you execute the macro. If any of the validation fails, the macro is aborted, and the related error message is displayed.
Cycle Period status | Scenario status | Can Execute? | Validation message |
---|---|---|---|
Pending | N/A | No | Cannot run macro {0} because Cycle Period has status ‘Pending’ |
Running | WIP | Yes | N/A |
Running | Review, Rejected, Stopped, Approved, Published | No | Cannot run macro {0} because Scenario has status {1} |
Paused | Any | No | Cannot run macro {0} because Cycle Period is not ‘running’ |
Completed | Any | No | Cannot run macro {0} because Cycle Period has status ‘Completed’ |
Aborted | Stopped | No | Cannot run macro {0} because Cycle Period has status ‘Aborted’ |
Archived | Any | No | Cannot run macro {0} because Cycle Period has status ‘Archived' |
Validation Condition | Error Message |
---|---|
Check the Forecast engine name exists. | forecast engine {0} cannot be found. |
Where specified, or using defaults defined in the forecast engine settings, ensure the measures are valid for this cycle.Module and Enabled (parameter mappings and spreading measure. | measure "{0}" cannot be found. |
Where specified, or using defaults defined in the forecast engine settings, ensure the item level | item hierarchy level "{0}" cannot be found. |
Where specified, or using defaults defined in the forecast engine settings, ensure the location level is valid. | location hierarchy level "{0}" cannot be found. |
Where specified, or using defaults defined in the forecast engine settings, ensure the period level is valid. Note the specified calendar level must be Months for an engine of type BATS. |
period level {0} cannot be found. period level {0} must be Months or CMonths for engine type=BATS |
Where specified, ensure the item and location nodes are valid. | item {0} cannot be found. location {0} cannot be found. |
Where specified, ensure the algorithm is valid | the specified algorithm {0} is not supported. Valid entries are: (Best, BATS, Crostons, EventsOnly, ExponentialMovingAverage, HoltWinters, LeastSquares, MovingAverage and MultipleRegression). |
Where specified, or using defaults defined in the forecast engine settings, ensure the measures are not defined as Market Intelligence type measures (parameter mappings). | measure "{0}" cannot be of type Market Intelligence. |
Where specified, or using defaults defined in the forecast engine settings, ensure the measures are not defined as Transactional Data type measures (parameter mappings). | measure "{0}" cannot be of type Transactional Data |
Where specified, or using defaults defined in the forecast engine settings, ensure the measures are not defined as Order type measures (parameter mappings). | measure "{0}" cannot be of type Orders. |
User must have permission to run a Forecast Engine | Forecast Generation on module "{0}" is not permitted for user "{1}" |