Model
Constructors
Properties
The reset next sub stream option This option indicates whether the random variables used during the replication within the experiment will be reset to their next sub-stream after running each replication. The default is TRUE. This ensures that the random variables will jump to the next sub-stream within their current stream at the end of a replication. This will cause the random variables in each subsequent replication to start in the same sub-stream in the underlying random number streams if the replication is repeatedly used and the ResetStartStreamOption is set to false (which is the default) and then jump to the next sub-stream (if this option is on). This option has no effect if there is only 1 replication in an experiment.
A flag to control whether the model element reacts to after experiment actions.
A flag to control whether the model element reacts to after replication actions.
The simulation may end by a variety of means, this checks if the simulation ended because it ran all of its replications, true if all completed
Indicates whether antithetic replications should be run. The default is false. If set the user must supply an even number of replications; otherwise an exception will be thrown. The replications will no longer be independent; however, pairs of replications will be independent. Thus, the number of independent samples will be one-half of the specified number of replications
The base time units for the simulation model. By default, this is 1.0.
A flag to control whether the model element reacts to before experiment actions.
A flag to control whether the model element reacts to before replication actions.
Returns system time in nanoseconds that the simulation started
The identifier for the current replication. Each replication in the set of replications for the experiment has a unique identifier. This returns the identifier for the current replication. An identifier of 0 represents that no replications have been run
The current number of replications that have been run for this experiment
Indicates the current status of the model element for observers of ModelElement.Status
Gets the clock time in nanoseconds since the simulation was initialized
Returns system time in nanoseconds that the simulation ended
Holds values for each controllable parameter of the simulation model.
The identity of the experiment
The name of the experiment
Causes garbage collection System.gc() to be invoked after each replication. The default is false
A flag to control whether the model element reacts to initialization actions
Returns if the elapsed execution time exceeds the maximum time allowed. Only true if the maximum was set and elapsed time is greater than or equal to maximumAllowedExecutionTime
Checks if the simulation is in the initialized state After the simulation has been initialized this method will return true
The complement of isRunning
Checks if the simulation is in the completed step state After the simulation has successfully completed a replication this property will be true
The simulation may end by a variety of means, this method checks if the simulation ended but was unfinished, not all replications were completed.
the left traversal count for pre-order traversal of the model element tree
The specified length of each planned replication for this experiment. The default is Double.POSITIVE_INFINITY.
The length of time from the start of an individual replication to the warm-up event for that replication.
The responses as a list of StatisticIfc
The maximum allotted (suggested) execution (real) clock for the entire iterative process in nanoseconds. This is a suggested time because the execution time requirement is only checked after the completion of an individual step After it is discovered that cumulative time for executing the step has exceeded the maximum time, then the iterative process will be ended (perhaps) not completing other steps.
The maximum allowable execution time "wall" clock time for an individual replication to complete processing in nanoseconds. Set the maximum allotted (suggested) execution (real) clock for a replication. This is a proposed value because the execution time requirement is only checked after the completion of each replication After it is discovered that cumulative time for executing the replication has exceeded the maximum time, then the process will be ended (perhaps) not completing other replications.
Returns a string representation of the model element and its child model elements. Useful for realizing the model element hierarchy.
A flag to control whether the model element participates in monte carlo actions.
Gets the number of model elements contained by this model elements.
The number of replications to run for this experiment
Indicates the number of times the streams should be advanced prior to running the experiment
Returns the replications completed since the simulation was last initialized
Indicates if the replications associated with this experiment are part of set of experiments with the same name. A chunk is an ordered subset of replications for an experiment. This field indicates the number of chunks within the experiment. There should be at least 1 chunk. If there is 1 chunk then all replications of the experiment are run as one chunk (simulation run)
Indicates the previous status of the model element for observers of ModelElement.Status This allows the transition to be noted by observers
The range of replication identifiers for the experiment based on the starting replication identifier and the number of replications to be executed.
A flag to control whether a warning is issued if the user does not set the replication run length
A flag to control whether the model element reacts to end replication actions.
A flag to indicate whether each replication within the experiment should be re-initialized at the beginning of each replication. True means that it will be re-initialized.
The reset start stream option This option indicates whether the random variables used during the experiment will be reset to their starting stream prior to running the first replication. The default is FALSE. This ensures that the random variable's streams WILL NOT be reset prior to running the experiment. This will cause different experiments or the same experiment run multiple times that use the same random variables (via the same model) to continue within their current stream. Therefore, the experiments will be independent when invoked within the same program execution. To get common random number (CRN), run the experiments in different program executions OR set this option to true prior to running the experiment again within the same program invocation.
The names of all the response variables and counters in the model
the right traversal count for pre-order traversal of the model element tree
If the model parameters change then the user is responsible for calling extractParameters(model) on the returned RVParameterSetter
The spatial model associated with this model element. By default, each model element uses its parent model element's spatial model unless changed via this property. This changes the spatial model for this model element and no others.
The starting id for the sequence of identifiers used to label the replications of the experiment
The simulation may end by a variety of means, this method checks if the simulation ended because it was stopped, true if it was stopped via stop()
The time interval between TimedUpdate events. The default is zero, indicating no timed update
Specifies whether this model element participates in time update event specified by its parent
Specifies the havingPriority of this model element's timed update event.
Indicates whether the warm-up action occurred sometime during the simulation for this model element. False indicates that the warm-up action has not occurred
Specifies if this model element will be warmed up when the warmup action occurs for its parent. The warm-up flag indicates whether this model element will be warmed up when its parent warm up event/action occurs. The default value for all model elements is true. A value of true implies that the model element allows its parent's warm up event to call the warm-up action. A value of false implies that the model element does not allow its parent's warm up event to call the warm-up action. False does not necessarily mean that the model element will not be warmed up. It may, through the use of the lengthOfWarmUp property, have its own warm up event and action.
Specifies the priority of this model element's warm up event.
Functions
Advances the streams, held by the model, n times. If n <= 0, no advancing occurs
Causes random number streams that have been added to the model to immediately advance their random number sequence to the next sub-stream if the stream permits advancement via the advanceToNextSubStreamOption.
Cancels the timed update event for this model element.
Cancels the warm-up event for this model element.
Changes the experiment run parameters for the experiment. This does not include the current number of replications or the experiment's id. Any property in ExperimentRunParametersIfc may be changed.
Checks if this model element or any model element directly above this model element in the hierarchy of model elements all the way until the top Model participates in the warm-up action.
Checks to see if the model element has been registered with the Model using it's uniquely assigned name.
Causes the simulation to end after the current replication is completed
Returns a new Experiment based on this experiment.
Extracts a data class representing the experiment's run parameters
Find the first parent that has its own warm up event this guarantees that all elements below the found model element do not have their own warm-up event. A model element that has its own warm up event also opts out of the warm-up action. If the returned parent is the Model, then all are controlled by the model (unless they opt out). Elements can opt out and not have their own warm-up event. Thus, they have no warm up at all.
Returns the model element that has the provided unique id or null if not found
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 they are doing.
Fills up the supplied StringBuilder carrying a string representation of the model element and its child model elements Useful for realizing the model element hierarchy.
This method returns the planned time for the warm-up for this model element.
Checks if the current number of replications that have been executed is less than the number of replications specified.
Returns true if additional replications need to be run
Checks if the model's rvParameterSetter property has been accessed and thus that an RVParameterSetter was requested for the model
Fills a StringBuilder carrying the model element names in the order that they will be initialized
Initializes the simulation in preparation for running
Checks if a warm-up event is scheduled for any model element directly above this model element in the hierarchy of model elements all the way until the top Model.
Checks if current status is the supplied status
Checks if a timed update event has been scheduled for this model element
Checks if a warm-up event has been scheduled for this model element
Returns the value of a 1 millisecond time interval in terms of the base time unit
Sets the desired number of replications for the experiment
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
Causes the specified model element to be removed from the model regardless of its location within the model hierarchy. Any model elements attached to the supplied model element will also be removed.
Causes random number streams that have been added to the model to immediately reset their random number sequence to the beginning of their starting stream if the stream permits resetting via the resetStartStreamOption
Causes random number streams that have been added to the model to immediately reset their random number sequence to the beginning of their current sub-stream.
Runs the next replication if there is one
Sets the after experiment option of all model elements (children) contained by this model element.
Sets the after replication flag of all model elements (children) contained by this model element.
Sets the before experiment option of all model elements (children) contained by this model element.
Sets the before replication flag of all model elements (children) contained by this model element.
Sets the initialization option of all model elements (children) contained by this model element.
Sets the monte carlo option flag of all model elements (children) contained by this model element.
Sets the end replication option flag of all model elements (children) contained by this model element. Determines whether the replicationEnded() method will be called
This method can be used to ensure that all model elements within the model use the same spatial model.
Sets the timed update option flag of all model elements (children) contained by this model element.
Sets the warm-up option flag of all model elements (children) contained by this model element.
A StatisticalBatchingElement is used to control statistical batching for single replication simulations. This method creates and attaches a StatisticalBatchingElement to the model. For convenience, it also returns the created element
Returns the TWResponse 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 TWResponse
Detaches the CSVExperimentReport from the model.
Tells the model to stop collecting and reporting within and across replication statistics as comma separated value (CSV) files.
Detaches the CSVReplicationReport from the model.
Attaches the CSVExperimentReport to the model if not attached.
Tells the model to capture statistical output for within replication and across replication responses to comma separated value files. If you do not want both turned on, or you want to control the reporting more directly then use the individual functions for this purpose. Turning on the reporting only effects the next simulation run. So, turn on the reporting before you simulate. If you want the reporting all the time, then just supply the autoCSVReports option as true when you create the model.
Attaches the CSVReplicationReport to the model if not attached. If you turn on the reporting, you need to do it before running the simulation.
Checks if the supplied set of strings are valid inputs (controls or random variable parameters).