routine TRAVEL given TAXI.ENTITY, X, Y, DISTANCE

define TAXI.ENTITY as a pointer variable

define X,
       Y,
       DISTANCE as double variables


let ORIENTATION.A(TAXI.ENTITY) = ARCTAN.F(Y - LOCATION.Y(TAXI.ENTITY),
X - LOCATION.X(TAXI.ENTITY))

let VELOCITY.A(TAXI.ENTITY) = VELOCITY.F(TAXI.SPEED *
HOURS.V * MINUTES.V, ORIENTATION.A(TAXI.ENTITY))

wait DISTANCE / TAXI.SPEED minutes

let VELOCITY.A(TAXI.ENTITY) = 0

wait LOADING.UNLOADING.TIME minutes

end
