ESCostCalculator

class ESCostCalculator @JvmOverloads constructor(parent: ModelElement, esCarrier: TimeBasedDemandCarrier, destinations: List<DemandSenderIfc>, params: CostParams, name: String? = null) : ModelElement, CostCalculator(source)

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.

Formula: Σ_(destinations) shipmentCount(destination) × esLoadingCost.

This calculator covers the supplier-side cost of ES → IHP edges. The destination-side Unloading cost on the same edges is accounted for separately by an EdgeInboundCostCalculator (one per ES → destination edge), so the same shipment contributes to two distinct line items at different tiers — ESLoading at the ES tier and Unloading at the destination's tier — exactly as the legacy framework distinguished them.

Tier: NodeTier.ES.

Parameters

parent

the ModelElement parent

esCarrier

the ES outbound carrier this calculator observes

destinations

every node currently attached to the ES; the calculator sums per-destination shipment counts

params

cost-rate parameters

Constructors

Link copied to clipboard
constructor(parent: ModelElement, esCarrier: TimeBasedDemandCarrier, destinations: List<DemandSenderIfc>, params: CostParams, name: String? = null)

Properties

Link copied to clipboard
open override val lineResponses: Map<CostLine, ResponseCIfc>

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.

Link copied to clipboard
open override val source: ModelElement

The single source ModelElement this calculator observes.

Link copied to clipboard
open override val tier: NodeTier

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.