Package jsl.modeling.elements.variable
Class ResponseScheduleItem
- java.lang.Object
-
- jsl.modeling.elements.variable.ResponseScheduleItem
-
public class ResponseScheduleItem extends java.lang.Object
Represents a ResponseInterval placed on a ResponseSchedule.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ResponseScheduleItem(ResponseSchedule schedule, double time, double duration, java.lang.String label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseVariable
addCounterToInterval(Counter theCounter)
Adds a Counter to the interval for data collection over the intervalResponseVariable
addResponseToInterval(ResponseVariable theResponse)
Adds a ResponseVariable to the item for data collection over the intervaldouble
getDuration()
The duration (length) of the intervalprotected ResponseInterval
getResponseInterval()
double
getStartTime()
double
getTimeLastEnded()
When the interval was last endeddouble
getTimeLastStarted()
When the interval was last startedboolean
isScheduled()
protected void
scheduleResponseInterval()
Causes the response interval to be scheduled at the start time for the item.java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-