WelchDataCollectorIfc

The purpose of this interface is to define the behavior of implementations that collect data for the making of Welch plots. The collection should work for either observation or time-persistent data and should not depend upon whether the data is produced directly from a running KSL model. This is to facilitate the reuse of code for data that is generated from other sources such as files or other simulation models. The collection model assumes the following behavior:

  1. There is a setup phase to prepare the collector.

  2. There is a need to indicate the beginning of a replication.

  3. There is a requirement to collect/record the individual observations during a replication.

  4. There is a requirement that the collected observations be stored for processing. The frequency of storage may be different from the frequency of collected observations. For example, the raw observations may be batched in order to facilitate analysis and plotting.

  5. There is a need to indicate the ending of a replication.

  6. There is a cleanup phase to close up the collector.

Inheritors

Properties

Link copied to clipboard

The average time between observations in each replication returned as an array. 0 element is the first replication observed. If no replications have been observed then the array will be empty.

Link copied to clipboard
abstract val batchSize: Double

The size of a batch can be considered either in terms of the number of observations in each batch or as the amount of time covered with each batch

Link copied to clipboard
abstract val lastTime: Double

The time of the observation recorded

Link copied to clipboard
abstract val lastValue: Double

The value of the observation recorded

If there have been no replications, then this returns 0

Link copied to clipboard

The number of observations in each replication returned as an array. 0 element is the first replication count. If no replications have been observed then the array will be empty.

Link copied to clipboard

The number of full replications observed

Functions

Link copied to clipboard
abstract fun beginReplication()

Should be executed prior to each replication

Link copied to clipboard
abstract fun cleanUpCollector()

Should be executed once after all replications have been observed

Link copied to clipboard
abstract fun collect(time: Double, value: Double)
Link copied to clipboard
abstract fun endReplication()

Should be executed after each replication

Link copied to clipboard
abstract fun setUpCollector()

Should be executed once prior to any collection and should be used to clear any statistical collection and prepare the collector for collecting data.