Scenario

class Scenario(val sources: List<SourceNode>)

Represents the structure and configuration of a simulation.

A scenario defines the source nodes that generate entities, the network of intermediate nodes and channels they form, and the metrics to be collected during simulation.

Constructors

Link copied to clipboard
constructor(sources: List<SourceNode>)

Properties

Link copied to clipboard

All node groups (both individual nodes and grouped nodes) in the scenario.

Link copied to clipboard

All metrics registered with this scenario.

Link copied to clipboard

the source nodes that generate entities into the network

Functions

Link copied to clipboard
fun addMetric(metric: MetricGroup)

Registers a metric with this scenario.

Link copied to clipboard
fun bfs(): List<Node>

Performs a breadth-first search to find all nodes reachable from source nodes.

Link copied to clipboard
inline fun <T> every(): Sequence<T>