From 79521125a3c5306e7766d791c5b4db01ca169ea5 Mon Sep 17 00:00:00 2001 From: "niehues.mark@gmail.com" <niehues.mark@gmail.com> Date: Mon, 30 Mar 2020 19:26:07 +0200 Subject: [PATCH] wip --- evrouting/gasstation/routing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evrouting/gasstation/routing.py b/evrouting/gasstation/routing.py index c40aa1c..3a17f67 100644 --- a/evrouting/gasstation/routing.py +++ b/evrouting/gasstation/routing.py @@ -199,7 +199,7 @@ def shortest_path(G: nx.Graph, charging_stations: Set[Node], s: Node, t: Node, # Todo: Test! _path = dijkstra(G, s, t, weight=CONSUMPTION_KEY) _w = fold_path(G, _path, weight=CONSUMPTION_KEY) - if _w < initial_soc: + if _w <= initial_soc: return { 'trip_time': fold_path(G, _path, weight=DISTANCE_KEY), 'path': [(s, 0), (t, 0)] -- GitLab