plan_ev_route
Plan a whole electric-vehicle journey, charge stops included. Give origin and destination (plus optional waypoints) and a vehicle — a published profile ("small_hatch", "saloon", "suv", "van") and/or inline figures (battery_kwh, mass_kg, drag_area_m2, aux_kw, connectors) — with start_soc (default 0.9), min_arrival_soc (default 0.1), reserve_soc (default 0.1, the floor the charge must never drop below mid-route), optional connectors and min_kw filters and ambient_temperature_c. Energy comes from a published road-load physics model over the route's own legs; charge times are integrated over the vehicle's charging curve capped by the charge point, NOT energy divided by peak power, which is the single biggest error in naive EV planners. Returns the stops with arrive/depart state of charge, charge time and detour, a per-leg state-of-charge trace, and the journey's driving and charging time. IMPORTANT: when no plan exists — a charger desert, a connector mismatch, a gap wider than the car's range — the answer comes back with feasible: false, a reason and the furthest point on the route the car can actually reach. That is an ANSWER, not an error to retry: report the reason and never describe it as a plan. gradient_data says whether elevation was available: "absent" means consumption was modelled on the flat and under-reads a hilly route. There is no national charge-point registry, so ALWAYS show the returned coverage_note — an infeasible plan means "none from these operators", never "there are no chargers here" — and statuses are current only when availability_live is true. Requires the MapMap gateway; answers a clear error when the deployment has no charge-point dataset. Display the returned charging_attribution with the plan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| min_kw | No | Keep only charge points with a usable connector rated at least this many kW (e.g. 50 for rapid charging only). | |
| origin | Yes | Where the journey starts. | |
| vehicle | No | The vehicle. Omitted ⇒ the published "saloon" default, and the answer says which vehicle it used. | |
| start_soc | No | State of charge at the start, 0–1 (default 0.9). | |
| waypoints | No | Intermediate points the route must pass through, in order (at most 8). Charge stops are inserted around them. | |
| connectors | No | Keep only charge points offering at least one of these connector standards: "type2", "type1", "ccs", "chademo", "tesla", "domestic", "other". This narrows the vehicle's own set, never widens it. | |
| destination | Yes | Where it ends. | |
| reserve_soc | No | The floor the state of charge must never fall below mid-route (default 0.1). Distinct from the arrival figure. | |
| min_arrival_soc | No | Lowest acceptable state of charge on arrival (default 0.1). | |
| max_detour_minutes | No | How far off the route a charge point may sit, as a detour in minutes (default 15, at most 120). | |
| ambient_temperature_c | No | Ambient temperature in °C. Derates traction energy from a published study; cabin heating belongs in the vehicle's `aux_kw`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| legs | Yes | The driving legs, in order. | |
| stops | Yes | The charge stops, in visit order. Always empty when `feasible` is false: a journey that cannot be completed has no stop list. | |
| reason | No | The same cause in plain language, for the user. | |
| summary | Yes | The plan at a glance. | |
| vehicle | No | The vehicle the plan was computed for. | |
| feasible | Yes | **Whether the journey is possible at all.** False means no plan exists — a charger desert, a connector mismatch, or a gap wider than the car's range. Report the `reason` and the furthest reachable point; never describe an infeasible answer as a plan. | |
| soc_trace | Yes | State of charge at every point of the journey. | |
| reason_code | No | Machine token for why no plan exists, when none does: "no_chargers_in_corridor", "connector_mismatch", "out_of_range", "dead_end", "below_min_kw", "chargers_unrated", "stop_limit", "dataset_empty", "no_charge_curve" or "unroutable". | |
| coverage_note | Yes | **Always present.** What this deployment's charge-point dataset does and does not cover. An infeasible plan means "none from these operators", never "there are no chargers here". Show this alongside the answer. | |
| gradient_data | Yes | "complete", "partial" or "absent". **"absent" means the deployment had no elevation data and consumption was modelled on the flat**, which under-reads a hilly route. Say so rather than presenting the figure as measured. | |
| profile_source | No | "default" when a published profile supplied the figures, "inline" when the caller did. | |
| route_distance_m | No | Distance of the planned route, metres. | |
| route_duration_s | No | Driving time of the planned route, seconds. | |
| availability_live | Yes | Whether charge-point statuses came from a live availability feed. A static planner is the default: without a feed, nothing in this answer is a claim about which bays are free right now. | |
| geometry_polyline6 | No | The planned journey's geometry as an encoded polyline6, through the charge stops. | |
| charging_attribution | No | Attribution string for the charge-point operators actually used — display it with the plan (a licence obligation). | |
| furthest_reachable_lat | No | Latitude of that furthest reachable point. | |
| furthest_reachable_lon | No | Longitude of that furthest reachable point. | |
| furthest_reachable_position | No | How far along the route the vehicle can get unaided, 0.0–1.0, when no plan exists. |