A Fast Heuristic Search Approach for Energy-Optimal Profile Routing for Electric Vehicles

Reading time: 39 minute
...

📝 Original Info

  • Title: A Fast Heuristic Search Approach for Energy-Optimal Profile Routing for Electric Vehicles
  • ArXiv ID: 2512.01331
  • Date: 2025-12-01
  • Authors: Saman Ahmadi, Mahdi Jalili

📝 Abstract

We study the energy-optimal shortest path problem for electric vehicles (EVs) in large-scale road networks, where recuperated energy along downhill segments introduces negative energy costs. While traditional point-to-point pathfinding algorithms for EVs assume a known initial energy level, many real-world scenarios involving uncertainty in available energy require planning optimal paths for all possible initial energy levels, a task known as energy-optimal profile search. Existing solutions typically rely on specialized profile-merging procedures within a label-correcting framework that results in searching over complex profiles. In this paper, we propose a simple yet effective label-setting approach based on multiobjective A* search, which employs a novel profile dominance rule to avoid generating and handling complex profiles. We develop four variants of our method and evaluate them on real-world road networks enriched with realistic energy consumption data. Experimental results demonstrate that our energy profile A* search achieves performance comparable to energy-optimal A* with a known initial energy level.

📄 Full Content

Optimal pathfinding is a well-known and classic problem in AI: determining the least-cost path from a starting point to a target location within a network. For networks with nonnegative edge costs, this problem can be efficiently solved using dynamic programming techniques such as Dijkstra's algorithm (Dijkstra 1959), or more efficient heuristic-guided methods like A* search (Hart, Nilsson, and Raphael 1968). However, the problem becomes more challenging in the presence of negative edge costs. In this case, traditional algorithms like Bellman-Ford (Bellman 1958;Ford Jr 1956) are applicable but tend to be slower than their counterparts designed for graphs with non-negative costs. Nonetheless, if the graph is free of negative cycles, more efficient techniques such as Johnson's algorithm (Johnson 1977) can be used. These methods achieve performance comparable to Dijkstra's algorithm, albeit after a reweighting step. A practical application of optimal pathfinding with negative edge costs arises when energy is the primary cost metric, as it can be both consumed (positive cost) and regenerated (negative cost) along an edge. Due to the law of conservation of energy, such graphs are typically free of negative cycles, making reweighting techniques viable in practice.

One key example of optimal pathfinding with energy costs is path planning for electric vehicles (EVs) in transportation networks. Driven by the rapid advancement of vehicle and battery technologies, EVs have permeated nearly every form of transportation, including (but not limited to) daily commuting with light EVs, public transit with electric buses, and package delivery with e-bikes. In the context of pathfinding, EVs exemplify systems with negative energy costs, as they feature energy recuperation (e.g., via regenerative braking), which can result in negative energy costs on certain road segments. Given that the energy available to an EV is constrained by its battery capacity, reaching certain destinations (including charging stations) may only be possible via an energy-optimal path, i.e., a path from origin to destination with the lowest possible energy requirement. Energyoptimal paths are critical as they determine feasibility: an EV cannot reach its destination if no minimum-energy path exists for the available energy at the origin. It is therefore essential to have algorithms capable of reasoning about and efficiently computing energy-optimal paths.

When the EV’s energy at the starting point is known, energy-optimal pathfinding can be formulated as a singlecriteria pathfinding problem, where the available energy at any node along the energy-optimum path to the destination can be computed through simple algorithmic modifications to ensure it remains within the range. The work in Artmeier et al. (2010) represents one of the first attempts to solve this problem efficiently by such modification through two approaches: an adapted version of the Bellman-Ford algorithm (with polynomial time complexity), and a modified version of Dijkstra’s algorithm that allows vertex re-exploration (with exponential time complexity). This research was later extended in Sachenbacher et al. (2011), where the authors applied Johnson’s reweighting technique (Johnson 1977) and an adapted A*-based algorithm to further reduce computational complexity to quadratic time. A key component of their algorithms is a potential energy function that enables the upshifting of edge costs into non-negative reduced costs, and also serves as a lower-bound heuristic in the A* framework. Inspired by this idea, subsequent research has focused on preprocessing-based approaches to accelerate energy-optimum path queries. These methods include applying Johnson’s edge-cost shifting technique to precompute a graph with only non-negative edge costs, as well as hierarchical speed-up techniques such as Contraction Hierarchies (CH) (Geisberger et al. 2008). In particular, the work in Baum et al. (2013Baum et al. ( , 2019) ) continues this line of research, exploring various potential functions for cost shifting and evaluating their integration with speed-up techniques such as CH (Delling et al. 2017;Jung and Pramanik 2002).

