Time Based Load Carrier
Demand carrier that buffers per-destination demands in DemandLoadBuilders and ships them as SupplyChainModel.DemandLoads. Inherits per-destination random transport times from TimeBasedDemandCarrier; load formation strategy is delegated to the builders.
When reactToLoadBuildersFlag is true, the carrier ships every load a builder forms automatically; otherwise loads sit in the builder's load queue and must be drained explicitly via shipLoads (or by scheduling a periodic shipping event).
Parameters
model that owns the created loads (passed through when building new DemandLoadBuilders)
parent model element; defaults to supplyChainModel
optional model-element name
See sc.transportlayer.TimeBasedLoadCarrier
Constructors
Properties
If true, every load formed automatically by an attached DemandLoadBuilder is shipped immediately via loadFormed. Default false (loads sit in the builder's outgoing queue until drained).
Read-only view of the aggregate shipment counter.
Functions
Snapshot of all load builders attached to this carrier, in assignment order. Used by the network cost model to walk per-builder per-item on-hand statistics for the shipmentBuildingHoldingCost line.
Create and assign a default load builder for destination.
Attach a pre-built loadBuilder for destination. Wires up the built-in DemandLoadFormedListenerIfc so the carrier can react to formed loads, and creates the per-destination shipment counter.
Create and assign a load builder for destination, with the supplied model-element name and (optional) per-item on-hand tracking.
True iff destination has an assigned load builder.
Per-destination shipment counter for the cost model. A load carrier's shipment unit is a load, so this returns the count of loads dispatched to sender — the same counter as getShipmentCounter — overriding the parent's per-demand counter, which a load carrier never increments. This is what lets the per-edge ksl.modeling.supplychain.cost.EdgeOutboundCostCalculator / ksl.modeling.supplychain.cost.EdgeInboundCostCalculator see load formation (Loading / Shipping / Unloading per dispatched load), mirroring the totalLoadWeightAccumulator / totalLoadCubeAccumulator overrides.
Returns the load builder previously assigned to destination.
Per-destination count of loads dispatched to sender, or 0.
Per-destination shipment counter, or null if not assigned.
Default reaction to a load formation: ship all queued loads in builder. Subclasses may override.
Drain builder's load queue, scheduling per-destination delivery events from the inherited per-sender transport times. If immediateTransportFlag is true and no transport time has been set for the destination, the load ships and delivers in the current instant.
Per-destination cumulative weight of all LOADS shipped to sender in the current replication (post-warmup), or null if sender has no assigned load builder. Each dispatched load contributes load.weight (the sum of its constituent demand weights). Overrides the parent's per-demand accumulator — the load carrier's shipment unit is a load, not a demand.
Buffer the demand by handing it to its destination's load builder. Throws if demand's sender has no builder.