Grass silhouetted against the evening sky with out of focus Venus and crescent Moon

trippler development notes

This is the behind-the-scenes companion post to a resilient charging planner, sharing more on the development process and how the app works, with links back to earlier work.

Design 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, and the many chargers on this route motivated a more efficient alternative objective function based on minimising number of stops, as well as 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.

Charger selection

Both solution complexity and service restrictions (Open Route Service Matrix API is limited to 50 points, though amenable to a numpig-like 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

Spatial data comes 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.

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?


Posted

in

, , , , , , ,

by