Response Schedule
This class allows the creation of a schedule that represents a list of intervals of time. The starting length of a schedule is 0.0. The length of a schedule depends upon the intervals added to it. The schedule's length encompasses the furthest interval added. If no intervals are added, then the schedule only has its start time and no response collection will occur.
The user adds intervals and responses for which statistics need to be collected during the intervals. The intervals within the cycle may overlap in time. The start time of an interval is specified relative to the beginning of the cycle. The length of any interval must be finite.
The schedule can be started any time after the start of the simulation. The default starting time of the schedule is time 0.0. The schedule will start automatically at the designated start time.
The schedule can be repeated after the cycle length of the schedule is reached. The default is for the schedule to automatically repeat. Note that depending on the simulation run length only a portion of the scheduled intervals may be executed.
The classic use case of this class is to collect statistics for each hour of the day. In this case, the user would use the addIntervals() method to add 24 intervals of 1 hour duration. Then responses (response variables, time weighted variables, and counters) can be added to the schedule. In which case, they will be added to each interval. Thus, interval statistics for each of the 24 intervals will be collected for everyone of the added responses. If more than one day is simulated and the schedule is allowed to repeat, then statistics are collected across the days. That is, the statistics of hour 1 on day 1 are averaged with the statistics of hour 1 on all subsequent days.
This functionality is built on the ResponseInterval class, which can be used separately. In other words, response intervals do not have to be on a schedule. The schedule facilitates the collection of many responses across many intervals.
Parameters
the parent model element
the time to start the schedule, must be finite.
Whether the schedule will repeat
the name of the model element
Constructors
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
The time that has elapsed into the current cycle
A flag to control whether the model element reacts to initialization actions
Indicates if the schedule has been scheduled to start
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.
The number of intervals in the schedule
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
The time remaining within the current cycle
A flag to control whether the model element reacts to end replication actions.
An unmodifiable list of the ResponseScheduleItems
the right traversal count for pre-order traversal of the model element tree
The schedule repeat flag controls whether the entire schedule will repeat after its entire cycle has elapsed. The default is true.
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
There must not be any duplicates in the collection or null values. Causes interval statistics to be collected for all the counters for every interval in the schedule.
Causes interval statistics to be collected for the counter for every interval in the schedule
Add non-overlapping, sequential intervals to the schedule, each having the provided duration
Add an interval for collecting responses to the schedule. If the start time plus the duration reaches past the current schedule length, the schedule length is extended to include the interval.
There must not be any duplicates in the collection or null values. Causes interval statistics to be collected for all the responses for every interval in the schedule.
Causes interval statistics to be collected for the response for every interval in 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.
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
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.