CreatePlanningEngine Macro
This macro is used to create new planning engine based on a planning engine definition. This macro is executed at a system level.
For executing the macro, the value for the Command field must be specified in this format:
CreatePlanningEngine([Planning Engine Name], [Planning Engine Display Name], Planning Engine Definition, [Category],[Roles],[Stop on End Status],[Tags],[Calendar],[StartPeriod],[Horizon],[Cycle],[Level]).
The table lists the parameters used to execute the CreatePlanningEngine macro.
Parameter Name | Description |
---|---|
Planning Engine Name |
The name of the planning engine created based on the Planning Definition. Allows use of variables such as %date%, %time%, %datetime%, %PlanningEngineCycle% and application variables. Example: Weekly Supply_%date% would create a Planning Engine "Weekly Supply_20200327". Note: Date and time
variables are based on the Coordinated Universal Time (UTC) at run-time.
Note: Planning
engine is created with the name ‘’Cycle.StartPeriod’’, when Cycle parameter is
specified and no name is defined for planning engine Name.
|
Planning Engine Display Name |
The display name of the created planning engine. Allows use of variables such as %date%, %time%, %datetime%, %PlanningEngineCycle% and application variables. Note: Date and time variables will be based on Coordinated Universal Time
(UTC).
Null = Planning Engine Display name is not populated (resulting in Planning Engine name used when viewing the Planning Engine Display Name). |
Planning Engine Definition |
The Planning Engine Definition used to create the Planning Engine. The Planning Engine Definition must have Status = Ready to create planning engine. |
Category |
The Category given to the created Planning Engine. Note: If this value
is not defined, the value of Category is set to null.
|
Roles |
The roles given to the created Planning Engine in the format: Role1, Role2. Note: If no roles
are defined (Null), the Roles in the Planning Engine Definition are used.
|
Stop on End Status |
The status of the macro which cause the macro to stop. It can be set as specified:
|
Tags |
The Tags associated with the Planning Engine in the format: Tag1, Tag2. Note: If no tags are
defined (Null), the Tags in the Planning Engine Definition are used.
Note: Macro fails
when Null and no Tags are defined in the Planning Engine Definition.
|
Calendar |
The SCP calendar name to be used in the planning engine. Note: Calendar
parameter must be used in conjunction with StartPeriod and Horizon
parameters.
Note: Application
variables can be used to determine the calendar used.
|
StartPeriod |
The Start Period of the Planning engine. The StartPeriod must exist at the level defined within the specified Calendar. Note: StartPeriod
Parameter must be used in conjunction with Calendar and Horizon parameters.
|
Horizon |
The Number of buckets to be created for the planning engine, starting from and including the StartPeriod. Note: Horizon
parameter must be used in conjunction with Calendar and StartPeriod.
Note: Application
variables can be used to determine the horizon used.
|
Cycle |
The cycle associated with the New Planning Engine. |
Level |
The calendar level based on which the Planning Engine Calendar is created. Note: If calendar level is not defined, the base level of the calendar is used.
|
This table lists the examples of the CreatePlanningEngine macro:
Requirement | Syntax |
---|---|
Create a new planning engine "Weekly Supply Plan FY19 W29" based on a planning engine definition "SP_SCO". The role and Tags given to new Planning engine is from Planning Engine Definition. The Planning engine does not have a calendar created as part of the macro. |
CreatePlanningEngine("Weekly Supply Plan FY19 W29","","SP_SCO","","","","","","","","","") |
Create a new planning engine "Weekly Supply Plan FY19 W29" based on a planning engine definition "SP_SCO" and a calendar based on "Weekly Calendar" with a start Period of "FY19 W29" (which must exist at the base level of the Calendar) and horizon of 52. The Planning Engine is assigned the Category "Weekly Supply Plan". The role and Tags given to new Planning engine is from the Planning Engine Definition. |
CreatePlanningEngine("Weekly Supply Plan FY19 W29","","SP_SCO","Weekly Supply Plan","","","","Weekly Calendar","FY19 W29","52","","") |
Create a new planning engine called Week_20200407 (where Week_20200407 is the UTC date at run-time) %date% based on Planning Engine definition "SP_SCO" with a display name of "Weekly Supply Plan_Week_20200407" and a calendar based on "Weekly Calendar" with a start Period of "FY19 W29" (which must exist at the base level of the Calendar) and horizon of 52. The Planning Engine is assigned the category "Weekly Plans" and given the role "Planning Engine Normal" and Tag "Advanced Planning". |
CreatePlanningEngine("Week_%date%", "Weekly Supply Plan_%date%, "SP_SCO", "Weekly Plans, "Planning Engine Normal","","Advanced Planning","Weekly Calendar","FY19 W29","52","","") |
Create a new planning engine called Monthly SCO.FY19 M07 based on Planning Engine definition "SP_SCO" and cycle "Monthly SCO" with a calendar based on "Weekly Calendar" with a start Period of "FY19 M07" at the Calendar Level "Months" and horizon of 12. The Planning Engine is assigned the category "Monthly Plans" and given the role "Planning Engine Normal" and Tag "Advanced Planning". |
CreatePlanningEngine("", "", "SP_SCO", "Monthly Plans, "Planning Engine Normal","","Advanced Planning","Weekly Calendar","FY19 M07","12","Monthly SCO","Months") |