A dirt path leads between eucalypts and wattles

trippler multi-destination

Planning and driving The Cape to The Cross inspired me to add EV charging contingencies to trippler. But as trippler has only historically accommodated A to B trips, I’d still had to plan the weekend’s adventure, including two overnight stops, in three distinct parts. I was therefore keen to add another new capability: routes with multiple destinations.

Multiple changes

I’ve wanted multiple destinations for some time, but it took recent refactoring of the UI and planning constraints to reduce the implementation complexity and barrier to getting started. The change still touched many parts of the app that assumed trips were A to B, though, and as such it’s baking a little longer.

Multiple destination UI

The UI still leads with A to B, but now provides the option to add multiple waypoints, which can also be used to create return trips, like the whole long weekend plan for The Carnival of the Carve. More convenience may be added.

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.

Chargers data is now prepared in two passes:

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

Matrix reloaded

The matrix of distances – a key input to the planning solver – which previously comprised just start and end points and unique chargers, is updated to include all waypoints and each appearance of chargers per segment.

New constraints

We add just a few new 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 constraint per waypoint
trippler SOC and other constraints
New waypoint SOC constraints

The waypoint SOC constraints above, like in the contingencies demo, are configured to match The Cross to The Cape weekend’s plan.

New plans

Now the adventure can be planned in one integrated whole!

trippler multiple destination plan
trippler multiple destination plan

There’s still work to be done to visually differentiate waypoints from charging stops. Meantime, the generated directions are also updated with waypoints.

Next destination

There are still more features pending, like 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 camping trips!

A river flows into a beach at sunrise

Posted

in

, , , , , ,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *