Capacity Schedule
A CapacitySchedule represents a known set of capacity specifications that last for a duration of time.
A CapacitySchedule has an auto start flag, which controls whether the schedule should start automatically upon initialization (at the start of the replication). The default is to start automatically.
A CapacitySchedule has an initial start time, which represents the amount of time after the beginning of the replication that the schedule is to start. The default start time is zero (at the beginning of the replication).
A CapacitySchedule as a length (or duration) that represents the total time associated with the schedule. After this time has elapsed the entire schedule can repeat if the repeat option is on. The length of the schedule is determined by the durations of the items placed on it.
A CapacitySchedule has a repeat flag that controls whether it will repeat after its duration has elapsed. The default is to repeat the schedule and is only relevant if the schedule duration (length) is finite.
A CapacitySchedule has a cycle start time that represents when the schedule started its current cycle. Again, this is only relevant if the repeat flag is true and the schedule duration is finite. If there is only one cycle, it is the time that the schedule started.
To make a CapacitySchedule useful, instances of the CapacityChangeListenerIfc interface should be added to listen for changes in the schedule. Instances of CapacityChangeListenerIfc are notified in the order in which they are added to the schedule. Instances of CapacityChangeListenerIfc are notified when the schedule starts, when it ends, and when any CapacityItem starts. It is up to the instance of CapacityChangeListenerIfc to react to the schedule changes that it needs to react to and ignore those that it does not care about.
Author
rossetti
Parameters
the parent model element holding the schedule
the time after the start of the replication that the schedule should start. The default is 0.0
whether the schedule should start automatically. The default is true.
whether the schedule will automatically repeat. The default is false.
the default priority of the events used to start each item on the schedule
an optional name for the schedule
Types
A CapacityItem represents an item on a CapacitySchedule. CapacityItems are placed on a CapacitySchedule in the order that they will execute. The first item will start when the schedule starts and each item will be scheduled sequentially based on the durations of the previous items. At the specified start time, the capacity is to be set to the supplied value.
Properties
A flag to control whether the model element reacts to after experiment actions.
A flag to control whether the model element reacts to after replication actions.
A flag to control whether the model element reacts to before experiment actions.
A flag to control whether the model element reacts to before replication actions.
Indicates the current status of the model element for observers of ModelElement.Status
The time that the schedule started for its current cycle
A flag to control whether the model element reacts to initialization actions
The time from the beginning of the replication to the time that the schedule is to start
Indicates whether the schedule should be started automatically upon initialization, default is true
The schedule repeat flag controls whether the entire schedule will repeat after its entire duration has elapsed. The default is to repeat the schedule. The use of this flag only makes sense if a finite schedule length is specified
the left traversal count for pre-order traversal of the model element tree
Returns a string representation of the model element and its child model elements. Useful for realizing the model element hierarchy.
A flag to control whether the model element participates in monte carlo actions.
Gets the number of model elements contained by this model elements.
Indicates the previous status of the model element for observers of ModelElement.Status This allows the transition to be noted by observers
A flag to control whether the model element reacts to end replication actions.
the right traversal count for pre-order traversal of the model element tree
Represents the total length of time of the schedule. The total of the durations determines the length of the schedule. After this time has elapsed the entire schedule can repeat if the schedule repeat flag is true. The default is infinite.
The spatial model associated with this model element. By default, each model element uses its parent model element's spatial model unless changed via this property. This changes the spatial model for this model element and no others.
The time interval between TimedUpdate events. The default is zero, indicating no timed update
Specifies whether this model element participates in time update event specified by its parent
Specifies the havingPriority of this model element's timed update event.
Indicates whether the warm-up action occurred sometime during the simulation for this model element. False indicates that the warm-up action has not occurred
Specifies if this model element will be warmed up when the warmup action occurs for its parent. The warm-up flag indicates whether this model element will be warmed up when its parent warm up event/action occurs. The default value for all model elements is true. A value of true implies that the model element allows its parent's warm up event to call the warm-up action. A value of false implies that the model element does not allow its parent's warm up event to call the warm-up action. False does not necessarily mean that the model element will not be warmed up. It may, through the use of the lengthOfWarmUp property, have its own warm up event and action.
Specifies the priority of this model element's warm up event.
Functions
The same listener cannot be added more than once. Listeners are notified of schedule changes in the sequence by which they were added.
If scheduled to start, this cancels the start of the schedule.
Cancels the timed update event for this model element.
Cancels the warm-up event for this model element.
Checks if this model element or any model element directly above this model element in the hierarchy of model elements all the way until the top Model participates in the warm-up action.
Removes all capacity items from the schedule
Deletes all listeners
Find the first parent that has its own warm up event this guarantees that all elements below the found model element do not have their own warm-up event. A model element that has its own warm up event also opts out of the warm-up action. If the returned parent is the Model, then all are controlled by the model (unless they opt out). Elements can opt out and not have their own warm-up event. Thus, they have no warm up at all.
Fills up the supplied StringBuilder carrying a string representation of the model element and its child model elements Useful for realizing the model element hierarchy.
This method returns the planned time for the warm-up for this model element.
Fills a StringBuilder carrying the model element names in the order that they will be initialized
Checks if a warm-up event is scheduled for any model element directly above this model element in the hierarchy of model elements all the way until the top Model.
Checks if current status is the supplied status
Checks if a timed update event has been scheduled for this model element
Checks if a warm-up event has been scheduled for this model element
Returns the value of a 1 millisecond time interval in terms of the base time unit
Schedules the start of the schedule for the start time of the schedule if it has not already been started
Sets the after experiment option of all model elements (children) contained by this model element.
Sets the after replication flag of all model elements (children) contained by this model element.
Sets the before experiment option of all model elements (children) contained by this model element.
Sets the before replication flag of all model elements (children) contained by this model element.
Sets the initialization option of all model elements (children) contained by this model element.
Sets the monte carlo option flag of all model elements (children) contained by this model element.
Sets the end replication option flag of all model elements (children) contained by this model element. Determines whether the replicationEnded() method will be called
Sets the timed update option flag of all model elements (children) contained by this model element.
Sets the warm-up option flag of all model elements (children) contained by this model element.