Builder Cost Calculator
Per-builder cost calculator: observes one DemandLoadBuilder and produces the CostLine.ShipmentBuilderHolding line item, summing per-(builder, item) on-hand carrying cost.
Formula:
Σ_(items the builder is tracking) avgUnitsOnHand(item) × item.unitCost × carryingRateavgUnitsOnHand(item) is sourced from the builder's per-item on-hand TWResponse (created at builder construction when itemTypes is non-empty — Phase-3 follow-up #3 work). Builders constructed without itemTypes (the default) have an empty trackedItemTypes set and emit 0.0.
Tier attribution is supplied at construction time because a builder lives on a carrier, which lives on a network node, which could be an IHP or a CD. The formulation's buildCalculators walk knows the owning node and passes the matching tier.
Parameters
the ModelElement parent
the load builder this calculator observes
tier of the network node that owns the builder's carrier
cost-rate parameters
Constructors
Properties
The line-item Responses this calculator produces, keyed by CostLine. A calculator may produce a Response for every line its source can express; values for unproduced lines are absent from the map rather than zero.
The single source ModelElement this calculator observes.
Tier this calculator's source belongs to. Used by CostFormulation.byTierResponse to partition rollups across IHP / CD / ES. A calculator that attributes to multiple tiers (rare) returns null and is excluded from per-tier rollups.