Movable Resource
A movable resource is a single unit capacity resource that resides within a spatial model and thus can be moved.
Parameters
the parent model element
the initial starting location of the resource within the spatial model
the default velocity for movement within the spatial model It also implements VehicleMovementIfc, the movement seam a fleet is written against, so that tours, dispatching and a manifest can be driven over a free path by exactly the code that drives them over a guide path or a continuous projection. Nothing about the existing move, moveWith and transportWith verbs changes: those remain one delay to the destination and are what a modeller uses to move a resource directly. The seam is a second way in, used by a fleet, and it is the one that can be interrupted and redirected part way. See "The movement seam" below.
the name of the resource
how far apart the seam's decision points are, in the spatial model's own distance units. It fixes how quickly a redirection or a halt is observed -- at most stepSize/velocity later -- and is ignored entirely where the spatial model cannot interpolate, since there a journey is one step and has always been
Inheritors
Constructors
Properties
How far this resource has travelled this replication, however it was moved. Never decreases.
The initial capacity of the resource at the start of the replication. The initial capacity must be greater than 0.
True while this vehicle has been taken off shift.
True indicates that the movable resource is in the process of returning to its home base.
How long it has spent moving this replication, however it was moved. Never decreases.
Where the resource is at this instant, which is not the same thing as currentLocation.
A value for the velocity. May be random
Functions
Allows the adding (attaching) of an observer to the observable
Sends the resource to destination and hands back the queue to wait in.
Returns how many observers are currently attached to the observable
Detaches all the observers from the observable
Allows the deletion (removing) of an observer from the observable
Takes this vehicle off shift: it cannot be seized again until goOnShift, and requests for it wait. Work already allocated finishes under the resource's own capacity change rule.
This method should be overridden by subclasses that need actions performed to initialize prior to a replication. It is called once before each replication occurs if the model element wants initialization. It is called after beforeReplication() is called
Returns true if the observer is already attached
True for any location of this resource's own spatial model.
How far destination is by this spatial model's own metric, measured from positionNow.
Starts a halted vehicle again from where it stopped. Harmless on one that is not halted.
If the movable resource has a defined home base, and it is not already returning to home, this function causes the movable resource to be requested and sent to its home base. If there are pending requests, this request will compete with them, possibly waiting until finally causing the resource to return to its home base.