diff options
| author | kboz <kutayboz@gmail.com> | 2026-04-19 01:50:32 +0200 |
|---|---|---|
| committer | kboz <kutayboz@gmail.com> | 2026-04-19 01:50:32 +0200 |
| commit | acbf6d6bd6d63ab0e9f7c4e119827f76e0382aac (patch) | |
| tree | 9d2f74608ae4b910a480648c7bd95fdf6c403389 /backend/src/pathfinder.py | |
| parent | 8cc70dfee2049772a2da9cfdeb15f64452bc390b (diff) | |
| download | haul-acbf6d6bd6d63ab0e9f7c4e119827f76e0382aac.tar.gz | |
feat(backend): unify boot process and refactor route properties
- Added scripts/haul.sh, setup_auth.py, and setup_eve_data.py for simplified SSO and CSV data bootstrapping.
- Refactored `Ship` and `RouteStep` properties across route planning modules to utilize dictionaries instead of strict dataclass attributes.
- Re-aligned route limits, reducing upfront capital risk values in `arbitrage.py` and updating ship metrics in `manager.py`.
- Updated `.gitignore`, `.env.example`, and created AI-assistant prompt configuration.
- Added comprehensive "Getting Started" guides to the README and initialized CHANGELOG.md.
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) |
