A dirt path leads between eucalypts and wattles

trippler multi-destination

It’s time for my EV trip planning app trippler to cater to multiple destinations, beyond the beaten track of simple A to B trips. This is another feature I decided I needed when planning and driving The Cross to The Cape.

Multiple changes

I’ve wanted multiple destinations for some time, but recent refactoring of the UI and planning constraints reduced the barrier to getting started. Nonetheless, the change touched many parts of the app that assumed trips were A to B.

Multiple destination UI

The UI still leads with A to B, but now provides a basic extension for adding multiple waypoints, which can also be used to create return trips, like the whole long weekend plan for The Carnival of the Carve.

trippler UI showing multiple destinations
trippler UI showing multiple destinations

Routing

Openrouteservice routing already supports waypoints. In fact, I’d been passing an empty list of waypoints to my routing function since its inception!

Charger selection magic

The bulk of the work was done here. The logic and data preparation to represent chargers along a route previously assumed that the route would only pass by a charger once. However, with side branches, we might pass individual chargers multiple times and, with a return trip, we’d pass most if not all chargers twice.

While some edge-cases remain, generally charger data preparation could be cleanly extended by splitting into two passes:

  1. Find all chargers in the whole route corridor and apply selection logic, to get the set of unique chargers, then
  2. Map unique chargers to each segment of the route in travel order.
Graphic showing same chargers appearing multiple times on a return route
Repeated charger passes on return route

Matrix reloaded

The matrix of distances is a key input to the planning solver. Previously comprising just start and end points and unique chargers, it’s now updated to include all waypoints and each appearance of chargers per segment.

New constraints

We add just a few new planning constraints by leveraging most of our old constraints with the reloaded matrix:

  1. Must stop but can’t charge at all waypoints
  2. Minimum SOC can be defined per waypoint
trippler SOC and other constraints
New waypoint SOC constraints

These waypoint SOC constraints are configured to match The Cross to The Cape weekend’s plan (like in the A to B trip in the contingencies demo).

New plans

Now the adventure can be planned in one integrated whole!

trippler multiple destination plan
trippler multiple destination plan

And this whole plan still caters for contingencies!

trippler contingencies for multi-destination plan
Contingencies in multi-destination plan

The generated directions are also updated with waypoints.

Next destination

There are still some tweaks and more features pending, like better UI, the ability to destination charge at waypoints, and auto-routing to Big Things. All the same, as this wet Melbourne morning dries up, I’m looking forward to using multiple destinations on some future adventures!

A river flows into a beach at sunrise

Posted

in

, , , , , ,

by