NetworkDemandCarrierByTime

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

Demand carrier that maps each (supplier, customer) edge to its own TransportDelay. Aggregate statistics across every edge are collected by an internal AggregateTransportResponse.

Default behavior preserves the Java carrier's fallback semantics via capability interfaces: when no TransportDelay is configured for a (supplier, customer) pair, the carrier permits zero-delay transport if the customer is an ExternalDemandConsumer (via demandGeneratorImmediateTransportFlag) or the supplier is an ExternalDemandSupplier (via externalSupplierImmediateTransportFlag); both flags default true. Java tested concrete classes (DemandGenerator and LeadTimeDemandFiller); the Kotlin port tests their capabilities so future external endpoint types slot in without editing the carrier.

Parameters

parent

the parent model element

name

optional model-element name

See sc.transportlayer.NetworkDemandCarrierByTime

Constructors

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

Properties

Link copied to clipboard

Aggregate network-wide transport statistics.

Link copied to clipboard

When true (default), demands whose customer is a DemandGenerator and that lack an explicit (supplier, customer) edge are shipped and delivered immediately. When false, the carrier throws NoCarrierOptionException.

Link copied to clipboard

When true (default), demands whose supplier is a LeadTimeDemandFiller and that lack an explicit (supplier, customer) edge are shipped and delivered immediately. When false, the carrier throws NoCarrierOptionException.

Functions

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

Returns the TransportDelay for the pair, or null if unset.

Link copied to clipboard

Configure a zero-delay (supplier, customer) edge.

fun setTransportTime(supplier: DemandFillerIfc, customer: DemandSenderIfc, time: Double)

Configure a constant-time (supplier, customer) edge.

Configure a (supplier, customer) edge with the supplied transport-time distribution. The first call creates and registers a TransportDelay; later calls reuse the same delay and swap its initial source.

Link copied to clipboard
open override fun toString(): String

Includes the model name, the id, the model element name, the parent name, and parent id

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

Transport demand from its origin to its destination.