Package jline.streaming
Class Collector
-
- All Implemented Interfaces:
public class CollectorCollects and aggregates metrics from SSA simulation for streaming to line-est. Supports two modes: - SAMPLED: Push metrics every N simulation events - TIME_WINDOW: Accumulate time-weighted metrics and push averages at window end This collector is called from Solver_ssa.kt's save_log() function during simulation.
-
-
Field Summary
Fields Modifier and Type Field Description public final StreamingOptionsoptionspublic doublelastPushTime
-
Constructor Summary
Constructors Constructor Description Collector(StreamingOptions options, NetworkStruct sn)Create a new streaming metrics collector.
-
Method Summary
Modifier and Type Method Description StreamingOptionsgetOptions()Get the streaming options. doublegetLastPushTime()Get the last push time. voidrecordState(double simulationTime, double dt, Matrix nirState, Matrix depRates, Matrix arvRates)Record state observation from simulation loop. voidflush(double finalTime)Flush any pending metrics (called at end of simulation). voidshutdown()Shutdown the collector and release resources. -
-
Constructor Detail
-
Collector
Collector(StreamingOptions options, NetworkStruct sn)
Create a new streaming metrics collector.- Parameters:
options- Streaming configuration optionssn- Network structure for station/class information
-
-
Method Detail
-
getOptions
StreamingOptions getOptions()
Get the streaming options.
-
getLastPushTime
double getLastPushTime()
Get the last push time.
-
recordState
void recordState(double simulationTime, double dt, Matrix nirState, Matrix depRates, Matrix arvRates)
Record state observation from simulation loop. Called from save_log() in Solver_ssa.kt.
- Parameters:
simulationTime- Current simulation timedt- Time delta since last eventnirState- Marginal state matrix (queue lengths per station/class as flat vector)depRates- Departure rates matrix [nclasses x nstateful]arvRates- Arrival rates matrix [nclasses x nstateful]
-
flush
void flush(double finalTime)
Flush any pending metrics (called at end of simulation).
-
shutdown
void shutdown()
Shutdown the collector and release resources.
-
-
-
-