summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dashboard_website/__pycache__/db.cpython-311.pycbin10007 -> 10348 bytes
-rw-r--r--dashboard_website/__pycache__/router.cpython-311.pycbin0 -> 16116 bytes
-rw-r--r--dashboard_website/router.py11
3 files changed, 10 insertions, 1 deletions
diff --git a/dashboard_website/__pycache__/db.cpython-311.pyc b/dashboard_website/__pycache__/db.cpython-311.pyc
index 7a3d21e..cafda27 100644
--- a/dashboard_website/__pycache__/db.cpython-311.pyc
+++ b/dashboard_website/__pycache__/db.cpython-311.pyc
Binary files differ
diff --git a/dashboard_website/__pycache__/router.cpython-311.pyc b/dashboard_website/__pycache__/router.cpython-311.pyc
new file mode 100644
index 0000000..584aea1
--- /dev/null
+++ b/dashboard_website/__pycache__/router.cpython-311.pyc
Binary files differ
diff --git a/dashboard_website/router.py b/dashboard_website/router.py
index 3929cca..658c112 100644
--- a/dashboard_website/router.py
+++ b/dashboard_website/router.py
@@ -1,4 +1,3 @@
-import folium
import numpy as np
import pandas as pd
import requests
@@ -32,6 +31,16 @@ def getZSP(bike, home, clue_cluster):
# determines clusters based on current bikes and clues
def getClusters(bikes, clues, endpoint):
+ clusters = [ [] for bike in bikes ]
+ active_bikes = [bike for bike in bikes if bike.status == "ACTIVE"]
+ active_clues = [clue for clue in clues if clue.status == "UNVISITED"]
+ # select only active bikes
+ # select only unvisited clues
+ clusters_t, route_geo = cluster_and_optimize( active_clues, active_bikes,endpoint)
+ for cluster in clusters_t:
+ clusters[i] = cluster
+
+ #return list of clue clusters corresponding to bikes
pass
# utility functions (internal)