NWayStation

class NWayStation(parent: ModelElement, numQueues: Int, activityTime: RVariableIfc, capacity: Int = 1, selectionRule: NWayQueueSelectionRuleIfc = PriorityQueueSelection(), nextReceiver: QObjectReceiverIfc = NotImplementedReceiver, name: String? = null) : ModelElement, RoutingOutletsIfc, NWayStationCIfc(source)

A station with several input queues sharing one server group. Each input has its own queue (reached via input); when a server unit is free, a NWayQueueSelectionRuleIfc chooses which queue to serve next. This models multi-class or multi-stream service with an explicit cross-queue discipline.

Parameters

parent

the model element serving as this station's parent

numQueues

the number of input queues (>= 1)

activityTime

the service-time distribution

capacity

the number of server units (>= 1)

selectionRule

the cross-queue selection rule (default: strict priority by index)

nextReceiver

where processed instances go next

name

the name of the station

Constructors

Link copied to clipboard
constructor(parent: ModelElement, numQueues: Int, activityTime: RVariableIfc, capacity: Int = 1, selectionRule: NWayQueueSelectionRuleIfc = PriorityQueueSelection(), nextReceiver: QObjectReceiverIfc = NotImplementedReceiver, name: String? = null)

Properties

Link copied to clipboard
open override val hasOnwardRouting: Boolean

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.

Link copied to clipboard
open override val numInStation: TWResponseCIfc

Time-weighted number of instances in the station (waiting plus in service).

Link copied to clipboard
open override val numProcessed: CounterCIfc

The number of instances processed.

Link copied to clipboard

The input queues (read-only).

Link copied to clipboard
Link copied to clipboard
open override val stationTime: ResponseCIfc

Time in the station per processed instance.

Functions

Link copied to clipboard
protected open override fun initialize()

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

Link copied to clipboard

Returns the receiver for input stream index (its dedicated queue).

Link copied to clipboard

Sets the receiver of processed instances.

Link copied to clipboard
open override fun outlets(): List<QObjectReceiverIfc>

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).