NodeScope

A node scope: configures one IHP/CD and may nest children under it.

Properties

Link copied to clipboard

Install a load-forming carrier on this node's outbound.

Link copied to clipboard

This node's unique name.

Link copied to clipboard

Per-edge formation toward this node's supplier.

Link copied to clipboard

Transport time on the supplier → this-node edge; null ⇒ immediate.

Functions

Link copied to clipboard
fun attachedToExternalSupplier(transportTime: RVSpec? = null)

For a root node only: set the transport time on the external supplier → this-node edge. Equivalent to assigning transportTimeFromParent, but reads as intent at a root.

Link copied to clipboard

Allocate the next auto stream number from the enclosing network.

Link copied to clipboard
fun crossDock(name: String, block: NodeScope.() -> Unit = {}): NodeScope

A child cross-dock supplied by this node.

Link copied to clipboard
fun demand(item: ItemRef, interArrival: RVSpec, name: String? = null, transportTime: RVSpec? = null, shipmentFormation: ShipmentFormationSpec? = null)

Attach a customer-demand generator at this node.

Link copied to clipboard
fun holdingPoint(name: String, block: NodeScope.() -> Unit = {}): NodeScope

A child IHP supplied by this node.

Link copied to clipboard
fun inventory(item: ItemRef, block: InventoryScope.() -> Unit)

Add an inventory configured by a InventoryScope block.

fun inventory(item: ItemRef, policy: PolicySpec, initialOnHand: Int)

Add an inventory directly from a PolicySpec (table-friendly).

Link copied to clipboard
fun tier(count: Int, namePrefix: String, transportTime: RVSpec? = null, config: NodeScope.(Int) -> Unit = {})

Generate count child IHPs named ${namePrefix}1..${namePrefix}N under this node, each with a common config block (which receives the zero-based index).

Link copied to clipboard
fun tierFromTables(namePrefix: String, items: List<ItemRef>, policyTable: List<List<PolicySpec>>, initialOnHand: Int, transportTime: RVSpec? = null, demandTable: List<List<RVSpec?>>? = null)

Expand a node × item table into a tier of child IHPs. Row r becomes child ${namePrefix}${r+1}; column c is items[c]. Each cell of policyTable becomes an inventory (with initialOnHand); each non-null cell of demandTable (if given) becomes a demand generator. Mirrors the MultiEchelonNetworkSSPolicyExample rsTable / demandMeans, but as data.