Package jsl.modeling.elements.variable
Class ResponseScheduleItem
- java.lang.Object
-
- jsl.modeling.elements.variable.ResponseScheduleItem
-
public class ResponseScheduleItem extends java.lang.ObjectRepresents a ResponseInterval placed on a ResponseSchedule.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedResponseScheduleItem(ResponseSchedule schedule, double time, double duration, java.lang.String label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseVariableaddCounterToInterval(Counter theCounter)Adds a Counter to the interval for data collection over the intervalResponseVariableaddResponseToInterval(ResponseVariable theResponse)Adds a ResponseVariable to the item for data collection over the intervaldoublegetDuration()The duration (length) of the intervalprotected ResponseIntervalgetResponseInterval()doublegetStartTime()doublegetTimeLastEnded()When the interval was last endeddoublegetTimeLastStarted()When the interval was last startedbooleanisScheduled()protected voidscheduleResponseInterval()Causes the response interval to be scheduled at the start time for the item.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ResponseScheduleItem
protected ResponseScheduleItem(ResponseSchedule schedule, double time, double duration, java.lang.String label)
- Parameters:
time- must be greater than zero. Represents start time relative to start of scheduleduration- the ResponseInterval
-
-
Method Detail
-
getStartTime
public final double getStartTime()
- Returns:
- the time to start the schedule
-
addResponseToInterval
public final ResponseVariable addResponseToInterval(ResponseVariable theResponse)
Adds a ResponseVariable to the item for data collection over the interval- Parameters:
theResponse- the response to collect interval statistics on- Returns:
- a ResponseVariable for the interval
-
addCounterToInterval
public final ResponseVariable addCounterToInterval(Counter theCounter)
Adds a Counter to the interval for data collection over the interval- Parameters:
theCounter- the counter to collect interval statistics on- Returns:
- a ResponseVariable for the interval
-
isScheduled
public final boolean isScheduled()
- Returns:
- true if the interval has been scheduled
-
getTimeLastStarted
public final double getTimeLastStarted()
When the interval was last started- Returns:
- When the interval was last started
-
getTimeLastEnded
public final double getTimeLastEnded()
When the interval was last ended- Returns:
- When the interval was last ended
-
getDuration
public final double getDuration()
The duration (length) of the interval- Returns:
- The duration (length) of the interval
-
scheduleResponseInterval
protected final void scheduleResponseInterval()
Causes the response interval to be scheduled at the start time for the item.
-
getResponseInterval
protected final ResponseInterval getResponseInterval()
- Returns:
- the ResponseInterval
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-