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.

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, and 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 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. Quantisation (“scale”) is indicated in a range from very low to very high.

Resilience playground

The resilience playground groups the major resilience inputs with the charge plan and visualisation of its resilience. 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.

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.

v 0.1 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.

Some 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 with many chargers than the original visualisation. This horizontal layout places charging stops at their distance along the route, rather than 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 customisable, 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. Let me know what you think about:

  • Add more data, so that any road trip in Australia can be tested done now https://trippler-aus.streamlit.app/.
  • Simplify the UI for straight through happy path. This could include a simple “what would make this trip feasible” recommendation for failed plans.
  • Improve data freshness and quality (including Telsa charger access for other vehicles).
  • Include elevation data in energy consumption calculations.
  • Make range and resilience adjustments based on the cause, e.g. wind, roof load, national park camping, etc
  • Make routes more customisable with waypoints, fetch multiple route options from OpenRouteService, etc.
  • Add “basecamp mode” where a charge plan would be devised for multiple return trips from a base, which may not have charging (this could apply to “home base” too)
  • Extend charger selection to handle >48 chargers permitting longer route detours that potentially make more trips feasible. Tune between power and isolation requirements based on nature of trip. Provide options to manually override selection based on current status or user preference.
  • Include more information about charger locations to aid automatic or manual selection, including links to (Charge Point Operator) CPO services, location amenity, POIs, etc.
  • Further tune responsiveness and optimality of charge planning (including potentially falling back to simpler methods) to remove the “ignore charging time” setting. More powerful hosting may also improve the responsiveness of the solver.
  • Persist user settings including advanced charging settings.
  • Other??

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