File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -608,8 +608,11 @@ def many_to_many(self, second_pass: bool = True) -> pd.DataFrame:
608
608
missing .reset_index (), "origin_id" , "destination_id"
609
609
)
610
610
611
- # Merge missing sets that overlap significantly (think two origins
612
- # that share 1000 destinations but not the 1001st)
611
+ # Merge missing sets of OD pairs that overlap significantly (think
612
+ # two origins that share 1000 destinations but not the 1001st)
613
+ missing_sets = [
614
+ df [["origin_id" , "destination_id" ]] for df in missing_sets
615
+ ]
613
616
merged_sets = merge_overlapping_df_list (missing_sets , 0.8 )
614
617
615
618
# Gut check that both sets contain the same number of rows
@@ -622,12 +625,12 @@ def many_to_many(self, second_pass: bool = True) -> pd.DataFrame:
622
625
"The total number of rows in missing_sets does not"
623
626
"match the total number of rows in merged_sets"
624
627
)
628
+
625
629
self .config .logger .info (
626
630
"Found %s unique missing sets. Merged to %s sets" ,
627
631
len (missing_sets ),
628
632
len (merged_sets ),
629
633
)
630
-
631
634
for idx , missing_set in enumerate (merged_sets ):
632
635
self .config .logger .info ("Routing missing set number %s" , idx )
633
636
o_ids = missing_set ["origin_id" ].unique ()
You can’t perform that action at this time.
0 commit comments