Package jsl.modeling.elements.variable
Class LevelResponse
- java.lang.Object
-
- jsl.simulation.ModelElement
-
- jsl.simulation.SchedulingElement
-
- jsl.modeling.elements.variable.LevelResponse
-
- All Implemented Interfaces:
ObservableIfc
,GetNameIfc
,IdentityIfc
public class LevelResponse extends SchedulingElement
Collects statistics on whether or not a specific level associated with a variable is maintained.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jsl.simulation.ModelElement
ModelElement.EventBuilderIfc<T>, ModelElement.EventScheduler<T>, ModelElement.ModelElementComparator, ModelElement.RequestBuilder, ModelElement.RequestDurationIfc, ModelElement.RequestTimeIfc, ModelElement.RequestUsingIfc, ModelElement.TimedUpdateEventAction, ModelElement.TimeUnitIfc<T>, ModelElement.WarmUpEventAction
-
-
Field Summary
Fields Modifier and Type Field Description protected double
myInitTime
-
Fields inherited from class jsl.simulation.ModelElement
AFTER_EXPERIMENT, AFTER_REPLICATION, BEFORE_EXPERIMENT, BEFORE_REPLICATION, CONDITIONAL_ACTION_REGISTRATION, DEFAULT_TIMED_EVENT_PRIORITY, INITIALIZED, MONTE_CARLO, myAfterExperimentOption, myAfterReplicationOption, myBeforeExperimentOption, myBeforeReplicationOption, myInitializationOption, myLengthOfWarmUp, myModelElements, myMonteCarloOption, myObservableComponent, myReplicationEndedOption, myTimedUpdateActionListener, myTimedUpdateEvent, myTimedUpdateInterval, myTimedUpdateOption, myTimedUpdatePriority, myWarmUpActionListener, myWarmUpEvent, myWarmUpIndicator, myWarmUpOption, myWarmUpPriority, NONE, REMOVED_FROM_MODEL, REPLICATION_ENDED, TIME_UNIT_DAY, TIME_UNIT_HOUR, TIME_UNIT_MILLISECOND, TIME_UNIT_MINUTE, TIME_UNIT_SECOND, TIME_UNIT_WEEK, TIMED_UPDATE, UPDATE, WARMUP
-
-
Constructor Summary
Constructors Constructor Description LevelResponse(Variable variable, boolean stats, double level)
LevelResponse(Variable variable, double level)
LevelResponse(Variable variable, double level, boolean stats, java.lang.String name)
LevelResponse(Variable variable, double level, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelObservationInterval()
Causes the cancellation of the observation interval eventsboolean
getStatisticsOption()
boolean
hasObservationInterval()
protected void
initialize()
This method should be overridden by subclasses that need actions performed to initialize prior to a replication.void
scheduleObservationInterval(double startTime, double duration)
Causes an observation interval to be specified.protected void
stateUpdate()
protected void
variableInitialized()
protected void
variableReplicationEnded()
protected void
variableUpdated()
protected void
variableWarmedUp()
protected void
warmUp()
This method should be overridden by subclasses that need actions performed at the warm up event during each replication.-
Methods inherited from class jsl.simulation.SchedulingElement
cancelEvent, rescheduleEvent, rescheduleEvent, rescheduleEvent, rescheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent
-
Methods inherited from class jsl.simulation.ModelElement
addObserver, addObserverToModelElements, afterExperiment, afterExperiment_, afterReplication, afterReplication_, asString, beforeExperiment, beforeExperiment_, beforeReplication, beforeReplication_, buildEventGenerator, cancelTimedUpdateEvent, cancelWarmUpEvent, changeParentModelElement, checkForAfterExperiment, checkForAfterReplication, checkForBeforeExperiment, checkForBeforeReplication, checkForConditionalActionRegistration, checkForInitialize, checkForMonteCarlo, checkForRemoveFromModel, checkForReplicationEnded, checkForTimedUpdate, checkForUpdate, checkForWarmUp, checkObserverState, checkWarmUpOption, clearModelElementObservers, contains, countObservers, createEntity, createEntity, createQObject, day, deleteObserver, deleteObserverFromModelElements, deleteObservers, findModelElementWithWarmUpEvent, getAfterExperimentOption, getAfterReplicationOption, getAllCounters, getAllModelElements, getAllRandomElements, getAllResponseVariables, getAllVariables, getBeforeExperimentOption, getBeforeReplicationOption, getChildModelElementIterator, getCurrentReplicationNumber, getDefaultEntityType, getExecutive, getExperiment, getId, getInitializationOption, getInitializationOrderAsString, getLeftPreOrderTraversalCount, getLengthOfWarmUp, getModel, getModelElementCompartor, getModelElementsAsString, getModelElementsAsString, getModelElementsAsString, getMonteCarloOption, getName, getNumberOfModelElements, getObserverState, getParentModelElement, getPreviousObserverState, getReplicationEndedOption, getRightPreOrderTraversalCount, getSimulation, getSpatialModel, getStringLabel, getThisElementsCounters, getThisElementsModelElements, getThisElementsRandomVariables, getThisElementsResponseVariables, getThisElementsVariables, getTime, getTimedUpdateInterval, getTimedUpdateOption, getUpdateNotificationFlag, getVariable, getWarmUpEventTime, getWarmUpOption, hour, indent, initialize_, isTimedUpdateEventScheduled, isWarmedUp, isWarmUpEventScheduled, isWarmUpScheduled, millisecond, minute, montecarlo, montecarlo_, notifyAfterExperimentObservers, notifyAfterReplicationObservers, notifyBeforeExperimentObservers, notifyBeforeReplicationObservers, notifyConditionalActionRegistrationObservers, notifyInitializationObservers, notifyMonteCarloObservers, notifyObservers, notifyObservers, notifyRemovingFromModelObservers, notifyReplicationEndedObservers, notifyTimedUpdateObservers, notifyUpdateObservers, notifyWarmUpObservers, registerConditionalActions, registerConditionalActions_, removedFromModel, removeFromModel, replicationEnded, replicationEnded_, schedule, second, seize, setAfterExperimentOption, setAfterExperimentOptionForModelElements, setAfterReplicationOption, setAfterReplicationOptionForModelElements, setBeforeExperimentOption, setBeforeExperimentOptionForModelElements, setBeforeReplicationOption, setBeforeReplicationOptionForModelElements, setInitializationOption, setInitializationOptionForModelElements, setLengthOfWarmUp, setModel, setMonteCarloOption, setMonteCarloOptionForModelElements, setName, setObserverState, setParentModelElement, setReplicationEndedOption, setReplicationEndedOptionForModelElements, setSpatialModel, setStringLabel, setTimedUpdateInterval, setTimedUpdateOption, setTimedUpdateOptionForModelElements, setUpdateNotificationFlag, setWarmUpOption, setWarmUpOptionForModelElements, stopExecutive, stopExecutive, timedUpdate, timedUpdate_, toString, update, useControls, warmUp_, week
-
-
-
-
Constructor Detail
-
LevelResponse
public LevelResponse(Variable variable, double level, java.lang.String name)
- Parameters:
variable
- the variable to observelevel
- the level to associate with the variablename
- the name of the response
-
LevelResponse
public LevelResponse(Variable variable, double level)
- Parameters:
variable
- the variable to observelevel
- the level to associate with the variable
-
LevelResponse
public LevelResponse(Variable variable, boolean stats, double level)
- Parameters:
variable
- the variable to observelevel
- the level to associate with the variablestats
- whether or not detailed state change statistics are collected
-
LevelResponse
public LevelResponse(Variable variable, double level, boolean stats, java.lang.String name)
- Parameters:
variable
- the variable to observelevel
- the level to associate with the variablestats
- whether or not detailed state change statistics are collectedname
- the name of the response
-
-
Method Detail
-
scheduleObservationInterval
public void scheduleObservationInterval(double startTime, double duration)
Causes an observation interval to be specified. An observation interval is an interval of time over which the response statistics will be collected. This method will cause events to be scheduled (at the start of the simulation) that represent the interval.- Parameters:
startTime
- the time to start the interval, must be greater than or equal to 0.0duration
- the duration of the observation interval, must be greater than 0.0
-
hasObservationInterval
public boolean hasObservationInterval()
- Returns:
- true if scheduleObservationInterval() has been previously called
-
cancelObservationInterval
public void cancelObservationInterval()
Causes the cancellation of the observation interval events
-
getStatisticsOption
public final boolean getStatisticsOption()
- Returns:
- true if detailed state change statistics are collected
-
variableUpdated
protected void variableUpdated()
-
stateUpdate
protected void stateUpdate()
-
initialize
protected void initialize()
This method should be overridden by subclasses that need actions performed to initialize prior to a replication. It is called once before each replication occurs if the model element wants initialization. It is called after beforeReplication() is called- Overrides:
initialize
in classModelElement
-
warmUp
protected void warmUp()
This method should be overridden by subclasses that need actions performed at the warm up event during each replication. It is called once during each replication if the model element reacts to warm up actions.- Overrides:
warmUp
in classModelElement
-
variableInitialized
protected void variableInitialized()
-
variableWarmedUp
protected void variableWarmedUp()
-
variableReplicationEnded
protected void variableReplicationEnded()
-
-