BoundedSubnetwork

A limited capacity compound node compiling the subnetwork, defined by inner, and attaching appropriate access-control nodes.

For metric tracking purposes, entities should not be converted to instances of other types within the network

Parameters

ItemT

Type of entity to passing through the subnetwork.

InputChannelT

Type of channel, upper bound by ChannelType, the subnetwork takes in as input

OutputChannelT

Type of channel, upper bound by ChannelType, the subnetwork produces

capacity

Maximum capacity of the bounded subnetwork

input

Connection into the bounded subnetwork

inner

Internal contents of the subnetwork

output

Output reference for the subnetwork's output to be connected to

Constructors

Link copied to clipboard
constructor(label: String, capacity: Int, input: Connection<out ItemT, InputChannelT>, inner: (NodeBuilder<ItemT, InputChannelT>) -> NodeBuilder<ItemT, OutputChannelT>, output: OutputRef<ItemT, OutputChannelT>)

Properties

Link copied to clipboard
open override val capacity: Int
Link copied to clipboard
override val incoming: List<InputChannel<*, *>>
Link copied to clipboard
open val isFull: Boolean

Whether the container is at max occupancy

Link copied to clipboard
Link copied to clipboard
open override val occupants: Int

The number of occupants held by the container

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

Percentage of how much of the container's max capacity is used at the moment

Functions

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

Callback to execute when an entity enters the container

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

Callback to execute when an entity leaves the container

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