NHPPSource
A non-homogeneous Poisson process source: generates arriving QObject instances at a time-varying rate driven by a PiecewiseRateFunction, then injects them into the StationNetwork. The companion to SourceStation for non-stationary arrivals.
Internally wraps NHPPPiecewiseRateFunctionEventGenerator. The rate function can be piecewise-constant or piecewise-linear; the most common case (piecewise-constant rates over fixed-duration intervals) is offered via StationNetwork.nhppSource which takes parallel durations and rates arrays. Instances are created by the source and may be marked (typed, given attributes, or assigned their own value object) via the supplied marking action before they enter the network. Externally created instances can also be injected by calling receive directly.
Typically created via StationNetwork.nhppSource.
Parameters
the network this source feeds
the piecewise rate function
the receiver that processes generated instances
the stream number for the underlying NHPP
the maximum number of arrivals to generate
optional action applied to each newly created instance
the name of the station
Properties
True if this node has any onward routing configured (a static next receiver, a station-level sender, or a class route). A non-terminal node for which this is false — and which is not a non-terminal step of a registered route — is a dangling node and fails validation.
The number of instances generated by this source.
The name of this port, unique within its StationNetwork.
Functions
Sets the receiver that processes generated instances.
The statically known receivers this node may route to. Best-effort: empty when the node has no static link or when its routing is opaque (for example, a probabilistic sender whose destinations are not introspectable).
Receives a QObject as the network's ingress: performs the network entry bookkeeping and forwards the instance. If the instance carries its own sender (for example, a class-supplied route), that sender drives the first hop; otherwise the configured first receiver is used. Generated arrivals and externally injected instances both flow through here.
Stops generating further arrivals; the source still accepts externally injected instances via receive. Typically called from a scheduled action (e.g., a door-closing time) — pairs with the conditional-routing pattern where in-flight instances also short-circuit to an exit when a model flag flips.