nhppSource

fun nhppSource(name: String, rateFunction: PiecewiseRateFunction, firstReceiver: QObjectReceiverIfc = NotImplementedReceiver, streamNum: Int = 0, maxArrivals: Long = Long.MAX_VALUE, marking: (ModelElement.QObject) -> Unit? = null): NHPPSource(source)

Creates an NHPPSource (non-homogeneous Poisson arrival source driven by a piecewise rate function), parented to the network and registered under name.

Parameters

name

the node name, unique within the network

rateFunction

the piecewise rate function (constant or linear)

firstReceiver

the receiver that processes generated instances

streamNum

the stream number for the underlying NHPP

maxArrivals

the maximum number of arrivals to generate

marking

optional action applied to each newly created instance


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(source)

Convenience overload that creates an NHPPSource from parallel durations and rates arrays (piecewise-constant rate function), parented to the network and registered under name.