A more general case of energy-optimal pathfinding arises when the initial energy level is unknown. This critical scenario appears in many real-world applications, such as planning multi-leg trips in EV routing, where the initial energy level of each leg depends on the final state of charge (SoC) from the previous trip (Ahmadi et al. 2021), or in bidirectional settings (with a backward profile search from destination to origin), where the energy level at the destination cannot be predetermined (Baum et al. 2020). In this setting, cost-optimal paths must be computed for all possible energy values, ranging from zero to EV’s maximum battery capacity. This task is known as energy profile search. Surprisingly, energy-optimal profile search for EVs remains under-explored. The first attempts to address this problem were made by Baum et al. (2013) and Schönfelder, Leucker, and Walther (2014), where Dijkstra’s Algorithm and A* search were adapted to handle energy profiles. Both approaches are based on a label-correcting strategy that incrementally links and merges energy profiles during the search. However, these methods often require complex rules to extend and relax energy profiles, adding significant overhead due to the inefficiency of explicitly merging profiles across the entire SoC range to maintain only one profile per graph vertex. Continuing along this line, Baum et al. (2020) extended their earlier work within a larger path planning context with charging stations, but still relied on the conventional label-correcting approach to handle uncertainty in initial SoC. Despite recent progress in accelerating energy-optimal pathfinding queries with (preprocessingbased) speed-up techniques, the core problem of energy profile search remains largely unaddressed: existing profile search algorithms are still complex, often requiring specialized procedures and implementation tricks to enable the propagation of profiles during the search. This hinders their practical applicability and adoption.

Contributions: This paper presents a novel yet simple label-setting approach for energy-optimal profile search for EVs. The method adopts a multi-objective search strategy to propagate profiles in a best-first manner while incorporating efficient pruning mechanisms to discard unpromising profiles and to avoid expensive profile merging often observed in label-correcting schemes. Experiment results on realistic instances demonstrate that our proposed approach offers a fast and practical framework for addressing energy-optimal profile queries in large road networks.

Consider a road network represented as a directed graph G = (S, E), where S is a finite set of states (intersection) and E ⊆ S × S is a set of edges (road segment). Each edge has a real-valued energy cost, denoting the amount of energy required to traverse the link. Edge cost may be negative due to energy recuperation, and can be retrieved via the function Algorithm 1: Energy-optimal A* Search

Extract from Open node x with the smallest f -value

19 Add y to Open 20 return C(goal )

cost : E → R. A path π in G is defined as an ordered sequence of n states {u 1 , . . . , u n } where (u i , u i+1 ) ∈ E for i ∈ {1, . . . , n -1}. Now, consider an EV starting with an initial energy of E init ∈ R + at an initial location start ∈ S, and a maximum energy limit of E max ∈ R + (battery capacity). The objective of energy-optimal pathfinding is to determine an optimum path π * that allows the EV to travel from start to a target location goal ∈ S with the least amount of energy consumed, while ensuring that the energy level of the EV remains within the (0, E max ] range at all locations along π * . If E init is unknown, the objective becomes identifying, for each possible value of E init within the allowable range, the corresponding energy-optimal path, i.e., computing all minimum-energy paths as a function of initial energy E init .

We now briefly review energy-optimal pathfinding on the basis of A*. Following the heuristic search literature, we define partial paths to states as search nodes. More precisely, a node x represents a path originating from start. Each node x is associated with a state s(x) (i.e., the last state in the partial path), a cost value g(x) representing the cumulative energy consumed from start to s(x), a reference P(x) pointing to its parent node, and a total cost estimate f (x), a lower bound on energy cost from start to goal via x.

The search in A* is guided by nodes with the smallest cost estimates, or f -values, which are conventionally computed using a consistent and admissible heuristic function h : S → R such that f (x) = g(x) + h(s(x)) (Hart, Nilsson, and Raphael 1968). h is consistent if h(u) ≤ h(v) + cost(u, v) for every edge (u, v) ∈ E, and also admissible if we additionally have h(goal ) = 0. Consistent heuristics offer a key advantage in negative-weight graphs: f -values in A* are still guaranteed to increase monotonically during the search (Ahmadi et al. 2024a). This property inherently eliminates the need for reweighting techniques and provides a robust framework for solving the problem in dynamic settings, where both energy models and heuristic functions may change between queries (Ahmadi, Raith, and Jalili 2025). However, this benefit comes at an additional computational cost, as some better informed heuristic functions may involve non-linear and potentially expensive computations.

As discussed in (Schönfelder, Leucker, and Walther 2014), consistent energy heuristic functions for EVs can be naturally derived using physical energy models, typically formulated as lower bounds on the sum of kinetic and potential energy. In this context, the kinetic energy estimate is modeled as a function of air-line (Euclidean) distance, while the potential energy component is based on elevation differences. We have provided two such heuristic functions in the Appendix, derived from model-based and data-driven energy consumption models.

Algorithm 1 presents a pseudocode for energy-optimal A* search, adapted from Schönfelder, Leucker, and Walther (2014). It begins by initializing a node with the start state and inserting it into Open, a priority queue that stores all generated but unexplored nodes. The algorithm also initializes a scalar C(u) for every u ∈ S to track states’ bestknown energy cost during the search. It then proceeds by expanding nodes in order of f -values. Expanding a node x involves extending its partial path to each of its successor states, denoted by Succ(x), thereby generating descendant nodes. During expansion, each descendant node y is checked for feasibility and, if necessary, cost adjustment to ensure the available energy at each state remains within the EV’s battery capacity constraints (Artmeier et al. 2010). We can distinguish two special cases: i) if the energy requirement g(y) or estimated total cost f (y) of the descendant node exceeds the available initial energy E init , y is considered infeasible and can be discarded; ii) if the remaining energy at the successor state, computed as E initg(y), exceeds the EV’s maximum battery capacity (e.g., on sharp downhill segments), then g(y) is adjusted to cap the recuperated energy. This ensures that the remaining energy does not exceed E max , meaning that some recuperated energy cannot be stored due to battery limitations. If a lower-cost path to s(y) is found, the value C(s(y)) is updated, and y is inserted into Open for further exploration. The search terminates when a node with the goal state is extracted from Open, with C(goal ) denoting the minimum energy cost. If C(goal ) = ∞, it indicates that no feasible path exists under the given initial energy E init .

