Package jsl.simulation
Class Model
- java.lang.Object
-
- jsl.simulation.ModelElement
-
- jsl.simulation.Model
-
- All Implemented Interfaces:
ObservableIfc
,GetNameIfc
,IdentityIfc
public class Model extends ModelElement
This class serves as the base (container) model element for all model elements in the simulation.
-
-
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 static int
MODEL_ELEMENT_ADDED
An "enum" to indicate that the model element was added to the model element hierarchystatic int
MODEL_ELEMENT_REMOVED
An "enum" to indicate that the model element was removed from the model element hierarchyprotected java.util.List<Counter>
myCounters
A list of all the Counters within the modelprotected java.util.List<RandomElementIfc>
myRandomElements
A list of all random elements within the modelprotected java.util.List<ResponseVariable>
myResponseVariables
A list of all the response variables (including TimeWeighted) within the modelprotected java.util.List<Variable>
myVariables
A list of all the Variables within the model-
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 Modifier Constructor Description protected
Model(java.lang.String name)
Constructs a model called "name"
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addModelElementAndChildrenToModelElementMap(ModelElement element)
Used by ModelElement to assist with changing the model element's parent.boolean
addModelElementObserver(java.lang.String name, ObserverIfc observer)
Adds the supplied observer to the ModelElement with the given name.void
advanceSubstreams(int n)
Advances the streams of all RandomElementIfc n times.void
advanceToNextSubstream()
Causes RandomElementIfc that have been added to the model to immediately advance their random number streams to the next substream in their stream.protected void
afterExperiment(Experiment e)
protected void
afterReplication(Experiment e)
boolean
containsModelElement(java.lang.String modelElementName)
Checks to see if the model element has been registered with the Model using it's uniquely assigned name.boolean
deleteModelElementObserver(java.lang.String name, ObserverIfc observer)
Removes the supplied observer from the ModelElement with the given name.AcrossReplicationStatisticIfc
getAcrossReplicationResponseVariable(java.lang.String name)
Gets the AcrossReplicationStatisticIfc for the provided name.boolean
getAutoRemoveMarkedElementsOption()
Indicates whether or not the model will automatically remove elements that are marked for removal prior to each replication.Counter
getCounter(java.lang.String name)
Returns the Counter associated with the name or null if named element is not in the model.java.util.List<java.lang.String>
getCounterNames()
Returns a list of strings with each element being the unique model element name for the Counters within the modeljava.util.List<Counter>
getCounters()
Returns an unmodifiable collection holding all the Counters within the Model.void
getCounters(java.util.Collection<Counter> c)
Fills up the provided collection with all of the Counters that are contained by any model elements within the model.protected EntityType
getDefaultEntityType()
Returns a reference to the default entity typeboolean
getElementAddedAfterReplicationStartedWarningOption()
If a model element is added to the model after a replication has started this is likely to be a conceptual error.Executive
getExecutive()
Returns a reference to the ExecutiveExperimentGetIfc
getExperiment()
Returns a reference to the Experiment or null.java.util.List<StatisticAccessorIfc>
getListOfAcrossReplicationStatistics()
The responses as a list of StatisticAccessorIfcModelElement
getModelElement(int id)
Returns the model element that has the provided unique id or null if not foundModelElement
getModelElement(java.lang.String name)
Returns the model element associated with the name.java.util.Iterator<ModelElement>
getModelElementIterator()
Returns an Iterator to all the ModelElements registered inside this modeljava.util.List<ModelElement>
getModelElements()
The list is ordered parent-child, in the order of the model element hierarchystatic int
getNextEnumConstant()
Should be used by subclasses to get the next constant so that unique constants can be usedjava.util.List<RandomElementIfc>
getRandomElements()
Returns an unmodifiable collection holding all the RandomElementIfc within the Model.void
getRandomElements(java.util.Collection<RandomElementIfc> c)
Gets all instances of the RandomElementIfc interface within the model hierarchy.RandomVariable
getRandomVariable(java.lang.String name)
Returns the random variable associated with the name or null if named element is not in the model.java.util.List<RandomVariable>
getRandomVariables()
ResponseVariable
getResponseVariable(java.lang.String name)
Returns the response variable associated with the name or null if named element is not in the model.java.util.List<java.lang.String>
getResponseVariableNames()
Returns a list of strings with each element being the unique model element name for the ResponseVariables within the modeljava.util.List<ResponseVariable>
getResponseVariables()
Returns an unmodifiable collection holding all the ResponseVariables within the Model.void
getResponseVariables(java.util.Collection<ResponseVariable> c)
Fills up the provided collection with all of the response variables that are contained by any model elements within the model.Simulation
getSimulation()
Returns a reference to the Simulation that contains this Modeldouble
getTimeUnit()
Returns the current time unit.TimeWeighted
getTimeWeighted(java.lang.String name)
Returns the time weighted variable associated with the name or null if named element is not in the model.Variable
getVariable(java.lang.String name)
Returns the variable associated with the name or null if named element is not in the model.java.util.List<Variable>
getVariables()
Returns an unmodifiable collection holding all the Variables within the Model.void
getVariables(java.util.Collection<Variable> c)
Gets all instances of the Variable class within the model hierarchy.boolean
isRunning()
Returns true if the executive is running, false if it is not running or if the model is not yet part of a simulation.void
resetStartStream()
Causes RandomElementIfc that have been added to the model to immediately reset their random number streams to the beginning of their starting stream.void
resetStartSubStream()
Causes RandomElementIfc that have been added to the model to immediately reset their random number streams to the beginning of their current sub stream.protected void
setAllRVResetNextSubStreamOptions(boolean option)
Sets the reset next sub stream option for all RandomElementIfc in the model to the supplied value, true is the default behavior.protected void
setAllRVResetStartStreamOptions(boolean option)
Sets the reset start stream option for all RandomElementIfc in the model to the supplied value, true is the default behavior.void
setAutoRemoveMarkedElementsOption(boolean flag)
Sets the option for the model to automatically remove elements that are marked for removal prior to each replication.void
setElementAddedAfterReplicationStartedWarningOption(boolean flag)
If a model element is added to the model after a replication has started this is likely to be a conceptual error.void
setSpatialModelForAllElements(SpatialModel model)
This method can be used to ensure that all model elements within the model use the same spatial modelvoid
setTimeUnit(double timeUnit)
sets the time unit to a given number of milliseconds (tu).protected void
setUpExperiment()
Called from Simulation.ReplicationExecutionProcess.initializeIterations() Represents what to do to set up an experimentprotected void
setUpReplication()
void
turnOffAntithetic()
Causes RandomElementIfc that have been added to the model to immediately turn off their antithetic generating streams.void
turnOnAntithetic()
Causes RandomElementIfc that have been added to the model to immediately turn on their antithetic generating streams.void
turnOnRandomVariableResponseCapture()
Turns on RandomVariable response capture for all RandomVariables in the modelvoid
turnOnTimeIntervalCollection(double interval)
Turns on the collection of statistics across intervals of time, defined by the interval length for all response variables (including TimeWeighted) and counters-
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, getId, getInitializationOption, getInitializationOrderAsString, getLeftPreOrderTraversalCount, getLengthOfWarmUp, getModel, getModelElementCompartor, getModelElementsAsString, getModelElementsAsString, getModelElementsAsString, getMonteCarloOption, getName, getNumberOfModelElements, getObserverState, getParentModelElement, getPreviousObserverState, getReplicationEndedOption, getRightPreOrderTraversalCount, getSpatialModel, getStringLabel, getThisElementsCounters, getThisElementsModelElements, getThisElementsRandomVariables, getThisElementsResponseVariables, getThisElementsVariables, getTime, getTimedUpdateInterval, getTimedUpdateOption, getUpdateNotificationFlag, 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
-
-
-
-
Field Detail
-
MODEL_ELEMENT_ADDED
public static final int MODEL_ELEMENT_ADDED
An "enum" to indicate that the model element was added to the model element hierarchy
-
MODEL_ELEMENT_REMOVED
public static final int MODEL_ELEMENT_REMOVED
An "enum" to indicate that the model element was removed from the model element hierarchy
-
myResponseVariables
protected java.util.List<ResponseVariable> myResponseVariables
A list of all the response variables (including TimeWeighted) within the model
-
myCounters
protected java.util.List<Counter> myCounters
A list of all the Counters within the model
-
myVariables
protected java.util.List<Variable> myVariables
A list of all the Variables within the model
-
myRandomElements
protected java.util.List<RandomElementIfc> myRandomElements
A list of all random elements within the model
-
-
Method Detail
-
getNextEnumConstant
public static int getNextEnumConstant()
Should be used by subclasses to get the next constant so that unique constants can be used- Returns:
- the constant
-
getTimeUnit
public final double getTimeUnit()
Returns the current time unit. The default is the number of milliseconds in one time unit. So, if you do not use setTimeUnit(), then this method will return 1.0.- Returns:
- the time unit addFactor
-
setTimeUnit
public final void setTimeUnit(double timeUnit)
sets the time unit to a given number of milliseconds (tu). If you are setting a standard time unit, you can use a time constant from ModelElement.- Parameters:
timeUnit
- the time unit addFactor
-
getVariable
public final Variable getVariable(java.lang.String name)
Returns the variable associated with the name or null if named element is not in the model. Note that this will also return ANY instances of subclasses of Variable- Overrides:
getVariable
in classModelElement
- Parameters:
name
- The name of the Variable model element- Returns:
- the associated variable, may be null if provided name does not exist in the model
-
getRandomVariable
public final RandomVariable getRandomVariable(java.lang.String name)
Returns the random variable associated with the name or null if named element is not in the model. Note that this will also return ANY instances of subclasses of RandomVariable- Parameters:
name
- The name of the RandomVariable model element- Returns:
- the associated random variable, may be null if provided name does not exist in the model
-
getRandomVariables
public final java.util.List<RandomVariable> getRandomVariables()
- Returns:
- a list containing all RandomVariables within the model
-
turnOnRandomVariableResponseCapture
public final void turnOnRandomVariableResponseCapture()
Turns on RandomVariable response capture for all RandomVariables in the model
-
getResponseVariable
public final ResponseVariable getResponseVariable(java.lang.String name)
Returns the response variable associated with the name or null if named element is not in the model. Note that this will also return ANY instances of subclasses of ResponseVariable (i.e. including TimeWeighted)- Parameters:
name
- The name of the ResponseVariable model element- Returns:
- the associated ResponseVariable, may be null if provided name does not exist in the model
-
getTimeWeighted
public final TimeWeighted getTimeWeighted(java.lang.String name)
Returns the time weighted variable associated with the name or null if named element is not in the model. Note that this will also return ANY instances of subclasses of TimeWeighted- Parameters:
name
- The name of the TimeWeighted model element- Returns:
- the associated TimeWeighted, may be null if provided name does not exist in the model
-
getAcrossReplicationResponseVariable
public final AcrossReplicationStatisticIfc getAcrossReplicationResponseVariable(java.lang.String name)
Gets the AcrossReplicationStatisticIfc for the provided name. If there is no response variable with the provided name then null is returned.- Parameters:
name
- name of response variable in the model, must not be null- Returns:
- the associated across replication statistic information, may be null if provided name does not exist in the model
-
getCounter
public final Counter getCounter(java.lang.String name)
Returns the Counter associated with the name or null if named element is not in the model.- Parameters:
name
- The name of the Counter model element- Returns:
- the associated counter, may be null if provided name does not exist in the model
-
getListOfAcrossReplicationStatistics
public final java.util.List<StatisticAccessorIfc> getListOfAcrossReplicationStatistics()
The responses as a list of StatisticAccessorIfc- Returns:
- a list of response variables and counters
-
turnOnTimeIntervalCollection
public final void turnOnTimeIntervalCollection(double interval)
Turns on the collection of statistics across intervals of time, defined by the interval length for all response variables (including TimeWeighted) and counters- Parameters:
interval
- the interval
-
containsModelElement
public final boolean containsModelElement(java.lang.String modelElementName)
Checks to see if the model element has been registered with the Model using it's uniquely assigned name.- Parameters:
modelElementName
- the name of the model element to check- Returns:
- true if contained
-
getModelElement
public final ModelElement getModelElement(java.lang.String name)
Returns the model element associated with the name. In some sense, this model violates encapsulation for ModelElements, but since the client knows the unique name of the ModelElement, we assume that the client knows what he/she is doing.- Parameters:
name
- The name of the model element, the name must not be null- Returns:
- The named ModelElement if it exists in the model by the supplied name, null otherwise
-
getModelElement
public final ModelElement getModelElement(int id)
Returns the model element that has the provided unique id or null if not found- Parameters:
id
- the identifier getId() of the desired ModelElement- Returns:
- the ModelElement
-
getVariables
public final void getVariables(java.util.Collection<Variable> c)
Gets all instances of the Variable class within the model hierarchy. Only Variable objects (not its subclasses)- Parameters:
c
- a Collection to hold the instances of Variable found
-
getVariables
public final java.util.List<Variable> getVariables()
Returns an unmodifiable collection holding all the Variables within the Model. The list is unchangeable, but the elements in the list can be still be accessed and changed as necessary- Returns:
- An unmodifiable List of the variables
-
getRandomElements
public final void getRandomElements(java.util.Collection<RandomElementIfc> c)
Gets all instances of the RandomElementIfc interface within the model hierarchy. All instances of RandomElementIfc will be returned including any instances of subclasses of RandomElementIfc- Parameters:
c
- a Collection to hold the instances of RandomElementIfc found
-
getRandomElements
public final java.util.List<RandomElementIfc> getRandomElements()
Returns an unmodifiable collection holding all the RandomElementIfc within the Model. The list is unchangeable, but the elements in the list can be still be accessed and changed as necessary- Returns:
- An unmodifiable List of the RandomElementIfc
-
turnOnAntithetic
public final void turnOnAntithetic()
Causes RandomElementIfc that have been added to the model to immediately turn on their antithetic generating streams.
-
turnOffAntithetic
public final void turnOffAntithetic()
Causes RandomElementIfc that have been added to the model to immediately turn off their antithetic generating streams.
-
advanceSubstreams
public final void advanceSubstreams(int n)
Advances the streams of all RandomElementIfc n times. If n <= 0, no advancing occurs- Parameters:
n
- the number of times to advance
-
advanceToNextSubstream
public final void advanceToNextSubstream()
Causes RandomElementIfc that have been added to the model to immediately advance their random number streams to the next substream in their stream.
-
resetStartStream
public final void resetStartStream()
Causes RandomElementIfc that have been added to the model to immediately reset their random number streams to the beginning of their starting stream.
-
resetStartSubStream
public final void resetStartSubStream()
Causes RandomElementIfc that have been added to the model to immediately reset their random number streams to the beginning of their current sub stream.
-
getResponseVariables
public final void getResponseVariables(java.util.Collection<ResponseVariable> c)
Fills up the provided collection with all of the response variables that are contained by any model elements within the model. In other words, any response variables (and subclasses, e.g. TimeWeighted that are in the model element hierarchy below the model.- Parameters:
c
- The collection to be filled.
-
getResponseVariables
public final java.util.List<ResponseVariable> getResponseVariables()
Returns an unmodifiable collection holding all the ResponseVariables within the Model. The list is unchangeable, but the elements in the list can still be accessed and changed as necessary- Returns:
- An unmodifiable List of the variables
-
getResponseVariableNames
public final java.util.List<java.lang.String> getResponseVariableNames()
Returns a list of strings with each element being the unique model element name for the ResponseVariables within the model- Returns:
- the list of response variable names
-
getCounters
public final void getCounters(java.util.Collection<Counter> c)
Fills up the provided collection with all of the Counters that are contained by any model elements within the model. In other words, any Counters that are in the model element hierarchy below the model.- Parameters:
c
- The collection to be filled.
-
getCounters
public final java.util.List<Counter> getCounters()
Returns an unmodifiable collection holding all the Counters within the Model. The list is unchangeable, but the elements in the list can be still be accessed and changed as necessary- Returns:
- An unmodifiable List of the Counters
-
getCounterNames
public final java.util.List<java.lang.String> getCounterNames()
Returns a list of strings with each element being the unique model element name for the Counters within the model- Returns:
- list of strings
-
addModelElementObserver
public final boolean addModelElementObserver(java.lang.String name, ObserverIfc observer)
Adds the supplied observer to the ModelElement with the given name. While any model element can be observed the client needs a reference to tell the model element to add an observer. This method provides way to add observers to any ModelElement regardless of where it is in the model hierarchy, provided the client knows the unique name of the ModelElement.- Parameters:
name
- The name of the model elementobserver
- The observer of the named model element- Returns:
- If this method returns false, then no such named model element exists in the Model
-
deleteModelElementObserver
public final boolean deleteModelElementObserver(java.lang.String name, ObserverIfc observer)
Removes the supplied observer from the ModelElement with the given name. While any model element can be observed the client needs a reference to tell the model element to remove an observer. This method provides way to remove observers from any ModelElement regardless of where it is in the model hierarchy, provided the client knows the unique name of the ModelElement.- Parameters:
name
- The name of the model elementobserver
- The observer of the named model element- Returns:
- If this method returns false, then no such named model element exists in the Model
-
getModelElementIterator
public final java.util.Iterator<ModelElement> getModelElementIterator()
Returns an Iterator to all the ModelElements registered inside this model- Returns:
- a model element iterator
-
getModelElements
public final java.util.List<ModelElement> getModelElements()
The list is ordered parent-child, in the order of the model element hierarchy- Returns:
- all of the model elements in the model as a List
-
setSpatialModelForAllElements
public final void setSpatialModelForAllElements(SpatialModel model)
This method can be used to ensure that all model elements within the model use the same spatial model- Parameters:
model
- the spatial model
-
getAutoRemoveMarkedElementsOption
public final boolean getAutoRemoveMarkedElementsOption()
Indicates whether or not the model will automatically remove elements that are marked for removal prior to each replication. The default is false.- Returns:
- the option true if auto remove option is on
-
setAutoRemoveMarkedElementsOption
public final void setAutoRemoveMarkedElementsOption(boolean flag)
Sets the option for the model to automatically remove elements that are marked for removal prior to each replication. False means elements will not be automatically removed. True means that they will automatically be removed.- Parameters:
flag
- the flag to indicate the option
-
getElementAddedAfterReplicationStartedWarningOption
public final boolean getElementAddedAfterReplicationStartedWarningOption()
If a model element is added to the model after a replication has started this is likely to be a conceptual error. A warning message will be printed to the console in this case. The user can turn off this warning message by setting this flag to false. The default is true.- Returns:
- the option true means option is on
-
setElementAddedAfterReplicationStartedWarningOption
public final void setElementAddedAfterReplicationStartedWarningOption(boolean flag)
If a model element is added to the model after a replication has started this is likely to be a conceptual error. A warning message will be printed to the console in this case. The user can turn off this warning message by setting this flag to false. The default is true.- Parameters:
flag
- true turns off this potential warning
-
setAllRVResetStartStreamOptions
protected final void setAllRVResetStartStreamOptions(boolean option)
Sets the reset start stream option for all RandomElementIfc in the model to the supplied value, true is the default behavior. This method is used by an experiment prior to beforeExperiment_() being called Thus, any RandomElementIfc must already have been created and attached to the model elements- Parameters:
option
- The option, true means to reset prior to each experiment
-
setAllRVResetNextSubStreamOptions
protected final void setAllRVResetNextSubStreamOptions(boolean option)
Sets the reset next sub stream option for all RandomElementIfc in the model to the supplied value, true is the default behavior. True implies that the substreams will be advanced at the end of the replication. This method is used by an experiment prior to beforeExperiment_() being called Thus, any RandomElementIfc must already have been created and attached to the model elements- Parameters:
option
- The option, true means to reset prior to each replication
-
addModelElementAndChildrenToModelElementMap
protected final void addModelElementAndChildrenToModelElementMap(ModelElement element)
Used by ModelElement to assist with changing the model element's parent. This method ensures that the model has model element and its children registered in its map after the change.- Parameters:
element
- the element to add
-
getDefaultEntityType
protected final EntityType getDefaultEntityType()
Returns a reference to the default entity type- Overrides:
getDefaultEntityType
in classModelElement
- Returns:
- the default entity type
-
getSimulation
public final Simulation getSimulation()
Returns a reference to the Simulation that contains this Model- Overrides:
getSimulation
in classModelElement
- Returns:
- the Simulation
-
getExecutive
public final Executive getExecutive()
Returns a reference to the Executive- Overrides:
getExecutive
in classModelElement
- Returns:
- the executive
-
isRunning
public final boolean isRunning()
Returns true if the executive is running, false if it is not running or if the model is not yet part of a simulation.- Returns:
- true means running
-
getExperiment
public final ExperimentGetIfc getExperiment()
Returns a reference to the Experiment or null. The reference to the Experiment will only be available after the Simulation is initialized.- Overrides:
getExperiment
in classModelElement
- Returns:
- the experiment handle
-
setUpExperiment
protected void setUpExperiment()
Called from Simulation.ReplicationExecutionProcess.initializeIterations() Represents what to do to set up an experiment
-
setUpReplication
protected void setUpReplication()
-
afterReplication
protected void afterReplication(Experiment e)
-
afterExperiment
protected void afterExperiment(Experiment e)
-
-