TimeBasedNetworkDemandCarrier

open class TimeBasedNetworkDemandCarrier @JvmOverloads constructor(parent: ModelElement, name: String? = null) : DemandCarrierAbstract(source)

Demand carrier that maps each (filler, sender) edge to its own transport-time distribution. A single demand filler can serve many senders; a sender can be served by multiple fillers — but each (filler, sender) pair has at most one configured time.

Demands whose (filler, sender) pair has no configured time are either rejected with NoCarrierOptionException or, if immediateTransportFlag is true, shipped and delivered immediately (zero simulated time).

Parameters

parent

the parent model element

name

optional model-element name

See sc.transportlayer.TimeBasedNetworkDemandCarrier

Constructors

Link copied to clipboard
constructor(parent: ModelElement, name: String? = null)

Properties

Link copied to clipboard

When true, demands whose (filler, sender) pair has no configured transport time are shipped and delivered immediately (zero simulated time) instead of throwing NoCarrierOptionException. Default false.

Link copied to clipboard

Read-only view of the amount-in-transit response.

Link copied to clipboard

Read-only view of the per-shipment transit-time response.

Functions

Link copied to clipboard

Attach sender to every currently registered filler with the shared zero-delay edge.

Link copied to clipboard
open override fun canShip(demand: SupplyChainModel.Demand): Boolean

Side-effect-free probe: returns true iff demand would route successfully under the carrier's current configuration. A false result indicates transportDemand would either throw or silently drop the demand. Useful as a self-guard inside carrier implementations and as a configuration test from external code.

Link copied to clipboard

Per-edge demand-shipment counter, or null if no transport time has been registered for the (filler, sender) pair. Counts individual demands shipped on that edge via this carrier in the current replication.

Link copied to clipboard

Per-edge demand-shipment count, or 0 if the (filler, sender) pair is unregistered.

Link copied to clipboard

Register a zero-delay transport edge between filler and sender. The shared myNoDelayRV is reused for efficiency.

fun setTransportTime(filler: DemandFillerIfc, sender: DemandSenderIfc, distribution: RVariableIfc)

Register a transport-time distribution on the (filler, sender) edge. If a previous edge used the shared zero-delay RV, it is replaced with a fresh RandomVariable wrapping distribution.

Link copied to clipboard

Per-edge cumulative cube of all demands shipped on the (filler, sender) edge in the current replication (post-warmup), or null if the edge is unregistered.

Link copied to clipboard

Per-edge cumulative weight of all demands shipped on the (filler, sender) edge in the current replication (post-warmup), or null if the edge is unregistered. Sum of demand.weight across every transportDemand(demand) routed on this edge.

Link copied to clipboard
open override fun transportDemand(demand: SupplyChainModel.Demand)

Transport demand from its origin to its destination.