MovableAgentResource

constructor(agentModel: AgentModel, space: ContinuousProjection<AgentLike>, initPosition: Point2D, name: String? = null, capacity: Int = Defaults.capacity, queue: RequestQ? = null, velocity: Double = Defaults.velocity, stepSize: Double = Travel.Defaults.stepSize)(source)

Parameters

agentModel

the enclosing AgentModel; required as AgentResource needs an AgentModel parent for its mailbox.

space

the projection that tracks this resource's position. Must hold AgentLike (or compatible) members.

initPosition

starting position in the projection.

name

optional name; defaults to MovableAgentResource_<id>. It also implements VehicleMovementIfc, the movement seam a fleet is written against, so tours, dispatching and a manifest can be driven over a continuous projection by exactly the code that drives them over a guide path. See "The seam" below.

capacity

initial resource capacity (default 1).

queue

optional shared request queue.

velocity

how fast beginTravelTo moves it. A property of the vehicle rather than of each call, because the seam's caller is a fleet that knows what a journey is for and not how fast this particular vehicle goes. travelTo still takes its own velocity per call and is unaffected.

stepSize

the interpolation step, in coordinate units. What a journey is discretised into, and therefore how quickly a redirection or a halt is observed: at most stepSize/velocity later.