From 5c2dd0395ea78fa0b1dcebbf6e089a416c0b5174 Mon Sep 17 00:00:00 2001 From: Levi Lesches Date: Tue, 6 May 2025 21:17:14 -0400 Subject: [PATCH] Updated submission --- src/client/lib/src/pages/home.dart | 12 ++++++------ src/shared/lib/src/graph/algorithm.dart | 2 +- src/shared/lib/src/graph/state.dart | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/client/lib/src/pages/home.dart b/src/client/lib/src/pages/home.dart index f5da5ee..8b375b4 100644 --- a/src/client/lib/src/pages/home.dart +++ b/src/client/lib/src/pages/home.dart @@ -23,12 +23,12 @@ class HomePage extends ReactiveWidget { child: Card( child: Column( children: [ - SwitchListTile( - value: model.markerState == MarkerState.override, - onChanged: model.overrideMarkers, - title: const Text("Show stops list"), - subtitle: const Text("To select a start or end stop, use the buttons below"), - ), + // SwitchListTile( + // value: model.markerState == MarkerState.override, + // onChanged: model.overrideMarkers, + // title: const Text("Show stops list"), + // subtitle: const Text("To select a start or end stop, use the buttons below"), + // ), LatLongEditor( latitudeController: model.startLatitudeController, longitudeController: model.startLongitudeController, diff --git a/src/shared/lib/src/graph/algorithm.dart b/src/shared/lib/src/graph/algorithm.dart index b62eb64..8bee683 100644 --- a/src/shared/lib/src/graph/algorithm.dart +++ b/src/shared/lib/src/graph/algorithm.dart @@ -32,7 +32,7 @@ Iterable? findPath(Coordinates start, Coordinates end) { endPoint: end, ); log("Finding a route using ${state.hash()}"); - final result = aStar(state); + final result = aStar(state, limit: 2500); if (result == null) continue; paths.add(result.reconstructPath()); } diff --git a/src/shared/lib/src/graph/state.dart b/src/shared/lib/src/graph/state.dart index 3e6ca92..5dcd9dc 100644 --- a/src/shared/lib/src/graph/state.dart +++ b/src/shared/lib/src/graph/state.dart @@ -15,7 +15,7 @@ class StopState extends AStarState with Encodable { static late final Map stops; static Iterable findStopsNear(Coordinates location) { - const numStops = 5; + const numStops = 3; log("Finding stops near $location..."); final stopDistances = [ for (final stop in stops.values)