CounterTrace

class CounterTrace @JvmOverloads constructor(theCounter: Counter, val pathToFile: Path = theCounter.myModel.outputDirectory.outDir.resolve( theCounter.name.replace(':', '_') + "_Trace")) : ModelElementObserver(source)

Provides the ability to trace the value of a counter during replications.

Parameters

theCounter

the counter to trace

pathToFile

the path to the file to store the trace

Constructors

Link copied to clipboard
constructor(theCounter: CounterCIfc, pathToFile: Path = (theCounter as Response).myModel.outputDirectory.outDir.resolve( theCounter.name.replace(':', '_') + "_Trace"))
constructor(theCounter: Counter, pathToFile: Path = theCounter.myModel.outputDirectory.outDir.resolve( theCounter.name.replace(':', '_') + "_Trace"))

Properties

Link copied to clipboard

The maximum number of observations to collect across all replications. Once the maximum is reached no further collection occurs.

Link copied to clipboard

The maximum number of observations to trace within each replication. Once the maximum is reached no further collection occurs within the replication.

Link copied to clipboard

The maximum number of replications to include in the trace. Once the maximum is reached no further replications are traced.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun asDataFrame(): AnyFrame
Link copied to clipboard
Link copied to clipboard
fun traceValues(repNum: Double, time: Double = Double.MAX_VALUE): Map<String, DoubleArray>

Returns a map that has the times and values for the provided replication repNum up to and including the time. The default value of time is Double.MAX_VALUE, which will result in all values for the replication. Element "times" holds the times that the variable changed Element "values" holds the values associated with each time change.