ResponseTraceData

class ResponseTraceData(pathToFile: Path, val isTimeWeighted: Boolean, val name: String = pathToFile.fileName.toString().removeSuffix("_Trace")) : ResponseTraceDataIfc(source)

Disk-backed ResponseTraceDataIfc that reloads a response trace written by a ResponseTrace during a finished run. Unlike the live observer, this needs no model — it reopens the on-disk trace file and answers the same queries, so the responseTrace reporting DSL can render a trace after the run from the file alone.

The trace file does not record whether the response is time-weighted, so isTimeWeighted is supplied by the caller (e.g. from a model probe).

The repNum, time, and value columns are read once on construction via the public TabularInputFile API and held in memory; filtering by replication and time window is done in‑memory. Pair this with the per-response capture caps on ResponseTrace to keep traces small.

Parameters

pathToFile

path to the <responseName>_Trace file on disk.

isTimeWeighted

whether the traced response is time-weighted.

name

the response name; defaults to the file name with the _Trace suffix removed.

Constructors

Link copied to clipboard
constructor(pathToFile: Path, isTimeWeighted: Boolean, name: String = pathToFile.fileName.toString().removeSuffix("_Trace"))

Properties

Link copied to clipboard
open override val isTimeWeighted: Boolean
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val replicationNumbers: List<Int>

The distinct replication numbers present in the trace, in ascending order. Replications that were not recorded are not included.

Functions

Link copied to clipboard
open override fun traceDataMap(repNum: Int, startTime: Double, endTime: Double): Map<String, DoubleArray>

The times and values for replication repNum within the time window [startTime, endTime]. Element "times" holds the simulation times at which the variable changed; element "values" holds the corresponding values.