diff options
| author | Anson Bridges <bridges.anson@gmail.com> | 2023-11-08 16:55:26 -0500 |
|---|---|---|
| committer | Anson Bridges <bridges.anson@gmail.com> | 2023-11-08 16:55:26 -0500 |
| commit | 7a64a92c18e6512b6e6afcb52291e75c140b42fd (patch) | |
| tree | 4e935cd98198878d6c873739041c7ee94e5a5146 /dashboard_website | |
| parent | 63d57c7f57de281934726ecdc43e27b6da99be06 (diff) | |
extra comments
Diffstat (limited to 'dashboard_website')
| -rw-r--r-- | dashboard_website/__pycache__/db.cpython-311.pyc | bin | 10007 -> 10348 bytes | |||
| -rw-r--r-- | dashboard_website/__pycache__/router.cpython-311.pyc | bin | 0 -> 16116 bytes | |||
| -rw-r--r-- | dashboard_website/router.py | 11 |
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 Binary files differindex 7a3d21e..cafda27 100644 --- a/dashboard_website/__pycache__/db.cpython-311.pyc +++ b/dashboard_website/__pycache__/db.cpython-311.pyc diff --git a/dashboard_website/__pycache__/router.cpython-311.pyc b/dashboard_website/__pycache__/router.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..584aea1 --- /dev/null +++ b/dashboard_website/__pycache__/router.cpython-311.pyc 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) |