A common method to address uncertainty in the initial energy level is to define the energy requirement of an edge (u, v) as a function that maps any possible initial energy E init ∈ [0, E max ] at node u to its corresponding energy cost. The energy profile of a path can then be derived by composing the energy profiles of its constituent edges (Baum et al. 2013). As shown in Eisner, Funke, and Storandt (2011) and formally proven in Baum et al. (2020), the energy profiles

Figure 1: Schematic illustration of energy profiles. Horizontal axis is the E init range. From left to right: positive-cost link, negative-cost link, and a generic path profile.

of both edges and paths can be represented as piecewiselinear functions with up to two breakpoints and fixed slopes.

In our notation, we define the breakpoints of a path profile represented by node x as (E min (x), g(x)) and (E max , g(x)), where E min (x) denotes the minimum energy required to traverse the path, and g(x) and g(x) represent the minimum and maximum energy costs, respectively. Here, g(x) corresponds to the energy cost when all or part of the recuperated energy cannot be stored due to the capacity limit E max .

Figure 1 illustrates a generic path profile, including examples of negative-cost links, positive-cost links, and generic paths. The shaded area denotes the feasible range. A generic profile consists of two distinct segments: (i) E init < E min : the path is not traversable, and the energy cost is considered infinite; (ii) E init ≥ E min : the path is traversable with a minimum energy cost of g(x) (first segment), but may increase linearly up to g(x) as E init increases (second segment). In the case of negative-energy links, for example, the path can be traversed even with E init = 0. However, if E init = E max , no energy can be recuperated, resulting in a net energy cost of zero. An important property of these energy profiles is that the slope of the second segment is always one. In other words, at higher initial energy levels, the energy cost increases exactly by the amount of energy that the EV is unable to store (Storandt 2012). Also note that the following inequalities always hold: g(x) ≥ g(x) and E min (x) ≥ g(x), since the EV must have at least g(x) units of energy to be able to cover the path’s minimum cost. In simple cases, such as paths without negative-cost edges (e.g., left plot of Figure 1), we may observe flat profiles with E min (x) = g(x) = g(x).

The profile linking procedure involves shifting energy profiles in both the cost and E init domains by the energy cost of the added edge, while respecting the battery capacity constraints (Eisner, Funke, and Storandt 2011;Baum et al. 2013;Schönfelder, Leucker, and Walther 2014). Linking a path profile with an edge profile is a straightforward task and can be performed in constant time as we only need to determine new breakpoints after the profiles are linked, given that the resulting path profile follows the generic piecewise-linear form above. However, the specific calculations vary slightly depending on the direction of the search, whether a forward or backward search is being performed. In the next section, we describe the linking operation for a forward search. An illustrative example of profile linking in the backward direction is provided in the Appendix for improved clarity.

Existing label-correcting profile search methods employ a specialized procedure, called merge, to combine multiple energy profiles associated with the same state. In practice, merging two profiles involves scanning the entire range of initial energy level and computing a new profile that represents the lower envelope of the input profiles, ensuring the minimum possible cost is selected for every value of E init , sometimes by discretizing the SoC range (Eisner, Funke, and Storandt 2011). If the merged profile introduces different breakpoints compared to the existing one, the corresponding state will be re-expanded with the new profile.

Although each individual path profile can be described using at most two breakpoints, merged profiles may exhibit up to |S| breakpoints (Baum et al. 2020). Despite this bound, the merge operation remains a complex and non-trivial task, requiring careful implementation to ensure efficiency.

We now introduce our novel A*-based approach, which leverages efficient pruning rules to streamline profile search. While the method can be applied in both forward and backward directions, we present it here in the conventional forward search formulation. Inspired by recent advances in multi-objective heuristic search (Hernández et al. 2023;Ahmadi et al. 2025), in particular scenarios with negative weights (Ahmadi et al. 2024a;Ahmadi, Raith, and Jalili 2025), we frame energy-optimal profile search as a multiobjective shortest path problem with negative costs (Stewart and White III 1991), where the minimum required energy (E min ) and the maximum energy cost (g) act as additional objectives alongside the primary objective of minimizing energy cost (g). This formulation enables us to efficiently identify and prune unpromising paths during best-first search, effectively bypassing the need for the costly merge operation. Before describing the main steps of the algorithm, we introduce the key concept of dominance between search nodes. Definition. A node y is said to be dominated by node x if E min (x) ≤ E min (y), g(x) ≤ g(y), and g(x) ≤ g(y). Intuitively, this means that the energy profile of node y lies entirely above or equal to that of node x across all relevant initial energy levels, and thus y does not offer a lower energy cost at any point in the (0, E max ] range. Figure 2 illustrates three different scenarios involving energy profiles associated with nodes x, y, and z, where the profile of node z (shown in red) is dominated by that of x. For instance, in the middle plot, node z is dominated by node x since there exists no initial energy level at which z yields a lower energy cost. In contrast, nodes x and y are non-dominated, as neither profile entirely dominates the other: each offers a lower cost over some portion of the initial energy range (vertical axis), and therefore both may contribute to the lower envelope.

