Package-level declarations
Types
Models a simple delay.
An opaque token describing one outstanding seize: the resource, the amount of units held, the simulated seizeTime at which the units were acquired, and the name of the SeizeStation that recorded the seize.
Accumulates arriving QObject instances until batchSize have been collected, then forms a single batch QObject (carrying the members as its attached object) and sends it onward. A SeparateStation is the inverse, recovering the members.
Read-only view of a BatchStation.
A receiver with a finite capacity that can report whether it can accept an instance and notify upstream stations when space frees. This enables manufacturing (block-after-service) blocking between stations.
A single-server station with a finite buffer that uses block-after-service semantics: when the server completes an instance but the downstream receiver cannot accept it, the server is blocked — it holds the finished instance and does not start the next one until the downstream frees a slot. A chain of blocking stations models a production line with limited buffers and back-pressure.
Read-only view of a BlockingStation.
Promises to randomly pick the receiver and send the arriving QObject instance to the receiver. Can act as both a receiver and a sender of QObject instances. Receiving instances are immediately sent.
Routes each arriving QObject to the receiver mapped to its ModelElement.QObject.qObjectType, falling back to default when the type is not present in typeMap. This is the natural routing primitive for a multi-class network, where each class follows its own path.
A fixed changeover setup: setup time is incurred whenever the type changes (including the first job), and zero when the next job is the same type as the previous one.
Returns how many children to spawn for a parent.
Configures a freshly created child QObject for a given parent. The child itself is constructed by the ForkStation (since QObject is an inner class of ModelElement and must be created in model-element context); this hook marks/types it, attaches a value object, etc. Called once per spawned child. Mirrors the source-station marking idiom.
Routes each arriving QObject to the receiver of the first cases entry whose predicate holds for that instance, falling back to default if none match. This is the QObject-aware, N-way generalization of a two-way condition sender: the predicates are evaluated against the instance being routed.
Can be used to capture the total number disposed through this station and the total time in the system at this dispose. The optionally supplied number in the system response will be decremented by 1 if supplied.
How an in-service unit is treated when a failure occurs:
The send-side of a fork-join pair: receives a parent QObject, spawns a variable number of children, and routes the parent onward concurrently with the children. Children are created by childFactory and registered with the paired join so it can reunite them with the parent.
Read-only view of a ForkStation.
A gate that passes arriving QObject instances straight through while open, and holds them (in arrival order) while closed. Opening the gate releases all held instances. The gate is controlled externally via open and close — for example by a scheduled event, a controller, or an agent reacting to network state — making it the station-view hook for signal/condition control.
Read-only view of a GateStation.
A non-generating entry port: accepts externally created or transferred QObject instances into the network (performing the entry bookkeeping) and forwards them to the first internal receiver. Unlike a SourceStation it does not generate arrivals; it is the receiving end of a TransferStation or any external producer.
The receive-side of a fork-join pair: holds each parent until all of its children have arrived, then emits the parent onward. A parent and its expected child count are registered by the paired ForkStation at fork time; the join holds state keyed by parent.id and releases the parent when arrivedChildren == expectedChildren regardless of arrival order (parent-first or children-first).
Read-only view of a JoinStation.
Restricts implicit receivers within the station-network builder DSL.
A per-instance marking action applied by a SourceStation to each freshly created QObject. Use to sample a type id, attach a value object, set a priority, or attach a route — anything that varies per instance and can't be expressed as a static QObjectClass.
Synchronizes (assembles) instances arriving on several inputs: when one instance is available on every input — optionally with the same matching key — the station removes one from each, combines them into a single instance (carrying the members as its attached object), and sends it onward.
Read-only view of a MatchStation.
A directed connection between two registered nodes of a StationNetwork, by name.
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).
A boundary port through which QObject instances leave a StationNetwork. An egress performs the network's exit bookkeeping (decrement the number in system, record the system time, count the completion, publish the exited-network event) and then either disposes of the instance or hands it off to an external receiver.
A boundary port through which QObject instances enter a StationNetwork. An ingress performs the network's entry bookkeeping (increment the number in system, publish the entered-network event) and then forwards the arriving instance to the first internal receiver.
Observes lifecycle events published by a StationNetwork. Override only the events of interest; all methods do nothing by default. This is the notification seam other modeling views (process, agent-based) subscribe to.
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.
Allows an REmpiricalList to act as a receiver of qObjects and to send them to destination receivers according to the specified probabilities.
Selects which of several input queues a multi-queue station serves next. Returns the index of the queue to serve, or null when all are empty.
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.
Read-only view of an NWayStation.
Picks the minimum from the list of stations based on the comparator. Causes the arriving qObject to be received at the picked station.
Picks the minimum from the list of stations based on the comparator.
Serves the lowest-index non-empty queue first (strict priority by queue index).
Routes each arriving QObject to a receiver chosen at random by picker. The knownDestinations make the random choice introspectable for the network graph (the picker alone does not expose its elements). Supply a picker — such as an ksl.modeling.elements.REmpiricalList — over the same destinations.
A named template for a class of QObject instances flowing through a StationNetwork. A class is a configuration, not a factory: instances are created by a SourceStation and then have the class's template applied to them. This is the bridge to multi-class queueing networks, where each class can carry its own type id, priority, service-time provider, and route.
A predicate over a QObject instance, used by routers to make data-dependent routing decisions. Unlike a plain () -> Boolean, the predicate is given the instance being routed, so routing can depend on its type, priority, value, or attached state.
A generic interface that can be implemented to facilitate the receiving of QObjects for processing.
A functional interface that promises to send. Within the context of qObjects a sender should cause a qObject to be (eventually) received by a receiver.
Represents an iterator based sequence of receivers that can be used to send the qObject to the next receiver. At the end of the iterator the default behavior is to silently end.
An atomic release: when an entity arrives, releases this entity's oldest outstanding allocation on resource (FIFO) and forwards. If the entity holds no allocation on the resource, the model is in error and the build fails loudly — releases must be paired with seizes.
Read-only view of a ReleaseStation.
Notified when a resource fails so that a station can preempt its in-service work (cancel the in-service event, bank the remaining time, and free the unit). Resumption and queue service happen on repair via the UnitsAvailableListenerIfc.
A single-queue station that seizes units from a shared SResourcePool rather than from its own resource. Several such stations sharing one pool model a set of servers (the pool) serving several distinct queues; a unit freed by any station can serve whichever waiting station the pool notifies first.
Cycles through the queues, serving the next non-empty one after the last served.
Routes arriving QObject instances to receivers in cyclic order, distributing successive instances round-robin regardless of their content.
A first-class, named, ordered visitation sequence through a set of receivers (a "process plan"). A route is a reusable template: each QObject that follows the route gets its own cursor via newSender, so many instances can traverse the same route concurrently without interfering.
A Router both receives a QObject and immediately sends it onward, choosing the destination as a function of the arriving instance. It is the QObject-aware generalization of QObjectSender: its selectNextReceiver is passed the instance being routed, so data-dependent routing (by type, by condition, by attribute) is expressible directly.
A pairing of a QObjectPredicate with the receiver to use when the predicate holds for the routed instance.
Implemented by network nodes that can describe their static onward routing, enabling a StationNetwork to assemble an introspectable graph and to validate the topology before a run.
An atomic seize: when an entity arrives, the station either acquires amount units of resource (recording the Allocation with the network so ReleaseStation can release it later) and forwards the entity, or blocks the entity in its own queue. When the resource gains units, the station serves as many waiting entities as it can.
Read-only view of a SeizeStation.
Separates a batch formed by a BatchStation back into its member instances, sending each member onward. A batch is recognized by an attached object that is a list of QObject members; the batch wrapper is discarded and the original members continue. A non-batch instance is passed through unchanged.
Read-only view of a SeparateStation.
Determines the setup (changeover) time incurred before a station serves a QObject, as a function of the previously served type and the arriving type. This supports sequence-dependent setups common in manufacturing.
Routes each arriving QObject to the station with the smallest work-in-process among stations, as ordered by comparator (default: fewest at station). This is the join-shortest-queue policy and generalizes the pick-station receiver.
Models a simple work station that has a single queue for holding received qObjects for processing and a simple resource that is used during the processing.
A SinkStation is the network's terminal egress: it disposes of the QObject instances it receives, decrementing the number in the system and recording the total time in the system. It is the self-contained special case of a NetworkEgress and generalizes DisposalStation by tying the disposal into the owning StationNetwork's system-level responses and event stream.
A SourceStation generates QObject instances according to an arrival process and injects them into a StationNetwork. It is the self-contained special case of a NetworkIngress that also creates the arriving instances.
A SResource represents a simple resource that can have units become busy. A resource is considered busy when it has 1 or more units seized. A resource is considered idle when all available units are idle. A resource has an initial capacity, which represents the units that can be allocated.
A pool of interchangeable resource units shared by one or more ResourcePoolStations. Stations seize and release units from the common pool, so a freed unit can serve whichever station's queue is waiting. When a unit is released, the pool notifies its registered stations (in registration order) so they can serve their queues.
Read-only view of an SResourcePool.
A station is a location that can receive, potentially process instances of the QObject class, and cause them to be received by other receivers via appropriate send logic.
A functional interface for determining the activity time at a station
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.
A read-only, observation-oriented view of a StationNetwork. Exposes the network-level responses and the introspectable set of node names, and allows attaching/detaching lifecycle observers, while hiding construction and mutation operations (the creation helpers, node registration, and the internal entry/exit bookkeeping). Expose this interface to clients of a network rather than the concrete class.
The operational contract a station programs against for its resource. This is the seam that lets a station use either a simple SResource or, later, a resource pool, without depending on a concrete type. It adds the mutating operations (seize/release, capacity changes, schedule attachment, and an availability listener) to the read-only SResourceCIfc.
An egress port that hands instances off to a target receiver — typically the IngressStation of another network — instead of disposing of them. This is the station-view realization of a network-to-network transfer "in a prescribed manner": an optional transferDelay models transport time, and an optional transform can re-mark/repackage the instance on hand-off.
Allows a Bernoulli choice between two qObject receivers. Receives the incoming qObject and sends it two one of two receivers according to the Bernoulli picking process.
Notified when a station resource gains available units (for example, after a capacity increase from a schedule), so that a waiting queue can be served.
Functions
Creates a StationNetwork using the type-safe builder DSL. The block declares sources, stations, sinks, and the routing between them; the network is the parent of every created node. This is a thin facade over the network's creation helpers and routing primitives — anything expressible here is expressible by hand and vice versa.