queueingNetwork

Creates a StationNetwork using the type-safe builder DSL. The block declares sources, stations, sinks, and the routing between them; the network is the parent of every created node. This is a thin facade over the network's creation helpers and routing primitives — anything expressible here is expressible by hand and vice versa.

val net = model.queueingNetwork("pharmacy") {
val exit = sink("exit")
val window = station("window", exponential(4.0, 2))
val arrivals = source("arrivals", exponential(6.0, 1))
arrivals routeTo window
window.routeByChance(0.9 to exit, 0.1 to window) // 10% rework
}