TWBatchingElement

class TWBatchingElement @JvmOverloads constructor(modelElement: ModelElement, batchingInterval: Double = 0.0, name: String? = null) : ModelElement(source)

This class controls the batching of time-weighted variables within the Model.

The batch interval is used to schedule events during a replication and must be the same throughout the replication. If the supplied interval is 0.0, then the method getApproximateBatchInterval() will be used to determine the interval for the replication.

Time-based variables (TimeWeighted) are first discretized based on a batching interval. The default batching interval is based on the value of the initial number of batches. This is by default set to DEFAULT_NUM_TW_BATCHES = 512. These initial batches are then rebatched, according to the procedures within BatchStatistic

Use addTimeWeighted(TimeWeighted tw) to add TimeWeighted variables to the batching.

Author

rossetti

Parameters

modelElement

the model element

batchingInterval

the batching interval and must be greater than 0

name

a name for the element

Constructors

Link copied to clipboard
constructor(modelElement: ModelElement, batchingInterval: Double = 0.0, name: String? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
inner class TWBatchStatisticObserver(tw: TWResponse, minNumBatches: Int = BatchStatistic.MIN_NUM_BATCHES, minBatchSize: Int = BatchStatistic.MIN_NUM_OBS_PER_BATCH, maxNBMultiple: Int = BatchStatistic.MAX_BATCH_MULTIPLE, name: String? = null) : BatchStatisticObserver

Properties

Link copied to clipboard

Returns a list of summary statistics on all TimeWeighted variables. The list is a copy of originals.

Link copied to clipboard

This method returns a suggested batching interval based on the length of the run, the warm-up period, and default number of batches.

Link copied to clipboard

The priority for the batching events.

Link copied to clipboard

Sets the batch interval length. Changing this during a replication has no effect. The batch interval is used to schedule events during a replication and must be the same throughout the replication. If the supplied interval is 0.0, then the method getApproximateBatchInterval() will be used to determine the interval for the replication

Link copied to clipboard

Checks if a batching event has been scheduled for this model element

Link copied to clipboard

The starting number of batches for time-weighted batching. Used in approximating a batch interval size

Functions

Link copied to clipboard
fun add(tw: TWResponseCIfc, minNumBatches: Int = BatchStatistic.MIN_NUM_BATCHES, minBatchSize: Int = BatchStatistic.MIN_NUM_OBS_PER_BATCH, maxNBMultiple: Int = BatchStatistic.MAX_BATCH_MULTIPLE, name: String = tw.name): TWBatchingElement.TWBatchStatisticObserver

Adds the supplied TWResponse variable to the batching

Link copied to clipboard
fun approximateBatchInterval(repLength: Double, warmUp: Double): Double

This method returns a suggested batching interval based on the length of the replication and warm-up length for TimeWeighted variables.

Link copied to clipboard
Link copied to clipboard

Returns a statistical summary BatchStatistic on the TimeWeighted variable across the observed batches This returns a copy of the summary statistics.

Link copied to clipboard

Gets the CSV Header for the TimeWeighted

Link copied to clipboard

Gets the CSV row for the TimeWeighted

Link copied to clipboard

Removes the supplied TWResponse variable from the batching

Link copied to clipboard
fun removeAll()

Removes all previously added TWResponse from the batching

Link copied to clipboard

Look up the TWBatchStatisticObserver for the given TimeWeighted variable