Station Network
A StationNetwork is a container that models a queueing network as a graph of receivers (stations) connected by senders/routers. It owns the network-level responses that essentially every queueing model re-derives by hand — the number in the system, the total time in the system, and the number completed — and it provides a name registry, named boundary ports (ingress/egress), and a lifecycle event stream so that the network is an open, observable system.
Stations are created through the helper functions (source, singleQStation, activityStation, sink) so that each station is parented to the network, named consistently, and registered for lookup and validation. The helpers are intentionally plain functions; a type-safe builder DSL is layered on top of them separately.
Expose StationNetworkCIfc to clients that only need to observe the network.
Parameters
the model element serving as this network's parent
the name of the network
Properties
The registered QObject class names within the network.
Diagnostic: the number of entities still holding allocations at the end of each replication. Non-zero typically reflects work-in-process at the end of a terminating run (normal); a steadily growing value across replications suggests a leak (an entity that seized but never released — surfaced more precisely by the exit-time validation in sinks/transfers/joins/separates).
The number of QObject instances that have left the network.
The number of QObject instances currently within the network.
The total time that a QObject instance spends from creation to leaving the network.
Functions
Creates an ActivityStation (pure delay, no resource contention) parented to the network and registered under name.
The allocations qObject currently holds, in seize order (possibly empty).
The directed connections between registered nodes (best-effort static graph).
Attaches an observer for the network's lifecycle events.
Creates a BatchStation that forms batches of batchSize instances, parented to the network and registered under name.
Creates a BlockingStation (finite buffer, block-after-service), parented to the network and registered under name.
The per-class number completed, or null if className is not registered.
The per-class total time in the system, or null if className is not registered.
Detaches a previously attached observer.
Creates a ForkStation (the send side of a fork-join pair) tied to a paired join, parented to the network and registered under name.
Creates a GateStation (holds instances while closed), parented to the network and registered under name.
Creates an IngressStation (a non-generating entry port for transferred or externally created instances), parented to the network and registered under name.
This method should be overridden by subclasses that need actions performed to initialize prior to a replication. It is called once before each replication occurs if the model element wants initialization. It is called after beforeReplication() is called
Creates a JoinStation (the receive side of a fork-join pair), parented to the network and registered under name. Route to a specific input with the "name#0" (parent) or "name#1" (child) target syntax.
Creates a MatchStation (assembles one instance from each input, optionally by a matching key). Wired through its MatchStation.input endpoints, so it is network-parented but not a single routing node.
Creates an NHPPSource (non-homogeneous Poisson arrival source driven by a piecewise rate function), parented to the network and registered under name.
Convenience overload that creates an NHPPSource from parallel durations and rates arrays (piecewise-constant rate function), parented to the network and registered under name.
Returns the registered node with the given name or null if not present.
Creates an NWayStation (several input queues sharing one server group), parented to the network and registered under name. Wire upstream nodes to the station's NWayStation.input endpoints.
Creates a ProcessStation in this network whose activity is the supplied process activity, registered under name. Wire upstream nodes to it like any receiver.
Registers a node (receiver) under a name that is unique within the network. The creation helpers call this automatically; supply a custom receiver or router here to make it part of the network's graph and validation.
Registers a QObject class for per-class statistics. The creation helpers call this automatically when a class is supplied to a source. Registering the same class (same name and type id) more than once is a no-op; registering a conflicting class is an error.
Registers a Route so its step-to-step connections are included in the network graph and so its non-terminal steps are exempt from the dangling check (their onward routing is carried dynamically on each instance). The route also becomes lookup-able by name via route. The creation/registration helpers register class routes automatically.
Creates a ReleaseStation that releases this entity's oldest outstanding allocation on resource, parented to the network and registered under name.
This method should be overridden by subclasses that need actions performed when the replication ends and prior to the calling of afterReplication(). It is called when each replication ends and can be used to collect data from the model element, etc.
Creates a free-standing SResource of capacity units parented to the network. The resource is not a routing node; pass it to seizeStation / releaseStation for Arena-style atomic seize/release.
Creates a shared SResourcePool of capacity units parented to the network. The pool is not a routing node; pass it to resourcePoolStations that share it.
Creates a ResourcePoolStation that seizes from a shared pool, parented to the network and registered under name.
Creates a SeizeStation that acquires amount units of resource (or queues the entity if not available), parented to the network and registered under name.
Creates a SeparateStation that recovers batch members, parented to the network and registered under name.
Creates a SingleQStation (single queue, simple resource) parented to the network and registered under name.
Creates a SinkStation (egress that disposes of received instances) parented to the network and registered under name.
Creates a SourceStation that generates arriving QObject instances and injects them into the network. The created station is registered under name and returned for further wiring.
Creates a TransferStation that hands instances off to target (typically another network's ingress), parented to this network and registered under name.