A pseudocode of our A*-based profile search is presented in Algorithm 2. It starts with initializing a priority queue Open, which traditionally stores unexplored (Open) nodes of the search, and a cost upper bound f . It then sets up Algorithm 2: Energy Profile (Forward) A* Search for every state u ∈ S a list X (u), which is responsible for storing all non-dominated nodes expanded with u. Since the search is done in the forward direction, the algorithm generates an initial (zero cost) node associated with start and inserts it into Open. The main search starts at line 7. In every iteration, A* extracts from Open a node with the smallest f -value among all nodes present in the queue. Let this extracted node be x. We have f (x) = g(x) + h(x), where g(x) represents the minimum cost of the concrete path from start to s(x). We now discuss our main pruning rule. Dominance pruning rule: Let x and y be two nodes associated with the same state, and without loss of generality, assume that x is extracted after y has been expanded. This implies f (y) ≤ f (x) due to A* processing nodes in nondecreasing order of f -values. Given that the primary cost is already ordered by A* (one dimension reduced), node x is dominated by node y if g(y) ≤ g(x) and E min (y) ≤ E min (x), meaning that x does not offer a better energy cost

Figure 2: Dominance and non-dominance of energy profiles. In each plot, the profile of z (in red) is dominated by the profile of x (in blue). The profiles of x and y (blue and green) are non-dominated and can both contribute to the lower envelope (in gray).

than y at any E init within the range. Now let X (s(x)) denote the set of previously expanded (non-dominated) nodes associated with state s(x). Then, each newly extracted node x can be rigorously checked against nodes in X (s(x)) to determine whether x should be pruned (lines 10-15), avoiding expansions that are guaranteed not to contribute to any energy-optimal path. However, there is an important observation in this form of label pruning that distinguishes it from label-correcting approaches: it is possible for a node x to be non-dominated with respect to any individual node in X (s(x)), but still be dominated by the lower envelope formed by the set as a whole. This means that X (s(x)) may contain nodes that do not themselves contribute to the true lower envelope. One might consider a more aggressive pruning strategy by explicitly maintaining the true lower envelope of profiles (via profile merging), as done in labelcorrecting approaches. However, as we demonstrate in the experimental section, our relaxed pruning rule, though less rigorous, achieves comparable performance to conventional (non-profile) A* search while avoiding the overhead of constructing and maintaining per-state lower envelopes. Node x is added to the X (s(x)) set if it is deemed nondominated (line 16). If x is associated with the goal state, then a tentative optimal path has been found (lines 17-19), and we can attempt to improve the search upper bound f on the solution cost (line 18). Let x be such a tentative solution node. Then, any future node y with estimated cost f (y) no smaller than either E min (x) or g(x) can be safely skipped. This pruning is valid because we would have f (x) ≤ E min (x) ≤ f (y) and f (x) ≤ g(x) ≤ f (y) for any such out-of-bounds node y (note that f (x) = g(x) for solution paths). Furthermore, since f (y) = g(y) + h(s(y)) ≤ g(y) + h(s(y)) and likewise f (y) ≤ E min (y) + h(s(y)), any solution path obtained by extending y is guaranteed to be dominated by the existing solution x. Thus, the maximum of E min (x) and g(x) can be treated as an upper bound, which the algorithm can dynamically update when a tighter bound is discovered.

If x is not a solution node, it will be expanded through its successor states (lines 20-34). Let v be one such successor state, i.e., (s(x), v) ∈ E, with its energy requirement denoted by cost e . Each descendant node generated during this expansion corresponds to a new energy profile, obtained by vertically shifting the profile of x by cost e and adjusting the resulting breakpoints to ensure they remain within the battery constraints. As in energy A* search, we compute for each descendant node y its (minimum) energy cost g(y), bounded by -E max to avoid recuperation more than the battery capacity, and estimated energy cost f (y). We then compute E min (y), the minimum initial energy required (at start) to traverse the extended path. This is calculated as the maximum of g(y) and the minimum energy required to traverse the prefix path represented by x, i.e., E min (x). In other words, E min (y) represents the maximum non-negative cumulative energy cost observed over any prefix of y. This greedy strategy ensures that the minimum required energy does not decrease along the path, even when encountering negative-cost links, since the energy needed to traverse the earlier subpath still applies. Consequently, we always have g(y) ≤ E min (y) in our forward profile search.

To compute g(y), we shift g(x) by adding cost e , while ensuring that the result remains non-negative to avoid the infeasible scenario of starting a path with a fully charged battery and ending with more than 100% SoC. More importantly, this lower-bounding of g(y) enables us to greedily capture the maximum energy cost observed among all subpaths of y ending at v, i.e., the suffix of y with the largest (non-negative) cost. This forms a natural pruning rule: if g(y) > E max , then there exists a subpath within y that cannot be traversed even with a fully charged battery, implying that y is infeasible. Note that the remaining energy at v when starting with E init = E max is given by E maxg(y).

