Clean virtual district

This commit is contained in:
WQY\qiong
2023-04-30 17:44:18 +08:00
parent b3a630c5e1
commit 9b53f7b51f

View File

@@ -1,9 +1,8 @@
from .database import *
from .s0_base import get_node_links
#from .s32_region_util import calculate_boundary, calculate_convex_hull, inflate_boundary
def calculate_virtual_district(name: str, centers: list[str]) -> dict[str, Any]:
def calculate_virtual_district(name: str, centers: list[str]) -> dict[str, list[Any]]:
write(name, 'delete from temp_vd_topology')
# map node name to index
@@ -62,9 +61,6 @@ def calculate_virtual_district(name: str, centers: list[str]) -> dict[str, Any]:
vds: list[dict[str, Any]] = []
for center, value in center_node.items():
#p = calculate_boundary(name, value)
#b = inflate_boundary(name, p)
#c = calculate_convex_hull(name, value)
vds.append({ 'center': center, 'nodes': value })
return { 'virtual_districts': vds, 'isolated_nodes': isolated_nodes }