Demand Generator
Generates demands at scheduled intervals and routes them to a demand filler. The demand's item type is fixed at construction; the amount is sampled from a configurable distribution (defaults to 1). When unitDemandOnly is true and the sampled amount is d, the generator sends d separate unit-quantity demands.
Parameters
the supply-chain model whose createDemand factory is used
the item type of every demand this generator emits
time until the first generation event
time between subsequent generation events
maximum number of events to generate
simulation time at which to stop generating
optional model-element name
See sc.inventorylayer.DemandGenerator
Constructors
Properties
Direct filler override; if set, used instead of demandFillerFinder.
Finder used to locate a filler for each generated demand.
Whether emitted demands allow backlogging.
Whether emitted demands allow partial filling.
If true, a sampled amount of d > 1 produces d separate unit-quantity demands instead of one demand of amount d. Default false.
Functions
Build a demand with this generator's permission flags and sender.
Default: no-op. Subclasses may override.
Called when a generated standalone demand reaches RECEIVED. Defaults to asking the filler to fill the demand.
Default: throws. Subclasses may override.
Sample the amount distribution. Defaults to 1 when no dist is set.
Returns true when type equals this generator's itemType. (Java had this inverted — != — and that bug is corrected here.)
Send demand to its filler.
Set the distribution governing the amount of each demand. If never set, every demand is for 1 unit.
Resolve the demand's filler. Direct override wins over the finder.