EdgeInboundCostCalculator

class EdgeInboundCostCalculator @JvmOverloads constructor(parent: ModelElement, carrier: TimeBasedDemandCarrier, destination: DemandSenderIfc, destinationTier: NodeTier, params: CostParams, name: String? = null) : ModelElement, CostCalculator(source)

Per-edge inbound cost calculator: observes the supplier's outbound carrier and produces the CostLine.Unloading line item for one specific destination edge.

Attribution: the tier is the destination-tier — Unloading cost is paid by the node that receives the shipment. This is the same set of shipments observed by EdgeOutboundCostCalculator on the same edge, but priced at unloadingCost instead of loadingCost/shippingCost and attributed to the destination rather than the supplier.

Formula: shipmentCount × unloadingCost, where shipmentCount is carrier.getNumberOfDemandShipments(destination).

For ES → IHP edges the carrier is the ES carrier and the destination is the IHP; this calculator's tier is the IHP's tier. The ES tier's outbound cost is accounted for separately by ESCostCalculator (via CostLine.ESLoading) — there is no double-counting because Loading/Shipping (paid by sender) and Unloading (paid by receiver) are conceptually distinct line items.

Parameters

parent

the ModelElement parent

carrier

the supplier's outbound carrier this calculator observes

destination

the destination DemandSenderIfc this calculator focuses on

destinationTier

tier of the destination — used as the CostCalculator.tier

params

cost-rate parameters

Constructors

Link copied to clipboard
constructor(parent: ModelElement, carrier: TimeBasedDemandCarrier, destination: DemandSenderIfc, destinationTier: NodeTier, 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.