Planning a journey from an origin to a destination involves establishing
selection criteria that includes one or more journey parameters and one
or more rules. A journey parameter describes a constraint of the journey,
and a rule specifies an action to perform in response to a trigger event.
A route for the journey from the origin to the destination is planned. A
trigger event is detected after initiation of the journey. A rule
specifying an action to perform in response to the detected trigger event
is accessed. One or more alternate waypoints are selected in accordance
with the action and the selection criteria. The one or more alternate
waypoints are inserted into the route to create a next route.