Warehouse

open class Warehouse @JvmOverloads constructor(parent: ModelElement, initialAvailability: Boolean = true, name: String? = null) : WarehouseAbstract(source)

Concrete WarehouseAbstract that holds incoming orders in a FIFO queue and dispatches each order's demands to per-item-type inventories via an internal InventoryHolderAbstract. When all demands on an order are filled, the order is shipped via orderShipper (if set) or transitioned through ship → deliver.

See sc.inventorylayer.Warehouse

Constructors

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

Properties

Link copied to clipboard
Link copied to clipboard

Read-only view of the order queue.

Functions

Link copied to clipboard
fun addInventory(inventory: Inventory)

Add a pre-built Inventory to this warehouse.

Link copied to clipboard
fun addReorderPointOrderUpToLevelInventory(type: ItemType, reorderPoint: Int, orderUpToPoint: Int, initialOnHand: Int = 0, name: String? = null): Inventory

Convenience: build and add an (r, S) inventory.

Link copied to clipboard
fun addReorderPointReorderQuantityInventory(type: ItemType, reorderPoint: Int, reorderQty: Int, initialOnHand: Int = 0, name: String? = null): Inventory

Convenience: build and add an (r, Q) inventory.

Link copied to clipboard
protected open fun enqueueOrder(order: SupplyChainModel.Order)

Enqueues order and registers warehouse listeners.

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

Fill a previously received order. Must be called at the same simulation time as the receipt.

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

True if this sender may produce orders containing type.

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

Subclass hook fired when an incoming order reaches FILLED.

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

Subclass hook fired when an outgoing replenishment order is delivered.