With the energy profile of the descendant node y computed, we then perform feasibility checks to determine whether y can lead to a valid solution (lines 28, 30). Two simple conditions are checked: (i) Node y is considered infeasible if its E min or g exceeds the battery capacity E max , meaning the extended path to state v cannot be traversed even with a fully charged battery; (ii) Node y is also pruned if its estimated total energy cost (i.e., maximum suffix cost of y plus the cost-to-go from v to goal ) exceeds E max . These checks ensure that only nodes satisfying the battery constraints are further explored.

Descendant nodes can be added to Open if their energy profiles fall within the battery constraints, and if they are not dominated by any previous expansions with state v. However, instead of rigorously verifying dominance during expansion, our approach delays this check and performs it lazily when nodes are extracted from the queue. In addition, to avoid overloading the queue with dominated labels, we apply a quick, constant-time dominance check during expansion by comparing the descendant node y with the most recently expanded node associated with the same successor state v (lines 31-33). This pruning helps reduce unnecessary insertions while preserving correctness. A similar lazy strategy has been used in the context of multi-objective search (Hernández et al. 2023;Ahmadi et al. 2024a).

Finally, the algorithm terminates either by surpassing the upper bound f or when Open becomes empty, and returns X (goal ): a superset of nodes associated with energy-optimal paths between start and goal . If X (goal ) is empty upon termination, no feasible solution exists for the given problem instance. To choose form optimal paths, one can compute the minimum energy cost for any given initial energy level E init through the energy profile of nodes in X (goal ). The optimum cost can then be obtained either by selecting a profile that yields the lowest cost at E init , or by computing the lower envelope of all profiles in X (goal ) as a one-time operation. Since all nodes retain full backtracking information, reconstructing solution paths is as simple as following the parent pointers from goal back to start.

This section provides a formal proof of correctness for our energy profile search algorithm, which we call Pr-A*.

Lemma 1. Energy profile of every path can be sufficiently represented by two breakpoints: (E min , g) and (E max , g). Proof Sketch. Eisner, Funke, and Storandt (2011) showed that the number of breakpoints required to represent energy profiles is bounded. Furthermore, Case 3 of Lemma 1 in Baum et al. (2020) proves that such profiles are piecewise linear with fixed slopes and can be fully represented using just two breakpoints (we handle their Cases 1,2 within the algorithm). While our formulation slightly differs in terms of profile definition from Baum et al. (2020), which maps initial to final energy level, the conceptual basis remains equivalent, as the energy cost in our formulation is simply the difference between the final and initial energy levels.

In our notation, the first breakpoint, E min , denotes the minimum initial energy required to traverse the path at its minimum energy cost g. The second breakpoint is fixed at E max and corresponds to the maximum energy cost g. These two points are sufficient to define the entire feasible range of energy profiles, which can be reconstructed using two linear segments: one with zero slope (constant cost g) and the second with unit slope (increasing cost to g). The transition point between these segments is at (E maxg + g, g), which can be obtained from the slope structure of the profile. □ Lemma 2. Suppose Pr-A* expands nodes in non-decreasing order of f -values (which may be negative). Let x i and x i+1 be two nodes extracted from Open in consecutive iterations. Then, f

Proof Sketch. There can be two cases: (i) If x i+1 was already in Open when x i was extracted, the claim follows directly. (ii) Otherwise, if x i+1 is a descendant of x i , then by consistency we have:

Adding g(x i ) to both sides yields f (x i ) ≤ f (x i+1 ). □ Corollary 1. Let (x 1 , x 2 , . . . , x t ) be the sequence of nodes extracted from Open. If the heuristic function h is consistent and admissible, then i ≤ j implies f (x i ) ≤ f (x j ), i.e., the f -values of extracted nodes are monotonically nondecreasing (Hart, Nilsson, and Raphael 1968).

Lemma 3. Let nodes x and y be associated with the same state, and suppose x is extracted before y. x dominates y if:

E min (x) ≤ E min (y) and g(x) ≤ g(y)

Proof Sketch. From Corollary 1, we have f (x) ≤ f (y).

Since s(x) = s(y), we have h(s(x)) = h(s(y)), implying g(x) ≤ g(y). The dominance conditions on E min and g confirm that x offers a strictly better or equal profile at all energy levels, thus y is dominated by x. □ Lemma 4. Let y be a node dominated by a previously explored node x, both associated with the same state. Then the expansion of y is not necessary. Proof Sketch. Assume, for contradiction, that expanding y is necessary to obtain a cost-optimal or non-dominated solution. Since x dominates y, we have:

This implies that any path extended from y (including any solution path) can be replaced with an equal or better path extended from x, contradicting the necessity of expanding y to obtain a cost-optimal solution path. □ Lemma 5. Node y can be pruned if: E min (y) > E max or g(y) > E max or g(y)+h(s(y)) > E max Proof Sketch. The first condition directly violates the battery constraint on maximum available initial energy. The second case indicates that the cost of traversing the path represented by y is more than EV’s maximum possible available energy even with a fully charged battery, violating the battery capacity. In the third case, since h is consistent and admissible, we can guarantee that extending the maximum cost suffix of y toward goal would yield a subpath exceeding the energy capacity, rendering the expansion of y unnecessary. Lemma 6. Let x be a tentative solution node. Then, expanding any node y with f (y) > max{E min (x), g(x)} is not necessary. Proof Sketch. For such a node y, we have:

