LeadTimeDemandFiller

Concrete DemandFillerAbstract that fills demands after a per-item-type lead-time delay. Once filled, demands are either handed to the inherited demandCarrier (if set) or immediately transition through ship and deliver with no delay.

Lead-time distributions are registered via addLeadTime; each distribution becomes a RandomVariable child of this filler.

Parameters

parent

the parent model element (typically a SupplyChainModel)

name

optional model-element name

See sc.inventorylayer.LeadTimeDemandFiller

Inheritors

Constructors

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

Types

Link copied to clipboard

Protected so subclasses (e.g., LeadTimeOrderFiller.InnerDemandFiller) can call its schedule from their own fillDemand override.

Properties

Link copied to clipboard
open override val itemTypes: Collection<ItemType>

All item types this filler is willing to fill.

Link copied to clipboard

Aggregate "lead time observed" tally.

Link copied to clipboard

Aggregate "number in process" across all item types.

Link copied to clipboard

Per-item-type "lead time observed" tally.

Link copied to clipboard

Lead-time random variables keyed by item type. LinkedHashMap preserves insertion order (porting plan §4.3 — Java used HashMap).

Link copied to clipboard

Per-item-type "number currently in process" time-weighted statistic.

Functions

Link copied to clipboard
fun addLeadTime(itemType: ItemType, distribution: RVariableIfc)

Register or replace the lead-time distribution for itemType. Re-registering an existing item type updates the underlying RandomVariable's initialRandomSource (preserving statistic identity); a new item type creates fresh RandomVariable / TWResponse / Response children of this filler.

Link copied to clipboard
open override fun canFillItemType(type: ItemType): Boolean

True if this filler can fill demands of type.

open override fun canFillItemType(demand: SupplyChainModel.Demand): Boolean

True if this filler can fill demands of demand's item type.

Link copied to clipboard
protected open fun demandFilled(demand: SupplyChainModel.Demand)

Hook for subclasses. Called after demand reaches the filled state via this filler's lead-time event. Default behavior is shipDemand.

Link copied to clipboard

The status demand would receive if filled now. Only valid at the current simulation time.

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

Fill a previously received demand. Must be called at the same simulation time as the receipt — no time may elapse between receive and fillDemand.

Link copied to clipboard

Returns the underlying random source for itemType, or null.

Link copied to clipboard

Returns a DemandMessageIfc describing what would happen if demand were sent now, or null if negotiation is not supported.

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

Receive demand and place it in SupplyChainModel.received, or reject by transitioning to SupplyChainModel.rejected. The filler may set the demand's SupplyChainModel.Demand.status to indicate the rejection reason but is not required to.

Link copied to clipboard
fun removeLeadTime(itemType: ItemType)

Remove itemType from this filler. Best invoked between replications: if a fill event is in flight for this item type it is not cancelled. Matches Java behavior.

Link copied to clipboard
protected fun shipDemand(demand: SupplyChainModel.Demand)

Hand demand to the configured demandCarrier, or — if no carrier is set — transition directly through ship -> deliver with no delay.

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

True if demand would be rejected if filled now.