InterpolatedMovement

constructor(parent: ModelElement, path: MovePathIfc, stepSize: Double, velocityOf: () -> Double, onJourneyEnded: () -> Unit? = null, name: String? = null)(source)

Parameters

parent

the vehicle this belongs to. A model element of its own so that it can schedule its own steps and be reset between replications without the vehicle remembering to

path

the geometry to move through

stepSize

how far apart the decision points are, in the geometry's own distance units. Ignored where the geometry cannot interpolate, since there the whole leg is one step

velocityOf

how fast the vehicle is going, asked once per step so that a vehicle whose speed depends on what it is carrying answers for itself

onJourneyEnded

told whenever a journey stops, by arrival or by halt, and told before whoever was waiting is woken. For a vehicle that keeps its own flags about whether it is moving