EdgeOutboundCostCalculator

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

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.

Attribution: the tier is the supplier-tier — Loading and Shipping are paid by the node that owns the outbound carrier (the supplier), not by the destination. See EdgeInboundCostCalculator for the Unloading line, which attributes to the destination-tier instead.

Formulas:

CostLineFormula
CostLine.LoadingshipmentCount × loadingCost
CostLine.ShippingshipmentCount × shippingCost

shipmentCount is carrier.getNumberOfDemandShipments(destination) which reflects the post-warmup count (KSL's Counter resets at warmup automatically).

Under TransportStrategy.SharedCarrier the carrier is not a TimeBasedDemandCarrier (it's a NoDelayDemandCarrier or similar), so this calculator should not be constructed. The formulation's buildCalculators walk skips edges whose carrier is not a time-based one.

Parameters

parent

the ModelElement parent

carrier

the outbound carrier this calculator observes; must be the carrier of the supplier on this edge

destination

the destination DemandSenderIfc this calculator focuses on

supplierTier

tier of the supplier (carrier owner) — used as the CostCalculator.tier

params

cost-rate parameters

Constructors

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