ServiceNode
class ServiceNode<T>(label: String, source: PushInputChannel<T>, destination: PushOutputChannel<T>, delayProvider: DelayProvider, numServers: Int) : ContainerNode<T> , Service<T> , HasProgressBars
Processes entities through parallel servers, each introducing a delay. When all servers are busy, the input channel closes to prevent additional arrivals. Reopens when a server becomes available.
Parameters
T
the type of entities being served
label
the name of this node
source
the input channel from which entities arrive
destination
the output channel where processed entities are sent
delayProvider
the DelayProvider that determines service duration for each entity
numServers
the number of parallel servers
Constructors
Link copied to clipboard
constructor(label: String, source: PushInputChannel<T>, destination: PushOutputChannel<T>, delayProvider: DelayProvider, numServers: Int)
Properties
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
Provides display properties from the DelayProvider.
Link copied to clipboard