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.
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.
Returns system time in nanoseconds that the simulation started
If supplied, the configuration used by the model configuration manager.
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
The model has a default stream. This property controls which stream is assigned by default. The value must be >= 1.
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
Indicates if a configuration has been applied. If you supply a configuration and a model configuration manager, then during the execution of the setUpExperiment() function, the model will be configured and this property will then report true. No future configurations will be applied while this property is set to true. If you want future experiments to apply a configuration, then this property should be set to false.
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 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.
If supplied, the configuration manager will be called when the model is set up before running any replications.
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)
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 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
If the model parameters change, then the user is responsible for calling extractParameters(model) on the returned RVParameterSetter
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()
A list of the TimeSeriesResponse model elements in the model
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.
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 to see if the model element has been registered with the Model using it's uniquely assigned name.
Creates a default (SQLLite) database that uses the model's name and is created within the model's output database directory. The database can then be used by a KSLDatabaseObserver
Creates a KSLDatabaseObserver that uses a default (SQLLite) database with the model's name forming the database name and placing the database in the model's output database directory.
Causes the simulation to end after the current replication is completed
Returns a new Experiment based on this experiment.
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.
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
Initializes the simulation in preparation for running
Sets the desired number of replications for the experiment
Prints basic text results to the console.
Returns the random variable associated with the name or null if the named element is not in the model. Note that this will also return ANY instances for 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
This method can be used to ensure that all model elements within the model use the same spatial model.
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 the named element is not in the model. Note that this will also return any instances for 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 affects the next simulation run. So, turn on the reporting before you simulate. If you want the reporting all the time, then 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).
Validates the provided set of response names are associated with the model's responses (Response, TWResponse or Counter).