Connection

NodeBuilder joining two non-adjacent parts of a queue network, or spanning two otherwise separate queue networks, together.

Properties

Link copied to clipboard
abstract val channelType: ChannelT

Functions

Link copied to clipboard
fun <T> NodeBuilder<T, *>.thenBoundedQueue(label: String, capacity: Int, policy: QueuePolicy<T> = FIFOQueuePolicy()): RegularNodeBuilder<BoundedQueueNode<T>, T, ChannelType.Pull>

Attaches a buffered queue (of limited max capacity) into the builder chain, which can then be continued after this call. If a bounded queue reaches maximum capacity, the node will not accept anymore pushes, or will not pull from the upstream node, until something has left the bounded queue

Link copied to clipboard

Attaches a dead end node and terminates the builder chain. This represents a node whose push input channel is always closed, or never pulls.

Link copied to clipboard

Attaches a delay node to the builder chain, applying a delay to all vehicles passing through the node. Vehicles that has passed through the delay node are pushed to the next node in the chain.

Link copied to clipboard

Attaches a fork node to the builder chain, which splits the current builder chain to numLanes parallel lanes, whose behaviour is determined by laneAction. The subsequent lanes will commence with a pull input connection from the fork.

fun <ItemT, R> NodeBuilder<ItemT, ChannelType.Push>.thenFork(label: String, lanes: List<(RegularNodeBuilder<PushForkNode<ItemT>, ItemT, ChannelType.Push>) -> R>, policy: ForkPolicy<ItemT> = forkPolicy(RandomPolicy())): List<R>
fun <ItemT, R> NodeBuilder<ItemT, ChannelType.Push>.thenFork(label: String, numLanes: Int, policy: ForkPolicy<ItemT> = forkPolicy(RandomPolicy()), laneAction: (Int, RegularNodeBuilder<PushForkNode<ItemT>, ItemT, ChannelType.Push>) -> R): List<R>

Attaches a fork node to the builder chain, which splits the current builder chain to numLanes parallel lanes, whose behaviour is determined by laneAction. The subsequent lanes will commence with a push input connection from the fork.

Link copied to clipboard

Attaches a loss sink, a special loss node that is hidden from certain metrics, to be used to simulate loss / dropped items

Link copied to clipboard

Attaches a match node into the builder chain, which can then be continued after this call.

Link copied to clipboard

Attaches a pump node to the builder chain, converting the builder chain from a pull output to a push output.

Link copied to clipboard
fun <ItemT, R> NodeBuilder<ItemT, *>.thenPushFork(label: String, lanes: List<(RegularNodeBuilder<PushForkNode<ItemT>, ItemT, ChannelType.Push>) -> R>, policy: ForkPolicy<ItemT> = forkPolicy(RandomPolicy())): List<R>
fun <ItemT, R> NodeBuilder<ItemT, *>.thenPushFork(label: String, numLanes: Int, policy: ForkPolicy<ItemT> = forkPolicy(RandomPolicy()), laneAction: (Int, RegularNodeBuilder<PushForkNode<ItemT>, ItemT, ChannelType.Push>) -> R): List<R>

Attaches a fork node to the builder chain, which splits the current builder chain to numLanes parallel lanes, whose behaviour is determined by laneAction. The subsequent lanes will commence with a push input connection from the fork.

Link copied to clipboard
fun <T> NodeBuilder<T, *>.thenQueue(label: String, policy: QueuePolicy<T> = FIFOQueuePolicy()): RegularNodeBuilder<QueueNode<T>, T, ChannelType.Pull>

Attaches an unbuffered queue (infinite capacity) into the builder chain, which can then be continued after this call.

Link copied to clipboard
fun <T> NodeBuilder<T, *>.thenService(label: String, delayProvider: DelayProvider, numServers: Int = 1): RegularNodeBuilder<ServiceNode<T>, T, ChannelType.Push>

Attaches a service node into the builder chain, which can then be continued after this call.

Link copied to clipboard
fun <T> NodeBuilder<T, *>.thenSink(label: String): SinkNode<T>

Attaches a sink and terminates the builder chain.

Link copied to clipboard

Attaches a split node into the builder chain. Then the different pathways for the splitter node outputs are defined. Split node simulates a location where one item splits into two items, such as

Link copied to clipboard

Attaches a bounded subnetwork defined in inner to the current NodeBuilder chain. The output of the subnetwork can then be connected to downstream nodes using the DSL system as well.