diff options
Diffstat (limited to 'backend/src/pathfinder.py')
| -rw-r--r-- | backend/src/pathfinder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/src/pathfinder.py b/backend/src/pathfinder.py index 80e7a44..4ce2df3 100644 --- a/backend/src/pathfinder.py +++ b/backend/src/pathfinder.py @@ -3,7 +3,7 @@ from dataclasses import dataclass from tqdm import tqdm from arbitrage import Trade -from graph import Graph +from graph import NavigationGraph as Graph logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) @@ -111,7 +111,7 @@ def calculate_net_profit(order_matches: list[Trade], graph: Graph, ship: Ship) - for order_match in tqdm(order_matches): try: # Calculate transport cost from ship location to from_station - cost_to_source = graph.shortest_path_length(ship.location, order_match.from_station) + cost_to_source = graph.shortest_path_length(ship["location"], order_match.from_station) # Calculate transport cost from from_station to to_station cost_to_destination = graph.shortest_path_length(order_match.from_station, order_match.to_station) |
