Skip to content

Commit bef311f

Browse files
committed
Make node options explicit
1 parent fae6af8 commit bef311f

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

task_queue/grid_optimizer.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ def _add_node(self, label, **kwargs):
595595
"how_added": "automatic",
596596
"type_fixed": False,
597597
"cluster_label": 0,
598-
"n_connection_links": "0",
598+
"n_connection_links": 0,
599599
"n_distribution_links": 0,
600600
"parent": "unknown",
601601
"distribution_cost": 0,
@@ -1678,10 +1678,12 @@ def kmeans_clustering(self, n_clusters: int, consumer_indices: pd.Index = None):
16781678
poles["longitude"] = 0
16791679
poles["distance_to_load_center"] = 0
16801680
poles["type_fixed"] = False
1681-
poles["n_connection_links"] = "0"
1681+
poles["n_connection_links"] = 0
16821682
poles["n_distribution_links"] = 0
16831683
poles["parent"] = "unknown"
16841684
poles["distribution_cost"] = 0
1685+
poles["custom_specification"] = ""
1686+
poles["shs_options"] = 0
16851687
self.nodes = pd.concat([self.nodes, poles])
16861688
self.nodes.index = self.nodes.index.astype("str")
16871689
self.convert_lonlat_xy(inverse=True)
@@ -1730,6 +1732,11 @@ def _add_pole(x, y):
17301732
poles["how_added"] = "road-sampled"
17311733
poles["type_fixed"] = False
17321734
poles["is_connected"] = True
1735+
poles["n_connection_links"] = 0
1736+
poles["n_distribution_links"] = 0
1737+
poles["parent"] = "unknown"
1738+
poles["custom_specification"] = ""
1739+
poles["shs_options"] = 0
17331740
# High-offset cluster labels avoid collision with k-means labels (0..n)
17341741
poles["cluster_label"] = range(100000, 100000 + len(poles))
17351742

0 commit comments

Comments
 (0)