Inventory Holder Abstract
Abstract base for objects that hold one Inventory per ItemType and route incoming demands to the appropriate inventory. Acts as a DemandFillerIfc (forwards demands by item type) and a DemandSenderIfc (forwards inventory replenishment demands outward).
Aggregate statistics across the held inventories are exposed via AggregateInventoryResponseIfc (delegated to a member AggregateInventoryResponse).
See sc.inventorylayer.InventoryHolderAbstract
Inheritors
Constructors
Properties
Read-only view of the time-weighted "fraction of time on-hand > 0".
Direct filler override; if set, used instead of demandFillerFinder.
Finder used to locate a filler for each generated demand.
All item types this filler is willing to fill.
Per-item-type inventories. LinkedHashMap per porting plan §4.3.
Number of distinct item types held.
Used by held inventories internally; defaults to a requester that calls back into this holder. Subclasses may swap it.
Functions
Add an Inventory for its declared Inventory.itemType. Subscribes the inventory's responses to this holder's aggregate; sets the inventory's Inventory.replenishmentRequester so its replenishment routes through here.
The status demand would receive if filled now. Only valid at the current simulation time.
Fill a previously received demand. Must be called at the same simulation time as the receipt — no time may elapse between receive and fillDemand.
True if this sender may produce demands of type.
Returns a DemandMessageIfc describing what would happen if demand were sent now, or null if negotiation is not supported.
Subclasses define how demands are received and filled.
Invoked by an internal inventory (via the wired-up replenishment requester) to send its replenishment demand outward. Sets the holder as the demand's sender and uses the holder's filler or finder to dispatch.
Undo subscribeTo.
True if demand would be rejected if filled now.