Set Calendar Range
This command sets the planning horizon to start at start_bucket with the length specified for number_of_buckets. The value of 1 for start_bucket represents the first bucket in the calendar.
- Syntax
Set Calendar Range: <start_bucket>, <number_of_buckets>;
This table list the arguments that are used in the Set Calendar command:
Argument Description start_bucket First bucket to select, where 1 represents the first bucket in the calendar. number_of_buckets Number of buckets to select from the start_bucket. - Log Message
-
This message is logged to indicate the applicable planning horizon, on successful completion:
APACS174=Planning horizon set to start at bucket index {0}, horizon length: {1}
Where, {0} = start bucket index (1 = first bucket)
{1} = number of buckets in the horizon
This table lists the exception conditions and the related error message (if applicable) during the execution of the command:
Exception condition | Message | Level |
---|---|---|
If start bucket is outside of the calendar range, an error is reported, and the planning horizon is not changed. |
APACS119=Bucket index {0} is not within the calendar range. {0} = Start bucket index. |
Error |
If number of buckets extends beyond the end of the calendar, the planning horizon is applicable up to the last bucket in the calendar. |
NA |
N/A |
If start bucket is 0, the planning horizon begins at the first bucket, and a warning message is reported (AP11 Compatibility). |
APACS119=Bucket index {0} is not within the calendar range. {0} = Start bucket index (0). |
Warning |
If number of buckets is not greater than zero, an error is reported, and the planning horizon is not changed. |
APACS145=Invalid value for horizon length argument {0}. Must be greater than 0. {0} = Value of the length argument. |
Error |
Both arguments must be valid numbers. |
APACS118=Invalid number "{0}" {0} = Value of the argument, which is not a valid number. |
Error |
If start bucket is negative, an error is reported and the planning horizon is not changed. |
APACS119=Bucket index {0} is not within the calendar range. {0} = Start bucket index. |
Error |
This table lists the examples of the Set Calendar Range command:
Requirement | Syntax |
---|---|
Set the planning horizon to the first bucket in the calendar as the planning horizon. |
Set Calendar Range: 1, 1; |
Set the planning horizon to 5 buckets, starting from the second bucket (bucket numbers 2 through 6). |
Set Calendar Range: 2, 5; |
Given a calendar with 10 buckets, this syntax sets the planning horizon to the last 2 buckets (bucket numbers 8 through 10). |
Set Calendar Range: 8, 5; This message is logged: APACS174=Planning horizon set to start at bucket index 8, horizon length: 2 |
Given a calendar with 10 buckets, this syntax fails because the start_bucket argument is beyond the calendar range. |
Set Calendar Range: 11, 1; This error message is logged and Planning horizon is not changed: APACS119=Bucket index 11 is not within the calendar range. |