TimeBasedOrderCarrier

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

Order carrier that delays each shipment by a per-OrderSenderIfc random transport time. Senders without a configured time are either rejected with NoCarrierOptionException or, if immediateTransportFlag is true, shipped and delivered immediately (zero simulated time).

Java has no built-in in-transit statistics on this class — the port preserves that.

Parameters

parent

the parent model element

name

optional model-element name

See sc.transportlayer.TimeBasedOrderCarrier

Constructors

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

Properties

Link copied to clipboard

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

Functions

Link copied to clipboard
open override fun canShip(order: SupplyChainModel.Order): Boolean

Side-effect-free probe: returns true iff order would route successfully under the carrier's current configuration. See DemandCarrierIfc.canShip for the rationale.

Link copied to clipboard

True if a transport time has been configured for sender.

Link copied to clipboard
fun setTransportTime(sender: OrderSenderIfc, distribution: RVariableIfc)

Register (or replace) the transport-time distribution used for sender. The supplied distribution is wrapped in a new RandomVariable (per porting plan §4.1) the first time the sender is added; subsequent calls swap the underlying source.

Link copied to clipboard
open override fun transportOrder(order: SupplyChainModel.Order)

Transport order from its origin to its destination.