Journey
While a vehicle planning contains all information about the times and places of tasks, the related journeys contain the corresponding route information. This includes the geographic route and the associated timings.
The connection between two consecutive tasks in a vehicle planning that have assigned locations is called a leg. A leg contains the routing information for the path between those tasks. For each leg, this consists of a geographic track and the corresponding durations.
A geographic track is a line string connecting the geographic points used in the routing. The durations describe after how many seconds the next point should be reached. Note that this is calculated relative to the start of the leg, not to the start of the journey.
The routing of a journey is always split into its legs.
Journey calculation is triggered whenever the vehicle planning is recalculated, but it runs as a separate step in the background rather than as part of the recalculation itself. When a recalculation starts, the current journey is cleared right away, and a new journey is calculated shortly afterward, so it may take a moment before the updated route appears. Each recalculation creates a new journey, so a single vehicle planning can have several journeys over time. The latest journey is called the current journey.
If the vehicle planning is not yet active the journey starts at the specified Place for the Shift Beginning task.
If a vehicle planning is active, the current journey starts at a virtual start task whose location is based on the current vehicle position or is inferred by ioki Platform. For more details, see Vehicle locator.
Information about the current journey is available in Control Center. Select the relevant vehicle planning and then open the Journey overview tab in the detailed view.
Routing of a journey
In the routing setup, the Routing Adapter for Journey Calculation must be specified. By default, the journey is routed with this adapter. The journey is routed as a whole and then split into its legs. This has two advantages: first, it is faster because the routing adapter is called only once; second, the resulting route is usually smoother because detours caused by projections are avoided and the vehicle’s previous direction is taken into account.
The journey is also responsible for driver navigation. For this, legs must be routed turn by turn and ioki Platform must return the driving instructions in time.
Because this produces a large amount of data that must be transferred to ioki Vehicle App, the calculation is restricted to legs that start within the next 30 minutes after the (virtual) start task of the current journey. The adapter used for turn-by-turn navigation is configured in the routing setup as the Navigational Routing Adapter for Turn By Turn Navigation.
Assume the following vehicle planning with two nested, pooled rides:
Task Location Time Shift Beginning A 8 am Pick Up Ride 1 B 8:10 am Pick Up Ride 2 C 8:20 am Drop Off Ride 2 D 8:50 am Drop Off Ride 1 E 9 am Shift End not specified 4 pm This vehicle planning results in a journey with four legs. If the shift has not started yet, the first three legs are routed with the Navigational Routing Adapter for Turn By Turn Navigation (TBT), because the start of these legs is before 8:30 am. The last leg, from the drop-off of the first ride to the drop-off of the second ride, is routed with the Routing Adapter for Journey Calculation (JCA).
Let each edge represent a leg. The route of the vehicle is then given by
flowchart LR classDef iokiGrey stroke-width:2px A:::iokiGrey -- TBT --> B:::iokiGrey -- TBT --> C:::iokiGrey -- TBT --> D:::iokiGrey -- JCA --> E:::iokiGrey linkStyle 0,1,2 stroke:#d11064Now assume that the shift has started, it is 8:15 am, and the vehicle is located somewhere between the pick-up of Ride 1, B, and the pick-up of Ride 2, C. Call this location BC. If the vehicle planning is recalculated at this point, the journey consists of only three legs, and the start is the virtual start task at BC.
flowchart LR classDef iokiGrey stroke-width:2px BC:::iokiGrey -- TBT --> C:::iokiGrey -- TBT --> D:::iokiGrey -- JCA --> E:::iokiGrey linkStyle 0,1 stroke:#d11064