Given that f (y) = g(y) + h(s(y)), we have: f (y) ≤ g(y) + h(s(y)) and f (y) ≤ E min (y) + h(s(y)),

It follows that any solution path extended from y will be dominated by the existing solution node x. This is because: E min (x) ≤ E min (y) + h(s(y)) and g(x) ≤ g(y) + h(s(y))

Thus, if f (y) exceeds both E min (x) and g(x), any further expansion from y cannot produce a better or non-dominated solution profile. Therefore, y can be safely pruned. □ Theorem 1. Let h be a consistent and admissible energy heuristic function. Then Pr-A* returns a superset of optimal nodes representing the energy-optimal profiles from start to goal , if a feasible path exists. Proof Sketch. The algorithm explores all feasible nodes toward goal in best-first order. Dominated nodes are identified using Lemma 3 and safely pruned according to Lemma 4. Nodes with infeasible or out-of-bounds energy estimates are pruned based on Lemma 5. Furthermore, the global upper bound f provides a safe early termination criterion, since all nodes remaining in Open can be guaranteed not to yield an optimal solution (Lemma 6). Upon termination, the resulting set X (goal ) contains all individually non-dominated solution nodes. While some nodes in this set may appear dominated when compared to the global lower envelope of optimal profiles, the set nonetheless forms a superset of all truly optimal nodes. Consequently, all energy-optimal paths across the full range of E init are guaranteed to be represented. The final lower envelope of optimal profiles can be efficiently extracted via post-processing over X (goal ). □

This section evaluates the performance of our energyoptimal profile search framework on real-world road networks. We used 10 large maps from the 9 th DIMACS Implementation Challenge1 as benchmark graphs, with the largest map (Central USA) containing over 14 million states and 34 million edges. The map data includes distance and travel time per edge. We enriched these maps with elevation data from the Shuttle Radar Topography Mission2 . For each link in the network, we compute energy consumption using the energy model presented in Ahmadi et al. (2024b), which accounts for road gradient, vehicle mass, and speed profiles.

We simulate a Nissan Leaf carrying four passengers and equipped with an extended-range 85 kWh battery. All graphs are negative-cycle free. To evaluate performance, we generate 200 random queries per map, yielding a total of 2000 energy-optimal pathfinding queries for our experiments. Implementation: We implemented four variants of our energy profile search algorithm in C++, alongside standard energy-optimal Dijkstra and A* search algorithms, which work with a known initial SoC. Our four variants include:

• Pr-A* fw : A forward energy profile search based on A*, as described in Algorithm 2.

• Pr-A* bw : A backward energy profile search using A*, which explores the graph from goal to start using predecessors. This variant follows a similar expansion and pruning procedure as the forward version, but differs slightly in how profiles are linked and checked. A pseudocode of this variant is provided in the Appendix.

• Pr-BA*: A bidirectional profile search using A*, employing an interleaved strategy that incorporates both forward and backward searches above. Complete paths are constructed by joining forward and backward nodes that meet at the same state. In each iteration, the algorithm selects a node from either direction based on the smallest estimated cost. Nodes can be joined with all explored nodes from the opposite direction (that reach the same state) to form complete paths and potentially update the upper bound if feasible. A pseudocode of this variant is provided in the Appendix. • Pr-BA* par : A parallel version of Pr-BA*, where each search direction is executed on a separate CPU thread.

Each thread performs best-first exploration independently, applying the same pruning and joining rules as in the non-parallel variant.

All variants were implemented using the same data structures, and binary heap as the priority queue, along with identical heuristic functions to enable a fair, head-to-head comparison. For the Dijkstra implementation, we equipped it with a potential energy function (identical to the one used in our heuristic function) to enable online reweighting of edge costs without preprocessing, as discussed in Ahmadi et al. (2024b). For Dijkstra and A* searches, we assume initial SoC of 100%. All C++ code was compiled using the GCC 11.04 compiler with optimization level -O3. Experiments were conducted on a machine equipped with an Intel Xeon Platinum 8488C processor @3.2 GHz and 16 GB of RAM. Each instance was run three times, and we report the results corresponding to the run with the median runtime. Our code is publicly available3 . We report the results for all feasible instances in Table 1, where the instances are grouped into four energy ranges based on their minimum computed energy costs, spanning from 0 to 85 kWh, with at least 240 instances in each group. The results include the minimum, average (arithmetic), and maximum runtimes (in milliseconds) observed for each algorithm across the instances of the group. The reported runtime includes the search time as well as the initialization time of all data structures and priority queue. We also report the average speedup relative to Dijkstra (η), and also the average number of node expansions (last column).

