Package-level declarations
Types
Per-IHP-backlog cost calculator: observes one BackLogPolicyAbstract and populates the continuous-rate CostLine.Backorder line.
Per-builder cost calculator: observes one DemandLoadBuilder and produces the CostLine.ShipmentBuilderHolding line item, summing per-(builder, item) on-hand carrying cost.
Observables from a DemandLoadBuilder. Drives the shipment-builder holding-cost line per-(node, item) when the builder was constructed with itemTypes non-empty (the MultiEchelonNetwork wires this automatically).
Concrete builder-observables snapshot. perItemUnitsOnHand captures the per-item TW averages for every item the builder is tracking; unitsOnHandAvg looks up by item (returning null for untracked items).
A cost calculator observes one source ModelElement and produces one or more line-item Responses populated at the source's REPLICATION_ENDED notification.
A cost formulation is a container of CostCalculators plus the rollup Responses (per line, per tier, grand total) that summarize them at every replication's end.
Identifier for a single line item produced by a CostFormulation. Used as a key in CostCalculator.lineResponses and as the index into CostFormulation.byLineResponse for per-line rollup queries.
Parameter bundle for a DefaultMultiEchelonCostFormulation. All rate values are denominated in 1 / (modeler-chosen time unit) — the framework performs no time-unit conversion and makes no presumption about what the modeler's rate basis is. The emitted cost-line Responses are therefore reported in the modeler's chosen time unit (a carryingRate of 0.10/year produces a holding cost in $/year; 0.10/day produces it in $/day).
Standard cost formulation for a MultiEchelonNetwork. Walks the network at construction time and instantiates one CostCalculator per source kind: per inventory, per backlog, per outbound edge (inbound and outbound), per load builder, plus one for the ES.
Per-edge observables from a carrier. An edge is identified by its supplier (the network node owning the carrier or, for the ES, the network itself) and its customer (the DemandSenderIfc destination of shipments on this edge).
Per-edge inbound cost calculator: observes the supplier's outbound carrier and produces the CostLine.Unloading line item for one specific destination edge.
Per-edge outbound cost calculator: observes one carrier (the outbound carrier of an IHP or CD) and produces the CostLine.Loading and CostLine.Shipping line items for one specific destination edge.
External-supplier loading-cost calculator: observes the network's ES outbound carrier and produces the CostLine.ESLoading line item, priced at CostParams.esLoadingCost per shipment.
External-supplier-tier observables. Single field for now; structured as an interface so future ES-only metrics (e.g., supplier-availability statistics) can be added without changing cost-calculator signatures.
Per-(IHP, item) cost calculator: observes one Inventory and populates six line-item Responses at the inventory's REPLICATION_ENDED notification. Source-owned data drives every line; the calculator performs pure multiplication on stable within-replication statistics with no framework-side time-unit conversion (see docs/supply-chain-cost-redesign.md §2 "Note on warmup handling").
Typed snapshot contracts for cost calculators. Each interface represents the data a cost calculator's ModelElementObserver.replicationEnded callback needs from one source ModelElement, captured at the moment that source's within-replication statistics are stable (immediately after the source's own replicationEnded() runs).
Concrete snapshot of an Inventory's cost observables at the moment of construction. Snapshot semantics: every field is read eagerly so the object is immutable and safe to retain after the replication ends.
NetworkTimeBased-strategy variant of EdgeInboundCostCalculator: observes a shared TimeBasedNetworkDemandCarrier and produces CostLine.Unloading for one specific (filler, destination) edge.
NetworkTimeBased-strategy variant of EdgeOutboundCostCalculator: observes a shared TimeBasedNetworkDemandCarrier and produces CostLine.Loading + CostLine.Shipping for one specific (filler, destination) edge.
NetworkTimeBased-strategy variant of ESCostCalculator: observes a shared TimeBasedNetworkDemandCarrier and produces CostLine.ESLoading, summing shipments across every ES → node edge.
Identifier for a tier of the multi-echelon network. Used as the index into CostFormulation.byTierResponse for per-tier rollup queries. Each line-item Response a calculator produces is attributable to exactly one tier, determined by the source kind.
A DefaultMultiEchelonCostFormulation whose cost rates vary by node. Every calculator uses the CostParams override registered for its owning node (keyed by node name), falling back to defaultParams for nodes without an override and for the external supplier's own outbound.
Functions
Capture an InventoryCostObservables snapshot of this inventory's current within-replication state. Intended to be called from a cost calculator's ModelElementObserver.replicationEnded(this) callback, when KSL guarantees the within-replication statistics are stable for the post-warmup window.
Capture a BuilderCostObservables snapshot from this builder. Loops over DemandLoadBuilder.trackedItemTypes and reads each item's TW-average units-on-hand; returns an empty per-item map when the builder was constructed without an itemTypes list.