DelayNode

class DelayNode<T>(label: String, source: PushInputChannel<T>, destination: PushOutputChannel<T>, delayProvider: DelayProvider) : ContainerNode<T> , Delay<T> , HasProgressBars

Introduces a time delay to entities passing through. Receives entities and delays them before sending them to the destination, with the delay determined by the delayProvider.

Parameters

T

the type of entities passing through

label

the name of this node

source

the input channel from which entities are received

destination

the output channel where delayed entities are sent

delayProvider

the DelayProvider that determines delay duration for each entity

Constructors

Link copied to clipboard
constructor(label: String, source: PushInputChannel<T>, destination: PushOutputChannel<T>, delayProvider: DelayProvider)

Properties

Link copied to clipboard
override val incoming: List<InputChannel<*, *>>
Link copied to clipboard
Link copied to clipboard
open override var occupants: Int

the current number of entities being delayed

Link copied to clipboard
override val outgoing: List<OutputChannel<*, *>>
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun onCreateProgressBar(callback: context(Simulator) (label: String, delay: Duration) -> Unit)

Registers a callback to be invoked when a progress bar should be displayed.

Link copied to clipboard
open override fun onEnter(callback: context(Simulator) (T) -> Unit)

Registers a callback to be invoked when an entity enters this container.

Link copied to clipboard
open override fun onLeave(callback: context(Simulator) (T) -> Unit)

Registers a callback to be invoked when an entity leaves this container.

Link copied to clipboard
context(_: Simulator)
open fun onStart()
Link copied to clipboard
open override fun properties(): List<DisplayProperty>

Provides display properties from the DelayProvider.

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String