Guided Transporter Pool With Q
A set of interchangeable transporters that entities ask for by the group rather than by name.
An entity that wants carrying does not care which transporter comes, only that one does. The pool holds the fleet, decides which idle transporter to send, and holds the entities that arrive when none is free.
Waiting happens in one place, on the pool, rather than on the individual transporters. That is deliberate: an entity queued against a particular transporter would go on waiting for that one even after a nearer one came free, which is both slower and harder to explain. Whoever has waited longest is woken when any transporter is released, and chooses afresh.
Parameters
the containing model element
the runtime whose guide path these transporters run on
the fleet, which must all belong to that system
which idle transporter to send
what a released transporter does when nothing is waiting. Settable, because where a fleet idles is a design question a study wants to vary rather than a structural property of the pool. It is read at the moment a transporter is released, so a change takes effect from the next release; the shipped rules carry no state, so none needs resetting between replications.
a name for the pool
Constructors
Properties
Which idle transporter is sent to a pickup.
The allocation rule by name, so a scenario or an app can change it without holding a rule object. Reading it reports the rule's own toString when the rule is one no name stands for -- a ksl.modeling.guidedpath.rules.RandomTransporterRule, say, which takes a stream.
The transporters of this pool that a movement gate is currently holding, or that are under tow. They are not offered to the allocation rule, and they are here so that a model which installs a gate can report on what its gate is doing.
True when some transporter of the pool could be sent now.
Where an idle transporter waits, by name, so a scenario or an app can change it without holding a rule object. Reading it reports the rule's own toString when the rule is one no name stands for -- a ksl.modeling.guidedpath.rules.MoveToStagingAreaRule, say, which takes a location.
The transporters this pool could send right now: allocated to nobody, and able to move.
How many transporters this pool has to give, which is how many it could actually send.
The fleet, in declaration order, which is the order ties are broken in.
Entities waiting for any transporter of this pool to become free.