Forked lightning in the night sky with silhouetted trees

A resilient charging planner

Check out the prototype of trippler, an interactive charging planner for resilient EV road trips.

trippler charging planner prototype

Based on my own EV road trip experience, trippler is as much about easily understanding charging options and contingencies, to reduce charger anxiety, as it is about coming up with a single best plan.

Features

Simply enter the start and end of your trip and trippler will generate driving directions including recommended charging stops.

trippler trip plan

There are also many options to review and customise.

Select chargers

trippler will find candidate chargers along the route and automagically select the best for charge planning. You can review the selection and add more candidates by increasing the detour distance, or adjust the number selected up or down. The selection will always get you from A to B, and it will include the fastest chargers and the most isolated (those that you wouldn’t want to miss).

I’ve found this pretty useful in its own right, providing a quick overview of the best charging options to keep in mind. There is more below on how this works.

Review route

The route review provides a summary and overview of the route, with candidate and selected chargers overlaid.

Advanced plan settings

I’ve grouped the charge plan settings I change less frequently into “advanced settings”, mainly to keep the resilience playground (below) cleaner.

Advanced settings include:

  • Departure State of Charge (SOC),
  • Minimum SOC at any point on the trip (arrival at charger or destination),
  • EV battery capacity in kWh, which only affects charging time calculations,
  • Whether charging is available at the destination, which determines if range must be reserved to return to the very last charger, and
  • Ignore charging time, to preserve an interactive experience, as described below.

Resilience playground

The resilience playground groups the main inputs with the charge plan and visualisation. Here it’s easy to make changes to effective vehicle range, and specify how to achieve resilience to faulty chargers by either proceeding to the next, returning to the previous, or both.

The visualisation area provides a trip summary, lists charging stops and shows a chart with arrival and fill SOC at each stop. With skipped chargers shown, it’s easy to see previous and next options and their SOC on arrival, should a targeted charger be faulty.

Native Lands Digital integration

The traditional owners of the lands the route traverses are listed via the Native Lands Digital API, based on a simple intersecting polygon created from the route.

Differentiation

Why would you use trippler instead of A Better Route Planner? It’s better for resilience.

  • trippler automatically plans around charging being unavailable
  • trippler lets you explore many different scenarios interactively
  • trippler gives you confidence to skip certain chargers if your plans change
  • trippler easily plans trips over 5,000km

Why wouldn’t you use trippler? It’s only a prototype.

  • Prototype relies on open charger data that is incomplete and not as current
  • Doesn’t include a large library of vehicles with defined data
  • Driving directions are not tightly integrated
  • Doesn’t support vehicle telemetry

Take trippler for a test drive and let me know what you think! (Comments below)

Development

If you’re still reading, here’s some more on the development process and how the app works, with links back to earlier work.

Philosophy

I wanted to focus on the core problem of interactively exploring charging options under varying trip requirements. I wanted a tool that I would use and I wanted to keep it simple for others. These objectives led to choosing a single page Streamlit app with a design that attempts to balance mobile and desktop experience. Once the start and end of the route are entered, no further user input is needed for driving directions, but the key interactive features are prominent, and further practical settings are close at hand.

First trip

trippler started with only one trip, but a doozy, from Mildura to Mallacoota via Melbourne. Over 1,000km and with 38 charging options of 50kW+, which are very unevenly distributed.

Mildura to Mallacoota via Melbourne – route and chargers

This allowed me to test interactivity in the resilience playground, which highlighted the need for the ignore charging time mode when there are many chargers, and also motivated the charger selection feature. Using it also convinced me that I needed to support routing, for other users to engage with the prototype properly as a practical tool, and not just a toy.

You can still try this “trippler lite” version or watch the preview video.

Comparing plans

These varied plans show arrival SOC and charge at each stop, and the estimated arrival SOC at alternative chargers, for different resilience settings.

Fastest charge plan – little resilience for faults
Always maintain at least 20% SOC
Always reserve enough SOC to reach the next charger in case of fault

This style is simpler, and works better when there are many chargers, than the original visualisation. This horizontal layout places charging stops at their distance along the route, rather than in sequence number, as used in the more compact vertical layout.

Many more details

The planning is based on the matrix solver for flexibility. The objective function is adjustable, to produce approximate solutions instead when optimal solutions take too long to calculate.

Charging time optimisation

Travel time includes: (1) driving time, (2) a time penalty per stop, and (3) charging time. Unfortunately, the including the charging time component has a big impact on the processing time to solve a mathematically optimal plan. I introduced two modes to preserve interactivity.

The default mode optimises with charging time, but reduces the search space by using gradually larger distance increments and SOC increments as the number of chargers increases. This mode is limited to 35 chargers. The solutions are optimal, if imprecise.

Distance matrix quantised to approx 20 values

The alternative ignores charging time in optimsation, instead calculating it after the plan is approximately solved with just driving time and stop penalties. It’s very responsive, reflecting the experience I envisage, and if chargers have similar power, makes little difference. The solutions are correct and precise but only approximately optimal.

Pre-optimising charger selection

Both solution complexity and service restrictions (Open Route Service Matrix API is limited to 50 points, though amenable to a numpig solution) motivate optimising the selection of chargers we’re working with prior to solving the charging plan.

This is doable and I also discovered that it was useful in its own right, to simply understand charging options along the route.

Shown below the selection of 20 from 38 chargers ensures that: at least one charger upstream and downstream is in some range, higher powered chargers are selected, and chargers that are most isolated are selected.

Optimising charger selection

When planning fails

There are some basic diagnostics when it’s not possible to find a plan. This generally because the range is not sufficient to cross the biggest gap between chargers, while maintaining min SOC requirement, made still more challenging when additional SOC is needed to continue to next or return to previous.

Tech stack

The input data is pre-fetched from Open Route Service and Open Charge Map. The Streamlit app is deployed from a private Github repo to Streamlit Community Cloud. Key Python modules are OR Tools for optimisation and pyproj and shapely for spatial functions.

Future features

I have a long list of future features (there is also some technical debt to address…) on which I’d also welcome feedback. There is a beta test version with trial features at https://trippler-aus.streamlit.app/. Currently includes trickle charging and elevation features.

Beyond that, there are many refinements and potential directions, as a standalone planner, and many potential ways it could be integrated into the EV ecosystem.

  • Improve data coverage, detail (including charger local amenity, etc) and freshness,
  • Provide more control over routing, including “charger hopping”,
  • Provide more control over charger selection, based on network, etc
  • Simplify UI for happy path,
  • Remove some current technical constraints (e.g., number of chargers) and tune performance,
  • Persist preferred planning & vehicle settings, and/or provide more presets,
  • Share a plan via a custom link,

Feedback

Though it has been fun putting this together, I do look forward to the day it’s not needed (but it is not this day). Would you find something like this useful?


by