NetworkBuilder

The receiver scope for queueingNetwork. Provides node-creation functions and routing operators. Routing targets may be given as live references or, for the string overloads, as node names resolved after the block completes (enabling forward references such as rework loops declared before their target).

Types

Link copied to clipboard

Scope for declaring predicate-based routing cases.

Properties

Link copied to clipboard

The network being built; also its read-only view via StationNetworkCIfc.

Functions

Link copied to clipboard
fun batch(name: String, batchSize: Int, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver): BatchStation

Declares a batch-forming station. See StationNetwork.batchStation.

Link copied to clipboard
fun blocking(name: String, bufferCapacity: Int, activityTime: RVariableIfc, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver): BlockingStation

Declares a finite-buffer blocking station. See StationNetwork.blockingStation.

Link copied to clipboard
fun delay(name: String, activityTime: RVariableIfc = ConstantRV.ZERO, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver): ActivityStation

Declares a pure-delay (infinite-server) station. See StationNetwork.activityStation.

Link copied to clipboard
fun fork(name: String, join: JoinStation, childCount: ChildCountIfc, childFactory: ChildFactoryIfc? = null, childReceiver: QObjectReceiverIfc = NotImplementedReceiver, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver): ForkStation

Declares the fork side of a fork-join pair. See StationNetwork.forkStation.

Link copied to clipboard
fun gate(name: String, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver, initiallyOpen: Boolean = true): GateStation

Declares a gate station (holds instances while closed). See StationNetwork.gateStation.

Link copied to clipboard
fun join(name: String, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver): JoinStation

Declares the join side of a fork-join pair. See StationNetwork.joinStation.

Link copied to clipboard
fun nhppSource(name: String, durations: DoubleArray, rates: DoubleArray, firstReceiver: QObjectReceiverIfc = NotImplementedReceiver, streamNum: Int = 0, maxArrivals: Long = Long.MAX_VALUE, marking: (ModelElement.QObject) -> Unit? = null): NHPPSource

Declares a non-homogeneous Poisson arrival source from parallel durations and rates arrays. See StationNetwork.nhppSource.

Link copied to clipboard
fun pool(name: String, capacity: Int = 1): SResourcePool

Declares a shared resource pool. See StationNetwork.resourcePool.

Link copied to clipboard
fun pooledStation(name: String, pool: SResourcePool, activityTime: RVariableIfc = ConstantRV.ZERO, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver): ResourcePoolStation

Declares a station that seizes from a shared pool. See StationNetwork.resourcePoolStation.

Link copied to clipboard
fun release(name: String, resource: SResource, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver): ReleaseStation

Declares an atomic release station. See StationNetwork.releaseStation.

Link copied to clipboard
fun resource(name: String, capacity: Int = 1): SResource

Declares a free-standing resource. See StationNetwork.resource.

Link copied to clipboard
fun route(name: String, vararg steps: QObjectReceiverIfc): Route

Declares and registers a named Route over the given ordered steps.

Link copied to clipboard
fun Station.routeByChance(vararg branches: Pair<Double, QObjectReceiverIfc>, streamNum: Int = 0)

Routes probabilistically among branches (each probability to receiver). Probabilities must sum to 1.0.

Link copied to clipboard

Routes by predicate, first match wins, falling back to default.

Link copied to clipboard

Routes by the instance's ModelElement.QObject.qObjectType among branches, falling back to default.

Link copied to clipboard

Routes to receivers in cyclic (round-robin) order.

Link copied to clipboard
infix fun SourceStation.routeTo(nodeName: String)

Routes a source's output to the node registered under nodeName (resolved after the block).

Routes a source's output directly to receiver.

infix fun Station.routeTo(nodeName: String)

Routes a station's output to the node registered under nodeName (resolved after the block).

infix fun Station.routeTo(receiver: QObjectReceiverIfc)

Routes a station's output directly to receiver.

Link copied to clipboard
fun Station.routeToShortestQueueOf(vararg stations: Station)

Routes to whichever of stations currently has the least work in process.

Link copied to clipboard
fun seize(name: String, resource: SResource, amount: Int = 1, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver): SeizeStation

Declares an atomic seize station. See StationNetwork.seizeStation.

Link copied to clipboard
fun separate(name: String, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver): SeparateStation

Declares a batch-separating station. See StationNetwork.separateStation.

Link copied to clipboard
fun sink(name: String): SinkStation

Declares a disposal sink. See StationNetwork.sink.

Link copied to clipboard
fun source(name: String, interArrivalRV: RVariableIfc, firstReceiver: QObjectReceiverIfc = NotImplementedReceiver, timeUntilFirstRV: RVariableIfc = interArrivalRV, maxArrivals: Long = Long.MAX_VALUE, qObjectClass: QObjectClass? = null, marking: (ModelElement.QObject) -> Unit? = null): SourceStation

Declares an arrival source. See StationNetwork.source.

Link copied to clipboard
fun station(name: String, activityTime: RVariableIfc = ConstantRV.ZERO, capacity: Int = 1, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver): SingleQStation

Declares a single-queue station. See StationNetwork.singleQStation.