Package jsl.modeling.elements.variable
Class ResponseVariableBatchingElement
- java.lang.Object
-
- jsl.simulation.ModelElement
-
- jsl.modeling.elements.variable.ResponseVariableBatchingElement
-
- All Implemented Interfaces:
ObservableIfc
,GetNameIfc
,IdentityIfc
public class ResponseVariableBatchingElement extends ModelElement
Controls the batching of ResponseVariables within the Model. Used by StatisticalBatchingElement.
-
-
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 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 ResponseVariableBatchingElement(ModelElement modelElement)
Creates a time weighted batching elementResponseVariableBatchingElement(ModelElement modelElement, java.lang.String name)
Creates a time weighted batching element
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchStatisticObserver
add(ResponseVariable r)
Adds the supplied ResponseVariable variable to the batchingBatchStatisticObserver
add(ResponseVariable r, int minNumBatches, int minBatchSize, int maxNBMultiple, java.lang.String name)
Adds the supplied ResponseVariable variable to the batchingBatchStatisticObserver
add(ResponseVariable r, java.lang.String name)
Adds the supplied ResponseVariable variable to the batchingjava.lang.String
asString()
Allows sub-classes to provide more detail than toString() to represent the ModelElement as a Stringjava.util.List<BatchStatistic>
getAllBatchStatisitcs()
Returns a list of summary statistics on all ResponseVariable variables The list is a copy of originals.java.util.Map<ResponseVariable,BatchStatistic>
getAllBatchStatisticsAsMap()
BatchStatistic
getBatchStatistic(ResponseVariable r)
Returns a statistical summary BatchStatistic on the ResponseVariable variable across the observed batches.BatchStatisticObserver
getBatchStatisticObserver(ResponseVariable key)
Look up the BatchStatisticObserver for the ResponseVariablejava.lang.String
getCSVHeader(ResponseVariable r)
Gets the CSV Header for the ResponseVariablejava.lang.String
getCSVRow(ResponseVariable r)
Gets the CSV row for the ResponseVariablevoid
remove(ResponseVariable r)
Removes the supplied ResponseVariable variable from the batchingvoid
removeAll()
Removes all previously added ResponseVariable from the batching-
Methods inherited from class jsl.simulation.ModelElement
addObserver, addObserverToModelElements, afterExperiment, afterExperiment_, afterReplication, afterReplication_, 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, 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, warmUp_, week
-
-
-
-
Constructor Detail
-
ResponseVariableBatchingElement
public ResponseVariableBatchingElement(ModelElement modelElement)
Creates a time weighted batching element- Parameters:
modelElement
- the model element
-
ResponseVariableBatchingElement
public ResponseVariableBatchingElement(ModelElement modelElement, java.lang.String name)
Creates a time weighted batching element- Parameters:
modelElement
- the model elementname
- a name for the element
-
-
Method Detail
-
add
public final BatchStatisticObserver add(ResponseVariable r)
Adds the supplied ResponseVariable variable to the batching- Parameters:
r
- the ResponseVariable variable to add- Returns:
- the BatchStatisticObserver
-
add
public final BatchStatisticObserver add(ResponseVariable r, java.lang.String name)
Adds the supplied ResponseVariable variable to the batching- Parameters:
r
- the ResponseVariable variable to addname
- name for BatchStatistic- Returns:
- the BatchStatisticObserver
-
add
public final BatchStatisticObserver add(ResponseVariable r, int minNumBatches, int minBatchSize, int maxNBMultiple, java.lang.String name)
Adds the supplied ResponseVariable variable to the batching- Parameters:
r
- the ResponseVariable variable to addminNumBatches
- minimum number of batchesminBatchSize
- minimum batch sizemaxNBMultiple
- batch size multiplename
- name for BatchStatistic- Returns:
- the BatchStatisticObserver
-
getBatchStatisticObserver
public final BatchStatisticObserver getBatchStatisticObserver(ResponseVariable key)
Look up the BatchStatisticObserver for the ResponseVariable- Parameters:
key
- the ResponseVariable to look up- Returns:
- the BatchStatisticObserver
-
remove
public final void remove(ResponseVariable r)
Removes the supplied ResponseVariable variable from the batching- Parameters:
r
- the ResponseVariable to be removed
-
removeAll
public final void removeAll()
Removes all previously added ResponseVariable from the batching
-
getBatchStatistic
public final BatchStatistic getBatchStatistic(ResponseVariable r)
Returns a statistical summary BatchStatistic on the ResponseVariable variable across the observed batches. This returns a copy of the summary statistics.- Parameters:
r
- the ResponseVariable to look up- Returns:
- the returned BatchStatistic
-
getAllBatchStatisitcs
public final java.util.List<BatchStatistic> getAllBatchStatisitcs()
Returns a list of summary statistics on all ResponseVariable variables The list is a copy of originals.- Returns:
- the filled up list
-
getAllBatchStatisticsAsMap
public final java.util.Map<ResponseVariable,BatchStatistic> getAllBatchStatisticsAsMap()
- Returns:
- a map of all batch statistics with the ResponseVariable variable as the key
-
asString
public java.lang.String asString()
Description copied from class:ModelElement
Allows sub-classes to provide more detail than toString() to represent the ModelElement as a String- Overrides:
asString
in classModelElement
- Returns:
- a detailed String representation
-
getCSVRow
public java.lang.String getCSVRow(ResponseVariable r)
Gets the CSV row for the ResponseVariable- Parameters:
r
-- Returns:
- the data as a string
-
getCSVHeader
public java.lang.String getCSVHeader(ResponseVariable r)
Gets the CSV Header for the ResponseVariable- Parameters:
r
-- Returns:
- the header
-
-