Runtime analysis: From the results, we observe that energy-optimal A* search consistently performs approximately twice as fast as Dijkstra across all instance groups. This highlights the effectiveness of heuristic-guided search, as the slight overhead from heuristic computation is offset by a significant reduction in search time. Comparing the profile-based search methods, it is evident that the forward profile search variant, Pr-A* fw , performs closely to A*. This is likely because their search spaces are largely overlapping, whereas the backward variant operates over a different search space. That said, the backward profile variant, Pr-A* bw , achieves comparable average runtimes to its forward counterpart and is slightly faster in the lower energy range. Compared to A* with known E init , both Pr-A* fw and Pr-A* bw are at most 30% slower, demonstrating the efficiency of our proposed technique and its pseudo-polynomial performance on large-scale networks. Surprisingly, both bidirectional variants perform worse than the unidirectional profile search. In particular, Pr-BA* is even slower than Dijkstra. A key reason for this is the bidirectional path matching within the fully overlapping search spaces, where the forward and backward frontiers are continuously joined and later evaluated for optimality and potential upper-bound updates, introducing significant computational overhead. The parallel variant, Pr-BA* par , achieves partial performance improvement by enabling concurrent exploration of the forward and backward frontiers. However, it still remains up to 50% slower than the unidirectional variants, highlighting the need for more efficient bidirectional energy profile searches. Analysis of node expansion: Comparing the number of node expansions, we observe that our forward profile search, Pr-A* fw , expands nearly the same number of nodes as the energy-optimal A* search, while the bidirectional approaches expand approximately 50% more nodes on average. To better understand the distribution of expansions, Figure 3 presents the relative difference in node expansions with respect to energy-optimal A* for the three profile-based variants over all feasible instances. The horizontal axis denotes the optimal energy requirement of the instances (g-values). We observe that the forward variant, Pr-A* fw , incurs less than 10% extra expansions across most instances. In contrast, the backward variant shows far greater variability: depending on the instance, it can require more than 100% additional expansions, or conversely, up to 100% fewer expansions (negative ratios). The bidirectional variant, however, consistently exhibits higher expansion overhead, often approaching or exceeding 100% additional node expansions. In terms of the number of solution paths returned, the maximum observed was four, with the vast majority of instances yielding only a single energy-optimal solution path.

Comparison to existing solutions: We first compare our algorithm with the label-correcting approach of Schönfelder, Leucker, and Walther (2014). Their profile A* search is approximately an order of magnitude slower than conventional energy-optimal A*, whereas our approach is less than 30% slower on average. In comparison to the profile search method of Baum et al. (2020), we were unable to reproduce their results or find a publicly available, efficient implementation of their energy profile search method. Therefore, we compare their reported performance against our benchmarks indirectly. Their method is a label-correcting approach based on Dijkstra, which similarly uses a height-induced potential function to obtain reduced energy costs for an EV with 85 kWh battery. According to their reported results, their profile Dijkstra search is up to 50% slower than the standard energy-optimal Dijkstra. Given that our energy profile A* search is up to 70% faster than Dijkstra, we conclude that our approach can be at least twice as fast as the profile search method of Baum et al. (2020), while also being structurally simpler and easier to implement.

This paper presents a novel A*-based algorithm for energyoptimal profile search for electric vehicles, addressing the practical challenge of energy-efficient path planning under unknown initial energy levels. Unlike existing methods that rely on complex label-correcting strategies, our approach leverages multi-objective search and adopts a straightforward label-setting framework with efficient dominance pruning to propagate energy profiles during the search more effectively. We implemented both unidirectional and bidirectional variants of the framework and evaluated them on realistic, large-scale road networks enriched with energy consumption data. Experimental results show that the unidirectional profile search variants perform comparably to the energy-optimal A* with known initial energy, while fully supporting energy profile queries. Our approach outperforms existing methods in both simplicity and scalability, offering a practical solution for energy-optimal path planning for EVs in real-world scenarios.

A* search in our energy-based pathfinding problem is guided by the energy consumed along subpaths and a heuristic estimate of the incumbent path to the destination. Energy models for electric vehicles (EVs) can be derived either empirically or through physics-based formulation. We present a heuristic function for each model as follows.

Graphs with actual energy as edge cost. We use a basic law from physics to define a model-independent reduced cost as:

where the potential energy term is given by:

Here, M is the total mass of the EV, a is the gravitational acceleration (9.8 m/s 2 ), and H : S → R is a height function derived from elevation data. We define a heuristic function based on this reduced cost as:

where h d : S → R + is a consistent distance-based heuristic (e.g., haversine distance), Ê is the average energy efficiency of the EV (in Wh/100m), and λ ≥ 0 is a scaling factor. The value of λ is constrained such that:

where d(u, v) is the length of the link (u, v). The maximum valid λ is computed via a linear scan over all edges. We now show why h e is consistent and admissible. Consider edge (u, v) in Figure 4. Based on the natural characteristics of road networks where triangle inequality holds for distances, and given h d as a consistent distance heuristic, for a given edge (u, v) we have:

and since λ Ê • d(u, v) ≤ cost red (u, v), and (7)

Relation (9) above denotes h e is consistent. Given that h e (goal ) = 0 and that consistency implies admissibility (Pearl 1984), h e is also admissible. This heuristic remains consistent even under battery constraints (e.g., energy overflow on negative-cost edges). If an EV starts a downhill link with 100% SoC and cannot store recovered energy, the effective energy cost is adjusted (e.g., from cost e < 0 to cost ′ e = 0), increasing cost(u, v) temporarily, and thereby preserving the consistency of h e . Energy models based on longitudinal dynamics. We now consider a physics-based energy model adapted from our previous work (Ahmadi et al. 2024b), representing energy consumption as a function of road slope and load:

