Unfortunately, this problem is NP-hard. Given an instance of the salesman route from s to t with a decision threshold d (is there an st path for all vertices of length no more than d?), Make an instance of this problem as follows. Add a new destination vertex associated with the t very long edge. Give starting fuel d. Set the length of the new edge and the fuel at each vertex except the destination, so that (1) the total amount of fuel at all the vertices is equal to the length of the new edge (2), it is impossible to use a new edge without collecting all the fuel. You can only reach your destination when there is a short seller route.
Accordingly, the algorithms for this problem will resemble the algorithms for TSP. The pre-process, building a complete graph on the source, target and peaks with non-zero fuel. The length of each edge is equal to the distance.
If there are few enough special vertices, then exponential time (O (2 ^ n poly (n))) dynamic programming is possible. For each pair consisting of a subset of vertices (in decreasing order of size) and a vertex in that subset, determine the cheapest way to visit the entire subset and terminate at that vertex. Do this efficiently using pre-calculated results for the subset minus the vertex and every possible last waypoint. There is an optimization that reduces solutions that are worse than a known solution, which can help if there is no need to use a lot of waypoints.
Otherwise, reproduction can be whole programming. Here is one wording, most likely improved. Let x(i, e) be a variable equal to 1 if the directional edge e taken as the i th step (counting from zero) else 0. Let f(v) be the fuel available at the vertex v . Let y(i) be the variable that is the fuel in the hand after steps i . Suppose the total number of steps is T
minimize sum_i sum_{edges e} cost(e) x(i, e) subject to for each i, for each vertex v, sum_{edges e with head v} x(i, e) - sum_{edges e with tail v} x(i + 1, e) = -1 if i = 0 and v is the source 1 if i + 1 = T and v is the target 0 otherwise for each vertex v, sum_i sum_{edges e with head v} x(i, e) <= 1 for each vertex v, sum_i sum_{edges e with tail v} x(i, e) <= 1 y(0) <= initial fuel for each i, y(i) >= sum_{edges e} cost(e) x(i, e) for each i, for each vertex v, y(i + 1) <= y(i) + sum_{edges e} (-cost(e) + f(head of e)) x(i, e) for each i, y(i) >= 0 for each edge e, x(e) in {0, 1}