routeFrom

fun routeFrom(fromZone: Zone, toIntersection: GuidedPathNetwork.Intersection, travellingForward: Boolean = true): Route(source)

Plans a route from wherever a transporter currently stands, which may be part way along a link.

A transporter on a link cannot turn round inside it, so a route planned from a link zone finishes that link before going anywhere else.

Parameters

fromZone

the zone the transporter holds now

toIntersection

where it is going

travellingForward

the direction it faces on a link zone, ignored at an intersection

Throws

when the destination cannot be reached, or when the route selection rule returns a sequence a transporter could not follow