where s = sin(θ) is the road angle, l is the segment length (in 100m units), and m is the additional EV mass (e.g., passengers weight). Coefficients α i , β i are vehicle-specific and learned via regression for any particular driving pattern.

For this function, we approximate the coefficients α 1 and β 1 using their average values, α 1 and β 1 (averaged over all available driving patterns), to derive a path-independent potential function, and consequently, a reduced cost defined as:

We then define the corresponding heuristic as:

Here, α 0min , β 0min are the minimum energy coefficients α 0 and β 0 across patterns, respectively, and λ is a scaling factor satisfying:

where:

To prove consistency, using triangle inequality:

Therefore, this model-specific energy heuristic is also consistent and admissible, and remains valid under energy constraints, as any required adjustment will only increase the energy cost temporarily.

To better illustrate the linking procedure, we link the energy profiles of the edges along a simple path shown in Figure 5. The path consists of four edges (and four corresponding energy profiles), and we perform a backward profile linking. We assume the maximum energy level is E max = 5.

We begin with the last edge, u 4 ⇝ u 5 , which has an energy cost of 1. Its energy profile is shown in the leftmost plot of Figure 5, with E min = g = g = 1. Next, we extend the path by adding the preceding edge, u 3 ⇝ u 4 , with cost -2. Since this link has a negative energy cost, both the minimum required energy E min and the energy cost g of the subpath decrease by two units. As a result, the minimum cost of the extended path u 3 ⇝ u 4 ⇝ u 5 becomes -1, and E min becomes 0. This corresponds to shifting the initial profile both to the left and downward by two units. However, since the EV cannot recuperate energy when starting from a full battery at E max , the maximum energy cost remains unchanged, i.e., g = 1, as shown in the second plot of Figure 5.

In the third step, we extend the subpath by adding the positive-cost edge u 2 ⇝ u 3 with a cost of 3. Accordingly, both the energy cost and E min of the subpath increase. This is equivalent to shifting the profile up and to the right by three units. The resulting minimum energy cost is now 2, and E min = 3. The maximum energy cost, however, becomes equal to the minimum cost, i.e., g = 2, since no overcharging occurs even when starting from a full battery at u 2 . The updated profile is shown in the third plot of Figure 5.

Finally, we add the first edge, u 1 ⇝ u 2 , with an energy cost of -1. Similar to the earlier negative-cost link, the profile is shifted left and downward by one unit, reducing both g and E min by one, while keeping the maximum energy cost g from the preceding path unchanged. This final energy profile is shown in the rightmost plot of Figure 5. Therefore, to traverse the complete path from u 1 to u 5 , at least two units of energy are required at u 1 , and the total energy cost lies in the range [1, 2], depending on the initial energy level.

Algorithm 3 presents a pseudocode for our energy-optimal profile search using backward A*. It is nearly identical to the forward variant in Algorithm 2, with two main differences in: i) the calculations of E min and g breakpoints during expansion; ii) the heuristic function h, which is now a backward energy heuristic that returns energy estimates relative to the start state. Note that, in the backward search, E min and g denote maximum suffix and prefix, respectively, when extending paths from goal to start. Thus, the upperbounding at line 30 of Algorithm 3 is conducted using E min (the maximum suffix plus cost-to-go estimate to start).

Algorithm 4 presents a pseudocode for energy-optimal profile search using bidirectional A*. This framework maintains two priority queues (one for forward and another for backward search), as well as separate heuristic functions for each direction. Each priority queue is initialized with a corresponding initial node (start in the forward direction and goal in the backward direction). Each iteration of the algorithm involves extracting the best node from either of the queues. Each node in this framework also stores a tag, called joined , denoting solution nodes obtained by matching a forward node with a backward counterpart (both with the same state). When a joined node is extracted, the algorithm checks it against all existing solution profiles stored in the solution set Sols for dominance, and if deemed non-dominated, it will be added to the solution set. Otherwise, if the extracted node is not a joined solution node, it will get expanded as in forward or backward A* search, depending on the priority queue from which the node is extracted. The last step is joining the non-dominated node with all nodes expanded with the same state in the opposite direction to form a complete (joined) path. Upon joining a forward node with a backward node, we generate a new profile whose breakpoints are cal-Algorithm 3: Energy Profile (Backward) A* Search Inputs: A problem instance (G, cost, h, start, goal ) Output: A superset of nodes representing optimal profiles 1 Open ← ∅, f ← ∞ 2 X (u) ← ∅ ∀u ∈ S 3 x ← new node with s(x) = goal 4 g(x) ← 0, g(x) ← 0, Emin (x) ← 0, parent(x) ← ∅ 5 f (x) ← h(goal ) 6 Add x to Open culated through linking the corresponding forward and backward profiles. In other words, the resulting joined profile is still represented by two breakpoints, which can be done in constant time (see our implementation for more details). Once the joined node is set up, it will be added to the corresponding priority queue. The search eventually terminates and returns Sols as a set containing all joined solution nodes representing optimal energy profiles.

http://www.diag.uniroma1.it/challenge9

https://www2.jpl.nasa.gov/srtm/

https://bitbucket.org/s-ahmadi/eospp

📸 Image Gallery

extra_expansion.png linking_edges.png linking_profiles.png non-dominance.png path_profile_def.png

Reference

This content is AI-processed based on open access ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut