Package-level declarations
Types
The result of SupplyChainBuilder.build: the running MultiEchelonNetwork plus the handles a caller needs to post-mutate it (the v1 escape hatch for custom carriers, backlog policies, delivery endpoints, RULE formation, and custom cost formulations).
Serializable description of a cost formulation to attach to the network. A NetworkSpec may carry several (a comparative study on one simulation — see the cost-redesign doc's multi-attach support). The builder constructs and attaches each one last, after the topology is final, satisfying the cost-formulation ordering and coverage guards.
Serializable twin of the framework's CostParams. Kept separate from the runtime type so the runtime CostParams stays free of serialization annotations. The builder (D5) constructs a CostParams from these fields.
Serializable description of a customer-demand arrival process at a node.
Per-edge shipment-formation forming option, mirroring the framework's DemandLoadBuilder.LoadFormingOption — minus RULE, which carries a user-supplied function and cannot be serialized (use the v1 escape hatch: build the spec, then install the rule in Kotlin).
Configures the policy and initial stock of one inventory.
Serializable description of one inventory (one item type) held at a node.
A handle to an item declared via SupplyChainScope.item. Carries just the item name; inventories and demand generators reference an item by handle for type-safety and refactor tolerance.
A [min, max] limit pair for FormingOption.WEIGHT / FormingOption.CUBE formation. A small data class rather than a Pair so it serializes cleanly to TOML and JSON.
The canonical, serializable description of a multi-echelon supply-chain network — the single data form that the Kotlin DSL, the TOML/JSON loaders, and programmatic generators all produce, and that SupplyChainBuilder consumes to instantiate a running MultiEchelonNetwork.
Serializable description of a network node and its edge to its supplier.
Serializable description of an inventory replenishment policy on an InventorySpec. Maps to the three concrete policy factory methods on the framework's Inventory:
Serializable description of a random variable used in a NetworkSpec (an item lead time, a transport time, an inter-arrival time, a periodic review interval).
Serializable description of a per-edge shipment-formation policy, mirroring the framework's ShipmentFormation. Attached to a NodeSpec (NodeSpec.shipmentFormationFromParent) or a DemandGeneratorSpec (DemandGeneratorSpec.shipmentFormation).
A single validation problem found in a NetworkSpec. The message carries enough context (node / item / edge names) to fix the data without reading a KSL stack trace.
Allocates unique stream numbers from a documented base, up to count of them. Useful for reserving a contiguous block of streams for a subsystem so a saved spec stays deterministic and non-overlapping. See also SupplyChainScope.autoStream.
Instantiates a running MultiEchelonNetwork from a NetworkSpec.
Marks the supply-chain DSL receiver types so that members of an outer scope cannot be called implicitly from an inner one (e.g. you cannot declare an SupplyChainScope.item from inside a node block).
Top-level DSL scope: items, root nodes, cost formulations, strategy.
Serializable description of a network's transport strategy, mirroring the framework's TransportStrategy sealed class.
Functions
FormingOption.ALWAYS single-demand-per-load formation.
A deterministic RVSpec.Constant.
FormingOption.COUNT formation: ship a load every limit demands.
FormingOption.CUBE formation with the given [min, max] cube window.
An RVSpec.Exponential with the given mean and explicit stream number.
Parse a NetworkSpec from a JSON string produced by toJson.
Parse a NetworkSpec from a TOML string produced by toToml.
Author a NetworkSpec with a Kotlin DSL. The DSL is pure sugar over the data layer: it builds and returns a NetworkSpec and never touches runtime framework types. Visual nesting (holdingPoint { holdingPoint { } }) lowers to the flat node list, with each node's parent inferred from the enclosing scope.
Serialize this spec to a JSON string.
Serialize this spec to a TOML string.
A RVSpec.Triangular with the given min / mode / max.
Validate the structural and reference integrity of this NetworkSpec, returning every problem found (not just the first). An empty list means the spec is well-formed and safe to pass to SupplyChainBuilder.build.
FormingOption.WEIGHT formation with the given [min, max] weight window.