Updated submission
This commit is contained in:
parent
9a01b1b443
commit
5c2dd0395e
3 changed files with 8 additions and 8 deletions
|
@ -23,12 +23,12 @@ class HomePage extends ReactiveWidget<HomeModel> {
|
|||
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,
|
||||
|
|
|
@ -32,7 +32,7 @@ Iterable<StopState>? 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());
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class StopState extends AStarState<StopState> with Encodable {
|
|||
static late final Map<StopID, Stop> stops;
|
||||
|
||||
static Iterable<Stop> findStopsNear(Coordinates location) {
|
||||
const numStops = 5;
|
||||
const numStops = 3;
|
||||
log("Finding stops near $location...");
|
||||
final stopDistances = [
|
||||
for (final stop in stops.values)
|
||||
|
|
Loading…
Reference in a new issue