diff --git a/archive/routing/conflict_trace.json b/archive/routing/conflict_trace.json index 90fc817..93454cc 100644 --- a/archive/routing/conflict_trace.json +++ b/archive/routing/conflict_trace.json @@ -1,5 +1,5 @@ { - "generated_at": "2026-04-02T14:24:39-07:00", + "generated_at": "2026-11-26T21:47:32-08:00", "generator": "scripts/record_conflict_trace.py", "scenarios": [ { @@ -119,6 +119,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 6, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1138.0796326794896 @@ -183,6 +184,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 9, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 980.0796326794897 @@ -242,6 +244,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 8, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 970.0796326794897 @@ -281,6 +284,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 4, + "out_of_bounds": false, "self_collision_count": 1, "static_collision_count": 0, "total_length": 1621.236812357892 @@ -334,6 +338,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 7, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1059.0796326794896 @@ -377,6 +382,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 5, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1128.0796326794896 @@ -410,6 +416,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 1, "static_collision_count": 0, "total_length": 1631.236812357892 @@ -463,6 +470,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 7, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1049.0796326794896 @@ -476,6 +484,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 909.9977565924808 @@ -497,6 +506,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 1, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 914.6410526793834 @@ -570,6 +580,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 909.9977565924808 @@ -618,6 +629,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 6, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 980.0796326794897 @@ -671,6 +683,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 7, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1128.0796326794896 @@ -719,6 +732,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 6, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1217.0796326794896 @@ -732,6 +746,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 914.6410526793834 @@ -790,6 +805,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 8, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1049.0796326794896 @@ -838,6 +854,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 6, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1207.0796326794896 @@ -886,6 +903,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 6, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 970.0796326794897 @@ -944,6 +962,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 8, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1059.0796326794896 @@ -997,6 +1016,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 7, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1138.0796326794896 @@ -1007,6 +1027,7 @@ }, { "completed_net_ids": [ + "net_03", "net_04", "net_05", "net_08", @@ -1021,10 +1042,6 @@ "net_00", "net_02" ], - [ - "net_00", - "net_03" - ], [ "net_01", "net_02" @@ -1044,6 +1061,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 914.6410526793834 @@ -1052,7 +1070,7 @@ { "component_conflicts": [ { - "other_component_index": 0, + "other_component_index": 1, "other_net_id": "net_00", "self_component_index": 2 }, @@ -1072,7 +1090,7 @@ "self_component_index": 4 }, { - "other_component_index": 2, + "other_component_index": 3, "other_net_id": "net_00", "self_component_index": 5 } @@ -1086,6 +1104,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 5, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1049.0796326794896 @@ -1099,6 +1118,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 909.9977565924808 @@ -1107,7 +1127,7 @@ { "component_conflicts": [ { - "other_component_index": 0, + "other_component_index": 1, "other_net_id": "net_00", "self_component_index": 2 }, @@ -1122,7 +1142,7 @@ "self_component_index": 3 }, { - "other_component_index": 2, + "other_component_index": 3, "other_net_id": "net_00", "self_component_index": 5 } @@ -1136,6 +1156,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 4, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1128.0796326794896 @@ -1149,6 +1170,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1138.0796326794896 @@ -1162,32 +1184,21 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1217.0796326794896 } }, { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_00", - "self_component_index": 2 - }, - { - "other_component_index": 1, - "other_net_id": "net_00", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_00" - ], + "component_conflicts": [], + "conflicting_net_ids": [], "net_id": "net_03", - "outcome": "colliding", + "outcome": "completed", "reached_target": true, "report": { - "dynamic_collision_count": 2, + "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 970.0796326794897 @@ -1219,6 +1230,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 980.0796326794897 @@ -1245,6 +1257,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1059.0796326794896 @@ -1255,44 +1268,34 @@ { "other_component_index": 2, "other_net_id": "net_01", - "self_component_index": 0 + "self_component_index": 1 }, { "other_component_index": 2, "other_net_id": "net_02", - "self_component_index": 0 - }, - { - "other_component_index": 2, - "other_net_id": "net_03", "self_component_index": 1 }, { "other_component_index": 5, "other_net_id": "net_01", - "self_component_index": 2 + "self_component_index": 3 }, { "other_component_index": 5, "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 3, - "other_net_id": "net_03", - "self_component_index": 2 + "self_component_index": 3 } ], "conflicting_net_ids": [ "net_01", - "net_02", - "net_03" + "net_02" ], "net_id": "net_00", "outcome": "colliding", "reached_target": true, "report": { - "dynamic_collision_count": 6, + "dynamic_collision_count": 4, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1207.0796326794896 @@ -1303,33 +1306,51 @@ }, { "completed_net_ids": [ - "net_02", - "net_03", "net_04", - "net_05", - "net_08", - "net_09" + "net_05" ], "conflict_edges": [ [ "net_00", "net_01" ], + [ + "net_02", + "net_03" + ], [ "net_06", "net_07" + ], + [ + "net_08", + "net_09" ] ], "iteration": 3, "nets": [ { - "component_conflicts": [], - "conflicting_net_ids": [], + "component_conflicts": [ + { + "other_component_index": 1, + "other_net_id": "net_03", + "self_component_index": 1 + }, + { + "other_component_index": 2, + "other_net_id": "net_03", + "self_component_index": 2 + } + ], + "conflicting_net_ids": [ + "net_03" + ], "net_id": "net_02", - "outcome": "completed", + "outcome": "colliding", "reached_target": true, "report": { - "dynamic_collision_count": 0, + "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1049.0796326794896 @@ -1340,17 +1361,17 @@ { "other_component_index": 2, "other_net_id": "net_00", - "self_component_index": 2 + "self_component_index": 3 }, { "other_component_index": 2, "other_net_id": "net_00", - "self_component_index": 3 + "self_component_index": 4 }, { "other_component_index": 3, "other_net_id": "net_00", - "self_component_index": 4 + "self_component_index": 5 } ], "conflicting_net_ids": [ @@ -1361,19 +1382,34 @@ "reached_target": true, "report": { "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1128.0796326794896 } }, { - "component_conflicts": [], - "conflicting_net_ids": [], + "component_conflicts": [ + { + "other_component_index": 3, + "other_net_id": "net_08", + "self_component_index": 3 + }, + { + "other_component_index": 4, + "other_net_id": "net_08", + "self_component_index": 4 + } + ], + "conflicting_net_ids": [ + "net_08" + ], "net_id": "net_09", - "outcome": "completed", + "outcome": "colliding", "reached_target": true, "report": { - "dynamic_collision_count": 0, + "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1217.0796326794896 @@ -1382,12 +1418,12 @@ { "component_conflicts": [ { - "other_component_index": 2, + "other_component_index": 3, "other_net_id": "net_01", "self_component_index": 2 }, { - "other_component_index": 3, + "other_component_index": 4, "other_net_id": "net_01", "self_component_index": 3 } @@ -1400,6 +1436,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1207.0796326794896 @@ -1426,6 +1463,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1059.0796326794896 @@ -1439,6 +1477,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 914.6410526793834 @@ -1452,6 +1491,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 909.9977565924808 @@ -1483,32 +1523,71 @@ "reached_target": true, "report": { "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 980.0796326794897 } }, { - "component_conflicts": [], - "conflicting_net_ids": [], + "component_conflicts": [ + { + "other_component_index": 1, + "other_net_id": "net_02", + "self_component_index": 1 + }, + { + "other_component_index": 1, + "other_net_id": "net_02", + "self_component_index": 2 + }, + { + "other_component_index": 2, + "other_net_id": "net_02", + "self_component_index": 3 + } + ], + "conflicting_net_ids": [ + "net_02" + ], "net_id": "net_03", - "outcome": "completed", + "outcome": "colliding", "reached_target": true, "report": { - "dynamic_collision_count": 0, + "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 970.0796326794897 } }, { - "component_conflicts": [], - "conflicting_net_ids": [], + "component_conflicts": [ + { + "other_component_index": 3, + "other_net_id": "net_09", + "self_component_index": 3 + }, + { + "other_component_index": 3, + "other_net_id": "net_09", + "self_component_index": 4 + }, + { + "other_component_index": 4, + "other_net_id": "net_09", + "self_component_index": 5 + } + ], + "conflicting_net_ids": [ + "net_09" + ], "net_id": "net_08", - "outcome": "completed", + "outcome": "colliding", "reached_target": true, "report": { - "dynamic_collision_count": 0, + "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1138.0796326794896 @@ -1520,7 +1599,7 @@ { "completed_net_ids": [ "net_00", - "net_03", + "net_01", "net_04", "net_05", "net_08", @@ -1528,8 +1607,8 @@ ], "conflict_edges": [ [ - "net_01", - "net_02" + "net_02", + "net_03" ], [ "net_06", @@ -1546,6 +1625,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1207.0796326794896 @@ -1577,6 +1657,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 980.0796326794897 @@ -1590,6 +1671,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1217.0796326794896 @@ -1603,6 +1685,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 914.6410526793834 @@ -1616,19 +1699,39 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1138.0796326794896 } }, { - "component_conflicts": [], - "conflicting_net_ids": [], + "component_conflicts": [ + { + "other_component_index": 1, + "other_net_id": "net_02", + "self_component_index": 1 + }, + { + "other_component_index": 1, + "other_net_id": "net_02", + "self_component_index": 2 + }, + { + "other_component_index": 2, + "other_net_id": "net_02", + "self_component_index": 3 + } + ], + "conflicting_net_ids": [ + "net_02" + ], "net_id": "net_03", - "outcome": "completed", + "outcome": "colliding", "reached_target": true, "report": { - "dynamic_collision_count": 0, + "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 970.0796326794897 @@ -1655,6 +1758,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1059.0796326794896 @@ -1663,29 +1767,25 @@ { "component_conflicts": [ { - "other_component_index": 3, - "other_net_id": "net_01", + "other_component_index": 1, + "other_net_id": "net_03", + "self_component_index": 1 + }, + { + "other_component_index": 2, + "other_net_id": "net_03", "self_component_index": 2 - }, - { - "other_component_index": 3, - "other_net_id": "net_01", - "self_component_index": 3 - }, - { - "other_component_index": 4, - "other_net_id": "net_01", - "self_component_index": 4 } ], "conflicting_net_ids": [ - "net_01" + "net_03" ], "net_id": "net_02", "outcome": "colliding", "reached_target": true, "report": { - "dynamic_collision_count": 3, + "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1049.0796326794896 @@ -1699,32 +1799,21 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 909.9977565924808 } }, { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 3 - }, - { - "other_component_index": 3, - "other_net_id": "net_02", - "self_component_index": 4 - } - ], - "conflicting_net_ids": [ - "net_02" - ], + "component_conflicts": [], + "conflicting_net_ids": [], "net_id": "net_01", - "outcome": "colliding", + "outcome": "completed", "reached_target": true, "report": { - "dynamic_collision_count": 2, + "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1128.0796326794896 @@ -1762,6 +1851,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1207.0796326794896 @@ -1775,6 +1865,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1128.0796326794896 @@ -1788,6 +1879,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 909.9977565924808 @@ -1801,6 +1893,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1217.0796326794896 @@ -1827,6 +1920,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1049.0796326794896 @@ -1840,6 +1934,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 914.6410526793834 @@ -1853,6 +1948,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1138.0796326794896 @@ -1879,6 +1975,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1059.0796326794896 @@ -1910,6 +2007,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 980.0796326794897 @@ -1941,6 +2039,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 970.0796326794897 @@ -1951,8 +2050,8 @@ }, { "completed_net_ids": [ - "net_02", - "net_03", + "net_00", + "net_01", "net_04", "net_05", "net_08", @@ -1960,8 +2059,8 @@ ], "conflict_edges": [ [ - "net_00", - "net_01" + "net_02", + "net_03" ], [ "net_06", @@ -1971,57 +2070,28 @@ "iteration": null, "nets": [ { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_01", - "self_component_index": 2 - }, - { - "other_component_index": 3, - "other_net_id": "net_01", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_01" - ], + "component_conflicts": [], + "conflicting_net_ids": [], "net_id": "net_00", - "outcome": "colliding", + "outcome": "completed", "reached_target": true, "report": { - "dynamic_collision_count": 2, + "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1207.0796326794896 } }, { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_00", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_00", - "self_component_index": 3 - }, - { - "other_component_index": 3, - "other_net_id": "net_00", - "self_component_index": 4 - } - ], - "conflicting_net_ids": [ - "net_00" - ], + "component_conflicts": [], + "conflicting_net_ids": [], "net_id": "net_01", - "outcome": "colliding", + "outcome": "completed", "reached_target": true, "report": { - "dynamic_collision_count": 3, + "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1128.0796326794896 @@ -2035,6 +2105,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 909.9977565924808 @@ -2048,19 +2119,34 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1217.0796326794896 } }, { - "component_conflicts": [], - "conflicting_net_ids": [], + "component_conflicts": [ + { + "other_component_index": 1, + "other_net_id": "net_03", + "self_component_index": 1 + }, + { + "other_component_index": 2, + "other_net_id": "net_03", + "self_component_index": 2 + } + ], + "conflicting_net_ids": [ + "net_03" + ], "net_id": "net_02", - "outcome": "completed", + "outcome": "colliding", "reached_target": true, "report": { - "dynamic_collision_count": 0, + "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1049.0796326794896 @@ -2074,6 +2160,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 914.6410526793834 @@ -2087,6 +2174,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1138.0796326794896 @@ -2113,6 +2201,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 2, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1059.0796326794896 @@ -2144,19 +2233,39 @@ "reached_target": true, "report": { "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 980.0796326794897 } }, { - "component_conflicts": [], - "conflicting_net_ids": [], + "component_conflicts": [ + { + "other_component_index": 1, + "other_net_id": "net_02", + "self_component_index": 1 + }, + { + "other_component_index": 1, + "other_net_id": "net_02", + "self_component_index": 2 + }, + { + "other_component_index": 2, + "other_net_id": "net_02", + "self_component_index": 3 + } + ], + "conflicting_net_ids": [ + "net_02" + ], "net_id": "net_03", - "outcome": "completed", + "outcome": "colliding", "reached_target": true, "report": { - "dynamic_collision_count": 0, + "dynamic_collision_count": 3, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 970.0796326794897 @@ -2189,6 +2298,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1207.0796326794896 @@ -2202,6 +2312,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1128.0796326794896 @@ -2215,6 +2326,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 909.9977565924808 @@ -2228,6 +2340,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1217.0796326794896 @@ -2241,6 +2354,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1049.0796326794896 @@ -2254,6 +2368,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 914.6410526793834 @@ -2267,6 +2382,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1138.0796326794896 @@ -2280,6 +2396,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1059.0796326794896 @@ -2293,6 +2410,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 980.0796326794897 @@ -2306,6 +2424,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 970.0796326794897 @@ -2316,75 +2435,77 @@ } ], "metrics": { - "congestion_cache_hits": 31, - "congestion_cache_misses": 4625, - "congestion_candidate_ids": 9924, - "congestion_candidate_nets": 9979, - "congestion_candidate_precheck_hits": 2562, - "congestion_candidate_precheck_misses": 2165, - "congestion_candidate_precheck_skips": 71, - "congestion_check_calls": 4625, - "congestion_exact_pair_checks": 8122, - "congestion_grid_net_cache_hits": 2457, - "congestion_grid_net_cache_misses": 3942, - "congestion_grid_span_cache_hits": 2283, - "congestion_grid_span_cache_misses": 1948, + "congestion_cache_hits": 24, + "congestion_cache_misses": 3411, + "congestion_candidate_ids": 7213, + "congestion_candidate_nets": 7410, + "congestion_candidate_precheck_hits": 1677, + "congestion_candidate_precheck_misses": 1795, + "congestion_candidate_precheck_skips": 37, + "congestion_check_calls": 3411, + "congestion_exact_pair_checks": 5860, + "congestion_grid_net_cache_hits": 1676, + "congestion_grid_net_cache_misses": 3276, + "congestion_grid_span_cache_hits": 1517, + "congestion_grid_span_cache_misses": 1637, "congestion_lazy_requeues": 0, "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 2673, - "congestion_net_envelope_cache_misses": 4139, - "congestion_presence_cache_hits": 2858, - "congestion_presence_cache_misses": 2556, - "congestion_presence_skips": 687, - "danger_map_cache_hits": 16878, - "danger_map_cache_misses": 7425, - "danger_map_lookup_calls": 24303, - "danger_map_query_calls": 7425, - "danger_map_total_ns": 222763960, + "congestion_net_envelope_cache_hits": 1801, + "congestion_net_envelope_cache_misses": 3433, + "congestion_presence_cache_hits": 1857, + "congestion_presence_cache_misses": 2075, + "congestion_presence_skips": 460, + "danger_map_cache_hits": 13605, + "danger_map_cache_misses": 6252, + "danger_map_lookup_calls": 19857, + "danger_map_query_calls": 6252, + "danger_map_total_ns": 184537291, "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 471, - "dynamic_path_objects_removed": 423, + "dynamic_path_objects_added": 430, + "dynamic_path_objects_removed": 384, "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 11000.0, - "guidance_bonus_applied_bend90": 3500.0, - "guidance_bonus_applied_sbend": 625.0, - "guidance_bonus_applied_straight": 6875.0, - "guidance_match_moves": 176, - "guidance_match_moves_bend90": 56, - "guidance_match_moves_sbend": 10, - "guidance_match_moves_straight": 110, + "guidance_bonus_applied": 3275.0, + "guidance_bonus_applied_bend90": 1075.0, + "guidance_bonus_applied_sbend": 200.0, + "guidance_bonus_applied_straight": 2000.0, + "guidance_match_moves": 131, + "guidance_match_moves_bend90": 43, + "guidance_match_moves_sbend": 8, + "guidance_match_moves_straight": 80, "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 39, - "iteration_conflicting_nets": 36, + "iteration_conflict_edges": 40, + "iteration_conflicting_nets": 39, "iteration_reverified_nets": 60, "iteration_reverify_calls": 6, - "move_cache_abs_hits": 2559, - "move_cache_abs_misses": 6494, - "move_cache_rel_hits": 5872, - "move_cache_rel_misses": 622, - "moves_added": 8081, - "moves_generated": 9053, - "nets_carried_forward": 0, - "nets_reached_target": 60, - "nets_routed": 60, - "nodes_expanded": 1764, + "late_phase_capped_fallbacks": 2, + "late_phase_capped_nets": 2, + "move_cache_abs_hits": 1831, + "move_cache_abs_misses": 5516, + "move_cache_rel_hits": 4926, + "move_cache_rel_misses": 590, + "moves_added": 6594, + "moves_generated": 7347, + "nets_carried_forward": 6, + "nets_reached_target": 52, + "nets_routed": 54, + "nodes_expanded": 1408, "pair_local_search_accepts": 2, - "pair_local_search_attempts": 2, - "pair_local_search_nodes_expanded": 68, + "pair_local_search_attempts": 3, + "pair_local_search_nodes_expanded": 42, "pair_local_search_pairs_considered": 2, "path_cost_calls": 0, - "pruned_closed_set": 439, - "pruned_cost": 533, + "pruned_closed_set": 414, + "pruned_cost": 339, "pruned_hard_collision": 0, - "ray_cast_calls": 5477, - "ray_cast_calls_expand_forward": 1704, - "ray_cast_calls_expand_snap": 46, + "ray_cast_calls": 4577, + "ray_cast_calls_expand_forward": 1356, + "ray_cast_calls_expand_snap": 36, "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3721, + "ray_cast_calls_straight_static": 3179, "ray_cast_calls_visibility_build": 0, "ray_cast_calls_visibility_query": 0, "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 305, + "ray_cast_candidate_bounds": 162, "ray_cast_exact_geometry_checks": 0, "refine_path_calls": 10, "refinement_candidate_side_extents": 0, @@ -2395,17 +2516,17 @@ "refinement_static_bounds_checked": 0, "refinement_windows_considered": 0, "route_iterations": 6, - "score_component_calls": 8634, - "score_component_total_ns": 252458856, + "score_component_calls": 6958, + "score_component_total_ns": 208990676, "static_net_tree_rebuilds": 1, "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 2482, + "static_safe_cache_hits": 1778, "static_tree_rebuilds": 1, "timeout_events": 0, - "verify_dynamic_candidate_nets": 2106, - "verify_dynamic_exact_pair_checks": 558, - "verify_path_report_calls": 190, - "verify_static_buffer_ops": 895, + "verify_dynamic_candidate_nets": 1638, + "verify_dynamic_exact_pair_checks": 507, + "verify_path_report_calls": 152, + "verify_static_buffer_ops": 699, "visibility_builds": 0, "visibility_corner_hits_exact": 0, "visibility_corner_index_builds": 1, @@ -2416,7 +2537,7 @@ "visibility_point_queries": 0, "visibility_tangent_candidate_corner_checks": 6, "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1704, + "visibility_tangent_candidate_scans": 1356, "warm_start_paths_built": 0, "warm_start_paths_used": 0 }, @@ -2429,6 +2550,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1207.0796326794896 @@ -2439,6 +2561,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1128.0796326794896 @@ -2449,6 +2572,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1049.0796326794896 @@ -2459,6 +2583,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 970.0796326794897 @@ -2469,6 +2594,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 909.9977565924808 @@ -2479,6 +2605,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 914.6410526793834 @@ -2489,6 +2616,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 980.0796326794897 @@ -2499,6 +2627,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1059.0796326794896 @@ -2509,6 +2638,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1138.0796326794896 @@ -2519,6 +2649,7 @@ "reached_target": true, "report": { "dynamic_collision_count": 0, + "out_of_bounds": false, "self_collision_count": 0, "static_collision_count": 0, "total_length": 1217.0796326794896 diff --git a/archive/routing/conflict_trace.md b/archive/routing/conflict_trace.md index 75d3c8b..01d43db 100644 --- a/archive/routing/conflict_trace.md +++ b/archive/routing/conflict_trace.md @@ -1,6 +1,6 @@ # Conflict Trace -Generated at 2026-04-02T14:24:39-07:00 by `scripts/record_conflict_trace.py`. +Generated at 2026-11-26T21:47:32-08:00 by `scripts/record_conflict_trace.py`. ## example_07_large_scale_routing_no_warm_start @@ -10,8 +10,8 @@ Results: 10 valid / 10 reached / 10 total. | :-- | --: | --: | --: | --: | | iteration | 0 | 9 | 16 | 1 | | iteration | 1 | 8 | 12 | 2 | -| iteration | 2 | 6 | 5 | 4 | -| iteration | 3 | 4 | 2 | 6 | +| iteration | 2 | 5 | 4 | 5 | +| iteration | 3 | 8 | 4 | 2 | | iteration | 4 | 4 | 2 | 6 | | iteration | 5 | 4 | 2 | 6 | | restored_best | | 4 | 2 | 6 | @@ -21,37 +21,37 @@ Top nets by traced dynamic-collision stages: - `net_06`: 7 - `net_07`: 7 -- `net_01`: 6 -- `net_00`: 5 -- `net_02`: 5 -- `net_03`: 4 -- `net_08`: 2 -- `net_09`: 2 +- `net_02`: 7 +- `net_03`: 6 +- `net_00`: 4 +- `net_01`: 4 +- `net_08`: 3 +- `net_09`: 3 - `net_05`: 1 Top net pairs by frequency: - `net_06` <-> `net_07`: 7 -- `net_00` <-> `net_01`: 5 -- `net_01` <-> `net_02`: 4 +- `net_02` <-> `net_03`: 6 +- `net_00` <-> `net_01`: 4 - `net_00` <-> `net_02`: 3 -- `net_00` <-> `net_03`: 3 -- `net_02` <-> `net_03`: 3 +- `net_01` <-> `net_02`: 3 +- `net_08` <-> `net_09`: 3 +- `net_00` <-> `net_03`: 2 - `net_01` <-> `net_03`: 2 - `net_06` <-> `net_08`: 2 - `net_06` <-> `net_09`: 2 -- `net_07` <-> `net_08`: 2 Top component pairs by frequency: -- `net_06[2]` <-> `net_07[2]`: 6 - `net_06[3]` <-> `net_07[2]`: 6 +- `net_06[2]` <-> `net_07[2]`: 6 - `net_06[1]` <-> `net_07[1]`: 6 +- `net_02[2]` <-> `net_03[3]`: 5 +- `net_02[1]` <-> `net_03[1]`: 5 +- `net_02[2]` <-> `net_03[2]`: 5 - `net_06[2]` <-> `net_07[1]`: 5 -- `net_00[2]` <-> `net_01[3]`: 4 +- `net_02[1]` <-> `net_03[2]`: 4 - `net_01[2]` <-> `net_02[2]`: 3 - `net_01[2]` <-> `net_02[3]`: 3 -- `net_00[2]` <-> `net_01[2]`: 3 -- `net_07[3]` <-> `net_08[2]`: 2 -- `net_02[1]` <-> `net_03[1]`: 2 diff --git a/archive/routing/frontier_trace.json b/archive/routing/frontier_trace.json index 130350c..ae89d71 100644 --- a/archive/routing/frontier_trace.json +++ b/archive/routing/frontier_trace.json @@ -1,79 +1,81 @@ { - "generated_at": "2026-04-02T14:24:39-07:00", + "generated_at": "2026-11-26T21:47:35-08:00", "generator": "scripts/record_frontier_trace.py", "scenarios": [ { "frontier_trace": [], "metrics": { - "congestion_cache_hits": 31, - "congestion_cache_misses": 4625, - "congestion_candidate_ids": 9924, - "congestion_candidate_nets": 9979, - "congestion_candidate_precheck_hits": 2562, - "congestion_candidate_precheck_misses": 2165, - "congestion_candidate_precheck_skips": 71, - "congestion_check_calls": 4625, - "congestion_exact_pair_checks": 8122, - "congestion_grid_net_cache_hits": 2457, - "congestion_grid_net_cache_misses": 3942, - "congestion_grid_span_cache_hits": 2283, - "congestion_grid_span_cache_misses": 1948, + "congestion_cache_hits": 24, + "congestion_cache_misses": 3411, + "congestion_candidate_ids": 7213, + "congestion_candidate_nets": 7410, + "congestion_candidate_precheck_hits": 1677, + "congestion_candidate_precheck_misses": 1795, + "congestion_candidate_precheck_skips": 37, + "congestion_check_calls": 3411, + "congestion_exact_pair_checks": 5860, + "congestion_grid_net_cache_hits": 1676, + "congestion_grid_net_cache_misses": 3276, + "congestion_grid_span_cache_hits": 1517, + "congestion_grid_span_cache_misses": 1637, "congestion_lazy_requeues": 0, "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 2673, - "congestion_net_envelope_cache_misses": 4139, - "congestion_presence_cache_hits": 2858, - "congestion_presence_cache_misses": 2556, - "congestion_presence_skips": 687, - "danger_map_cache_hits": 16878, - "danger_map_cache_misses": 7425, - "danger_map_lookup_calls": 24303, - "danger_map_query_calls": 7425, - "danger_map_total_ns": 212814061, + "congestion_net_envelope_cache_hits": 1801, + "congestion_net_envelope_cache_misses": 3433, + "congestion_presence_cache_hits": 1857, + "congestion_presence_cache_misses": 2075, + "congestion_presence_skips": 460, + "danger_map_cache_hits": 13605, + "danger_map_cache_misses": 6252, + "danger_map_lookup_calls": 19857, + "danger_map_query_calls": 6252, + "danger_map_total_ns": 180793966, "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 471, - "dynamic_path_objects_removed": 423, + "dynamic_path_objects_added": 430, + "dynamic_path_objects_removed": 384, "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 11000.0, - "guidance_bonus_applied_bend90": 3500.0, - "guidance_bonus_applied_sbend": 625.0, - "guidance_bonus_applied_straight": 6875.0, - "guidance_match_moves": 176, - "guidance_match_moves_bend90": 56, - "guidance_match_moves_sbend": 10, - "guidance_match_moves_straight": 110, + "guidance_bonus_applied": 3275.0, + "guidance_bonus_applied_bend90": 1075.0, + "guidance_bonus_applied_sbend": 200.0, + "guidance_bonus_applied_straight": 2000.0, + "guidance_match_moves": 131, + "guidance_match_moves_bend90": 43, + "guidance_match_moves_sbend": 8, + "guidance_match_moves_straight": 80, "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 39, - "iteration_conflicting_nets": 36, + "iteration_conflict_edges": 40, + "iteration_conflicting_nets": 39, "iteration_reverified_nets": 60, "iteration_reverify_calls": 6, - "move_cache_abs_hits": 2559, - "move_cache_abs_misses": 6494, - "move_cache_rel_hits": 5872, - "move_cache_rel_misses": 622, - "moves_added": 8081, - "moves_generated": 9053, - "nets_carried_forward": 0, - "nets_reached_target": 60, - "nets_routed": 60, - "nodes_expanded": 1764, + "late_phase_capped_fallbacks": 2, + "late_phase_capped_nets": 2, + "move_cache_abs_hits": 1831, + "move_cache_abs_misses": 5516, + "move_cache_rel_hits": 4926, + "move_cache_rel_misses": 590, + "moves_added": 6594, + "moves_generated": 7347, + "nets_carried_forward": 6, + "nets_reached_target": 52, + "nets_routed": 54, + "nodes_expanded": 1408, "pair_local_search_accepts": 2, - "pair_local_search_attempts": 2, - "pair_local_search_nodes_expanded": 68, + "pair_local_search_attempts": 3, + "pair_local_search_nodes_expanded": 42, "pair_local_search_pairs_considered": 2, "path_cost_calls": 0, - "pruned_closed_set": 439, - "pruned_cost": 533, + "pruned_closed_set": 414, + "pruned_cost": 339, "pruned_hard_collision": 0, - "ray_cast_calls": 5477, - "ray_cast_calls_expand_forward": 1704, - "ray_cast_calls_expand_snap": 46, + "ray_cast_calls": 4577, + "ray_cast_calls_expand_forward": 1356, + "ray_cast_calls_expand_snap": 36, "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3721, + "ray_cast_calls_straight_static": 3179, "ray_cast_calls_visibility_build": 0, "ray_cast_calls_visibility_query": 0, "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 305, + "ray_cast_candidate_bounds": 162, "ray_cast_exact_geometry_checks": 0, "refine_path_calls": 10, "refinement_candidate_side_extents": 0, @@ -84,17 +86,17 @@ "refinement_static_bounds_checked": 0, "refinement_windows_considered": 0, "route_iterations": 6, - "score_component_calls": 8634, - "score_component_total_ns": 241025335, + "score_component_calls": 6958, + "score_component_total_ns": 205362623, "static_net_tree_rebuilds": 1, "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 2482, + "static_safe_cache_hits": 1778, "static_tree_rebuilds": 1, "timeout_events": 0, - "verify_dynamic_candidate_nets": 2106, - "verify_dynamic_exact_pair_checks": 558, - "verify_path_report_calls": 190, - "verify_static_buffer_ops": 895, + "verify_dynamic_candidate_nets": 1638, + "verify_dynamic_exact_pair_checks": 507, + "verify_path_report_calls": 152, + "verify_static_buffer_ops": 699, "visibility_builds": 0, "visibility_corner_hits_exact": 0, "visibility_corner_index_builds": 1, @@ -105,7 +107,7 @@ "visibility_point_queries": 0, "visibility_tangent_candidate_corner_checks": 6, "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1704, + "visibility_tangent_candidate_scans": 1356, "warm_start_paths_built": 0, "warm_start_paths_used": 0 }, diff --git a/archive/routing/frontier_trace.md b/archive/routing/frontier_trace.md index 4351f37..42c635b 100644 --- a/archive/routing/frontier_trace.md +++ b/archive/routing/frontier_trace.md @@ -1,6 +1,6 @@ # Frontier Trace -Generated at 2026-04-02T14:24:39-07:00 by `scripts/record_frontier_trace.py`. +Generated at 2026-11-26T21:47:35-08:00 by `scripts/record_frontier_trace.py`. ## example_07_large_scale_routing_no_warm_start diff --git a/archive/routing/iteration_trace.json b/archive/routing/iteration_trace.json index 2bebaa6..9954a8e 100644 --- a/archive/routing/iteration_trace.json +++ b/archive/routing/iteration_trace.json @@ -1,5 +1,5 @@ { - "generated_at": "2026-04-02T18:51:01-07:00", + "generated_at": "2026-11-26T21:47:40-08:00", "generator": "scripts/record_iteration_trace.py", "scenarios": [ { @@ -132,29 +132,29 @@ { "completed_nets": 2, "conflict_edges": 12, - "congestion_candidate_ids": 2378, - "congestion_check_calls": 974, - "congestion_exact_pair_checks": 1998, + "congestion_candidate_ids": 2581, + "congestion_check_calls": 1074, + "congestion_exact_pair_checks": 2150, "congestion_penalty": 140.0, "iteration": 1, "net_attempts": [ { - "congestion_check_calls": 20, + "congestion_check_calls": 27, "guidance_seed_present": true, "net_id": "net_04", - "nodes_expanded": 3, + "nodes_expanded": 4, "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 317, + "congestion_check_calls": 283, "guidance_seed_present": true, "net_id": "net_06", - "nodes_expanded": 81, - "pruned_closed_set": 14, - "pruned_cost": 22, + "nodes_expanded": 72, + "pruned_closed_set": 13, + "pruned_cost": 18, "pruned_hard_collision": 0, "reached_target": true }, @@ -179,11 +179,11 @@ "reached_target": true }, { - "congestion_check_calls": 20, + "congestion_check_calls": 26, "guidance_seed_present": true, "net_id": "net_05", - "nodes_expanded": 3, - "pruned_closed_set": 0, + "nodes_expanded": 4, + "pruned_closed_set": 1, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true @@ -209,22 +209,22 @@ "reached_target": true }, { - "congestion_check_calls": 372, + "congestion_check_calls": 363, "guidance_seed_present": true, "net_id": "net_03", - "nodes_expanded": 117, + "nodes_expanded": 110, "pruned_closed_set": 19, - "pruned_cost": 47, + "pruned_cost": 42, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 54, + "congestion_check_calls": 184, "guidance_seed_present": true, "net_id": "net_07", - "nodes_expanded": 11, - "pruned_closed_set": 1, - "pruned_cost": 0, + "nodes_expanded": 41, + "pruned_closed_set": 7, + "pruned_cost": 8, "pruned_hard_collision": 0, "reached_target": true }, @@ -239,7 +239,7 @@ "reached_target": true } ], - "nodes_expanded": 253, + "nodes_expanded": 269, "routed_net_ids": [ "net_04", "net_06", @@ -255,56 +255,56 @@ "total_dynamic_collisions": 54 }, { - "completed_nets": 4, - "conflict_edges": 5, - "congestion_candidate_ids": 1928, - "congestion_check_calls": 993, - "congestion_exact_pair_checks": 1571, + "completed_nets": 5, + "conflict_edges": 4, + "congestion_candidate_ids": 1868, + "congestion_check_calls": 980, + "congestion_exact_pair_checks": 1539, "congestion_penalty": 196.0, "iteration": 2, "net_attempts": [ { - "congestion_check_calls": 20, + "congestion_check_calls": 26, "guidance_seed_present": true, "net_id": "net_05", - "nodes_expanded": 3, - "pruned_closed_set": 0, + "nodes_expanded": 4, + "pruned_closed_set": 1, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 399, + "congestion_check_calls": 356, "guidance_seed_present": true, "net_id": "net_02", - "nodes_expanded": 120, - "pruned_closed_set": 31, - "pruned_cost": 47, + "nodes_expanded": 104, + "pruned_closed_set": 32, + "pruned_cost": 36, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 20, + "congestion_check_calls": 27, "guidance_seed_present": true, "net_id": "net_04", - "nodes_expanded": 3, + "nodes_expanded": 4, "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 275, + "congestion_check_calls": 236, "guidance_seed_present": true, "net_id": "net_01", - "nodes_expanded": 63, + "nodes_expanded": 54, "pruned_closed_set": 15, - "pruned_cost": 3, + "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 68, + "congestion_check_calls": 69, "guidance_seed_present": true, "net_id": "net_08", "nodes_expanded": 16, @@ -317,7 +317,7 @@ "congestion_check_calls": 59, "guidance_seed_present": true, "net_id": "net_09", - "nodes_expanded": 16, + "nodes_expanded": 14, "pruned_closed_set": 4, "pruned_cost": 0, "pruned_hard_collision": 0, @@ -354,17 +354,17 @@ "reached_target": true }, { - "congestion_check_calls": 54, + "congestion_check_calls": 109, "guidance_seed_present": true, "net_id": "net_00", - "nodes_expanded": 12, - "pruned_closed_set": 2, + "nodes_expanded": 28, + "pruned_closed_set": 6, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true } ], - "nodes_expanded": 253, + "nodes_expanded": 244, "routed_net_ids": [ "net_05", "net_02", @@ -377,39 +377,39 @@ "net_07", "net_00" ], - "total_dynamic_collisions": 22 + "total_dynamic_collisions": 18 }, { - "completed_nets": 6, - "conflict_edges": 2, - "congestion_candidate_ids": 852, - "congestion_check_calls": 437, - "congestion_exact_pair_checks": 698, + "completed_nets": 2, + "conflict_edges": 4, + "congestion_candidate_ids": 977, + "congestion_check_calls": 483, + "congestion_exact_pair_checks": 749, "congestion_penalty": 274.4, "iteration": 3, "net_attempts": [ { - "congestion_check_calls": 79, + "congestion_check_calls": 28, "guidance_seed_present": true, "net_id": "net_02", - "nodes_expanded": 15, - "pruned_closed_set": 4, + "nodes_expanded": 7, + "pruned_closed_set": 1, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 68, + "congestion_check_calls": 104, "guidance_seed_present": true, "net_id": "net_01", - "nodes_expanded": 20, - "pruned_closed_set": 3, + "nodes_expanded": 17, + "pruned_closed_set": 6, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 34, + "congestion_check_calls": 49, "guidance_seed_present": true, "net_id": "net_09", "nodes_expanded": 11, @@ -419,10 +419,10 @@ "reached_target": true }, { - "congestion_check_calls": 73, + "congestion_check_calls": 51, "guidance_seed_present": true, "net_id": "net_00", - "nodes_expanded": 14, + "nodes_expanded": 11, "pruned_closed_set": 1, "pruned_cost": 0, "pruned_hard_collision": 0, @@ -439,57 +439,57 @@ "reached_target": true }, { - "congestion_check_calls": 20, + "congestion_check_calls": 26, "guidance_seed_present": true, "net_id": "net_05", - "nodes_expanded": 3, - "pruned_closed_set": 0, + "nodes_expanded": 4, + "pruned_closed_set": 1, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 20, + "congestion_check_calls": 27, "guidance_seed_present": true, "net_id": "net_04", - "nodes_expanded": 3, + "nodes_expanded": 4, "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 35, + "congestion_check_calls": 37, "guidance_seed_present": true, "net_id": "net_06", - "nodes_expanded": 8, + "nodes_expanded": 9, "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 22, + "congestion_check_calls": 38, "guidance_seed_present": true, "net_id": "net_03", - "nodes_expanded": 6, + "nodes_expanded": 9, "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 56, + "congestion_check_calls": 93, "guidance_seed_present": true, "net_id": "net_08", - "nodes_expanded": 13, - "pruned_closed_set": 4, + "nodes_expanded": 16, + "pruned_closed_set": 5, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true } ], - "nodes_expanded": 100, + "nodes_expanded": 95, "routed_net_ids": [ "net_02", "net_01", @@ -502,17 +502,77 @@ "net_03", "net_08" ], - "total_dynamic_collisions": 10 + "total_dynamic_collisions": 20 }, { "completed_nets": 6, "conflict_edges": 2, - "congestion_candidate_ids": 627, - "congestion_check_calls": 332, - "congestion_exact_pair_checks": 513, + "congestion_candidate_ids": 1370, + "congestion_check_calls": 703, + "congestion_exact_pair_checks": 1137, "congestion_penalty": 384.15999999999997, "iteration": 4, "net_attempts": [ + { + "congestion_check_calls": 26, + "guidance_seed_present": true, + "net_id": "net_00", + "nodes_expanded": 9, + "pruned_closed_set": 1, + "pruned_cost": 0, + "pruned_hard_collision": 0, + "reached_target": true + }, + { + "congestion_check_calls": 187, + "guidance_seed_present": true, + "net_id": "net_06", + "nodes_expanded": 50, + "pruned_closed_set": 8, + "pruned_cost": 18, + "pruned_hard_collision": 0, + "reached_target": true + }, + { + "congestion_check_calls": 26, + "guidance_seed_present": true, + "net_id": "net_09", + "nodes_expanded": 9, + "pruned_closed_set": 1, + "pruned_cost": 0, + "pruned_hard_collision": 0, + "reached_target": true + }, + { + "congestion_check_calls": 26, + "guidance_seed_present": true, + "net_id": "net_05", + "nodes_expanded": 4, + "pruned_closed_set": 1, + "pruned_cost": 0, + "pruned_hard_collision": 0, + "reached_target": true + }, + { + "congestion_check_calls": 46, + "guidance_seed_present": true, + "net_id": "net_08", + "nodes_expanded": 12, + "pruned_closed_set": 4, + "pruned_cost": 0, + "pruned_hard_collision": 0, + "reached_target": true + }, + { + "congestion_check_calls": 255, + "guidance_seed_present": true, + "net_id": "net_03", + "nodes_expanded": 80, + "pruned_closed_set": 10, + "pruned_cost": 40, + "pruned_hard_collision": 0, + "reached_target": true + }, { "congestion_check_calls": 30, "guidance_seed_present": true, @@ -524,118 +584,183 @@ "reached_target": true }, { - "congestion_check_calls": 179, + "congestion_check_calls": 32, "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 46, - "pruned_closed_set": 7, - "pruned_cost": 15, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 43, - "guidance_seed_present": true, - "net_id": "net_00", - "nodes_expanded": 10, + "net_id": "net_02", + "nodes_expanded": 8, "pruned_closed_set": 1, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 80, + "congestion_check_calls": 27, + "guidance_seed_present": true, + "net_id": "net_04", + "nodes_expanded": 5, + "pruned_closed_set": 0, + "pruned_cost": 0, + "pruned_hard_collision": 0, + "reached_target": true + }, + { + "congestion_check_calls": 48, "guidance_seed_present": true, "net_id": "net_01", - "nodes_expanded": 18, - "pruned_closed_set": 3, + "nodes_expanded": 12, + "pruned_closed_set": 4, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true } ], - "nodes_expanded": 81, + "nodes_expanded": 196, + "routed_net_ids": [ + "net_00", + "net_06", + "net_09", + "net_05", + "net_08", + "net_03", + "net_07", + "net_02", + "net_04", + "net_01" + ], + "total_dynamic_collisions": 10 + }, + { + "completed_nets": 6, + "conflict_edges": 2, + "congestion_candidate_ids": 417, + "congestion_check_calls": 171, + "congestion_exact_pair_checks": 285, + "congestion_penalty": 537.824, + "iteration": 5, + "net_attempts": [ + { + "congestion_check_calls": 85, + "guidance_seed_present": true, + "net_id": "net_07", + "nodes_expanded": 16, + "pruned_closed_set": 3, + "pruned_cost": 0, + "pruned_hard_collision": 0, + "reached_target": true + }, + { + "congestion_check_calls": 86, + "guidance_seed_present": true, + "net_id": "net_02", + "nodes_expanded": 17, + "pruned_closed_set": 4, + "pruned_cost": 0, + "pruned_hard_collision": 0, + "reached_target": true + }, + { + "congestion_check_calls": 0, + "guidance_seed_present": true, + "net_id": "net_06", + "nodes_expanded": 0, + "pruned_closed_set": 0, + "pruned_cost": 0, + "pruned_hard_collision": 0, + "reached_target": true + }, + { + "congestion_check_calls": 0, + "guidance_seed_present": true, + "net_id": "net_03", + "nodes_expanded": 0, + "pruned_closed_set": 0, + "pruned_cost": 0, + "pruned_hard_collision": 0, + "reached_target": true + } + ], + "nodes_expanded": 33, "routed_net_ids": [ "net_07", + "net_02", "net_06", - "net_00", - "net_01" + "net_03" ], "total_dynamic_collisions": 10 } ], "metrics": { - "congestion_cache_hits": 31, - "congestion_cache_misses": 2736, - "congestion_candidate_ids": 5785, - "congestion_candidate_nets": 6163, - "congestion_candidate_precheck_hits": 1383, - "congestion_candidate_precheck_misses": 1418, - "congestion_candidate_precheck_skips": 34, - "congestion_check_calls": 2736, - "congestion_exact_pair_checks": 4780, - "congestion_grid_net_cache_hits": 1356, - "congestion_grid_net_cache_misses": 2608, - "congestion_grid_span_cache_hits": 1247, - "congestion_grid_span_cache_misses": 1308, + "congestion_cache_hits": 24, + "congestion_cache_misses": 3411, + "congestion_candidate_ids": 7213, + "congestion_candidate_nets": 7410, + "congestion_candidate_precheck_hits": 1677, + "congestion_candidate_precheck_misses": 1795, + "congestion_candidate_precheck_skips": 37, + "congestion_check_calls": 3411, + "congestion_exact_pair_checks": 5860, + "congestion_grid_net_cache_hits": 1676, + "congestion_grid_net_cache_misses": 3276, + "congestion_grid_span_cache_hits": 1517, + "congestion_grid_span_cache_misses": 1637, "congestion_lazy_requeues": 0, "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1452, - "congestion_net_envelope_cache_misses": 2720, - "congestion_presence_cache_hits": 1541, - "congestion_presence_cache_misses": 1642, - "congestion_presence_skips": 382, - "danger_map_cache_hits": 11547, - "danger_map_cache_misses": 6063, - "danger_map_lookup_calls": 17610, - "danger_map_query_calls": 6063, - "danger_map_total_ns": 171226180, + "congestion_net_envelope_cache_hits": 1801, + "congestion_net_envelope_cache_misses": 3433, + "congestion_presence_cache_hits": 1857, + "congestion_presence_cache_misses": 2075, + "congestion_presence_skips": 460, + "danger_map_cache_hits": 13605, + "danger_map_cache_misses": 6252, + "danger_map_lookup_calls": 19857, + "danger_map_query_calls": 6252, + "danger_map_total_ns": 182546071, "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 399, - "dynamic_path_objects_removed": 351, + "dynamic_path_objects_added": 430, + "dynamic_path_objects_removed": 384, "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 6750.0, - "guidance_bonus_applied_bend90": 2250.0, - "guidance_bonus_applied_sbend": 375.0, - "guidance_bonus_applied_straight": 4125.0, - "guidance_match_moves": 108, - "guidance_match_moves_bend90": 36, - "guidance_match_moves_sbend": 6, - "guidance_match_moves_straight": 66, + "guidance_bonus_applied": 3275.0, + "guidance_bonus_applied_bend90": 1075.0, + "guidance_bonus_applied_sbend": 200.0, + "guidance_bonus_applied_straight": 2000.0, + "guidance_match_moves": 131, + "guidance_match_moves_bend90": 43, + "guidance_match_moves_sbend": 8, + "guidance_match_moves_straight": 80, "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 37, - "iteration_conflicting_nets": 32, - "iteration_reverified_nets": 50, - "iteration_reverify_calls": 5, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 1200, - "move_cache_abs_misses": 5338, - "move_cache_rel_hits": 4768, - "move_cache_rel_misses": 570, - "moves_added": 5853, - "moves_generated": 6538, + "iteration_conflict_edges": 40, + "iteration_conflicting_nets": 39, + "iteration_reverified_nets": 60, + "iteration_reverify_calls": 6, + "late_phase_capped_fallbacks": 2, + "late_phase_capped_nets": 2, + "move_cache_abs_hits": 1831, + "move_cache_abs_misses": 5516, + "move_cache_rel_hits": 4926, + "move_cache_rel_misses": 590, + "moves_added": 6594, + "moves_generated": 7347, "nets_carried_forward": 6, - "nets_reached_target": 44, - "nets_routed": 44, - "nodes_expanded": 1258, + "nets_reached_target": 52, + "nets_routed": 54, + "nodes_expanded": 1408, "pair_local_search_accepts": 2, - "pair_local_search_attempts": 2, - "pair_local_search_nodes_expanded": 68, + "pair_local_search_attempts": 3, + "pair_local_search_nodes_expanded": 42, "pair_local_search_pairs_considered": 2, "path_cost_calls": 0, - "pruned_closed_set": 374, - "pruned_cost": 311, + "pruned_closed_set": 414, + "pruned_cost": 339, "pruned_hard_collision": 0, - "ray_cast_calls": 4310, - "ray_cast_calls_expand_forward": 1214, - "ray_cast_calls_expand_snap": 39, + "ray_cast_calls": 4577, + "ray_cast_calls_expand_forward": 1356, + "ray_cast_calls_expand_snap": 36, "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3051, + "ray_cast_calls_straight_static": 3179, "ray_cast_calls_visibility_build": 0, "ray_cast_calls_visibility_query": 0, "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 159, + "ray_cast_candidate_bounds": 162, "ray_cast_exact_geometry_checks": 0, "refine_path_calls": 10, "refinement_candidate_side_extents": 0, @@ -645,18 +770,18 @@ "refinement_dynamic_bounds_checked": 0, "refinement_static_bounds_checked": 0, "refinement_windows_considered": 0, - "route_iterations": 5, - "score_component_calls": 6181, - "score_component_total_ns": 191650546, + "route_iterations": 6, + "score_component_calls": 6958, + "score_component_total_ns": 206527340, "static_net_tree_rebuilds": 1, "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1170, + "static_safe_cache_hits": 1778, "static_tree_rebuilds": 1, "timeout_events": 0, - "verify_dynamic_candidate_nets": 1822, - "verify_dynamic_exact_pair_checks": 504, - "verify_path_report_calls": 164, - "verify_static_buffer_ops": 779, + "verify_dynamic_candidate_nets": 1638, + "verify_dynamic_exact_pair_checks": 507, + "verify_path_report_calls": 152, + "verify_static_buffer_ops": 699, "visibility_builds": 0, "visibility_corner_hits_exact": 0, "visibility_corner_index_builds": 1, @@ -667,7 +792,7 @@ "visibility_point_queries": 0, "visibility_tangent_candidate_corner_checks": 6, "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1214, + "visibility_tangent_candidate_scans": 1356, "warm_start_paths_built": 0, "warm_start_paths_used": 0 }, @@ -808,9 +933,9 @@ { "completed_nets": 1, "conflict_edges": 13, - "congestion_candidate_ids": 2562, - "congestion_check_calls": 961, - "congestion_exact_pair_checks": 2032, + "congestion_candidate_ids": 2807, + "congestion_check_calls": 1037, + "congestion_exact_pair_checks": 2205, "congestion_penalty": 140.0, "iteration": 1, "net_attempts": [ @@ -855,10 +980,10 @@ "reached_target": true }, { - "congestion_check_calls": 20, + "congestion_check_calls": 27, "guidance_seed_present": true, "net_id": "net_04", - "nodes_expanded": 3, + "nodes_expanded": 4, "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0, @@ -875,32 +1000,32 @@ "reached_target": true }, { - "congestion_check_calls": 372, + "congestion_check_calls": 363, "guidance_seed_present": true, "net_id": "net_03", - "nodes_expanded": 117, + "nodes_expanded": 110, "pruned_closed_set": 19, - "pruned_cost": 47, + "pruned_cost": 42, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 27, + "congestion_check_calls": 29, "guidance_seed_present": true, "net_id": "net_05", "nodes_expanded": 5, - "pruned_closed_set": 0, + "pruned_closed_set": 1, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 84, + "congestion_check_calls": 160, "guidance_seed_present": true, "net_id": "net_02", - "nodes_expanded": 20, - "pruned_closed_set": 2, - "pruned_cost": 0, + "nodes_expanded": 38, + "pruned_closed_set": 5, + "pruned_cost": 8, "pruned_hard_collision": 0, "reached_target": true }, @@ -915,7 +1040,7 @@ "reached_target": true } ], - "nodes_expanded": 269, + "nodes_expanded": 281, "routed_net_ids": [ "net_09", "net_08", @@ -933,18 +1058,18 @@ { "completed_nets": 4, "conflict_edges": 3, - "congestion_candidate_ids": 1610, - "congestion_check_calls": 643, - "congestion_exact_pair_checks": 1224, + "congestion_candidate_ids": 1678, + "congestion_check_calls": 697, + "congestion_exact_pair_checks": 1289, "congestion_penalty": 196.0, "iteration": 2, "net_attempts": [ { - "congestion_check_calls": 121, + "congestion_check_calls": 117, "guidance_seed_present": true, "net_id": "net_08", - "nodes_expanded": 26, - "pruned_closed_set": 9, + "nodes_expanded": 25, + "pruned_closed_set": 8, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true @@ -960,7 +1085,7 @@ "reached_target": true }, { - "congestion_check_calls": 92, + "congestion_check_calls": 93, "guidance_seed_present": true, "net_id": "net_01", "nodes_expanded": 20, @@ -970,21 +1095,21 @@ "reached_target": true }, { - "congestion_check_calls": 121, + "congestion_check_calls": 170, "guidance_seed_present": true, "net_id": "net_06", - "nodes_expanded": 29, - "pruned_closed_set": 0, - "pruned_cost": 5, + "nodes_expanded": 48, + "pruned_closed_set": 2, + "pruned_cost": 17, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 58, + "congestion_check_calls": 60, "guidance_seed_present": true, "net_id": "net_02", "nodes_expanded": 13, - "pruned_closed_set": 1, + "pruned_closed_set": 2, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true @@ -993,28 +1118,28 @@ "congestion_check_calls": 72, "guidance_seed_present": true, "net_id": "net_09", - "nodes_expanded": 15, + "nodes_expanded": 13, "pruned_closed_set": 4, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 50, + "congestion_check_calls": 43, "guidance_seed_present": true, "net_id": "net_00", - "nodes_expanded": 13, + "nodes_expanded": 12, "pruned_closed_set": 3, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 20, + "congestion_check_calls": 26, "guidance_seed_present": true, "net_id": "net_05", - "nodes_expanded": 3, - "pruned_closed_set": 0, + "nodes_expanded": 4, + "pruned_closed_set": 1, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true @@ -1030,17 +1155,17 @@ "reached_target": true }, { - "congestion_check_calls": 20, + "congestion_check_calls": 27, "guidance_seed_present": true, "net_id": "net_04", - "nodes_expanded": 3, + "nodes_expanded": 4, "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true } ], - "nodes_expanded": 140, + "nodes_expanded": 157, "routed_net_ids": [ "net_08", "net_07", @@ -1058,17 +1183,17 @@ { "completed_nets": 4, "conflict_edges": 3, - "congestion_candidate_ids": 557, - "congestion_check_calls": 250, - "congestion_exact_pair_checks": 428, + "congestion_candidate_ids": 610, + "congestion_check_calls": 277, + "congestion_exact_pair_checks": 455, "congestion_penalty": 274.4, "iteration": 3, "net_attempts": [ { - "congestion_check_calls": 36, + "congestion_check_calls": 38, "guidance_seed_present": true, "net_id": "net_03", - "nodes_expanded": 8, + "nodes_expanded": 9, "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0, @@ -1105,27 +1230,27 @@ "reached_target": true }, { - "congestion_check_calls": 70, + "congestion_check_calls": 93, "guidance_seed_present": true, "net_id": "net_08", - "nodes_expanded": 13, - "pruned_closed_set": 4, + "nodes_expanded": 16, + "pruned_closed_set": 5, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 35, + "congestion_check_calls": 37, "guidance_seed_present": true, "net_id": "net_06", - "nodes_expanded": 8, + "nodes_expanded": 9, "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0, "reached_target": true } ], - "nodes_expanded": 54, + "nodes_expanded": 59, "routed_net_ids": [ "net_03", "net_07", @@ -1139,9 +1264,9 @@ { "completed_nets": 6, "conflict_edges": 2, - "congestion_candidate_ids": 1025, - "congestion_check_calls": 505, - "congestion_exact_pair_checks": 829, + "congestion_candidate_ids": 1201, + "congestion_check_calls": 584, + "congestion_exact_pair_checks": 958, "congestion_penalty": 384.15999999999997, "iteration": 4, "net_attempts": [ @@ -1166,22 +1291,22 @@ "reached_target": true }, { - "congestion_check_calls": 179, + "congestion_check_calls": 195, "guidance_seed_present": true, "net_id": "net_06", - "nodes_expanded": 46, - "pruned_closed_set": 7, - "pruned_cost": 15, + "nodes_expanded": 51, + "pruned_closed_set": 8, + "pruned_cost": 18, "pruned_hard_collision": 0, "reached_target": true }, { - "congestion_check_calls": 192, + "congestion_check_calls": 255, "guidance_seed_present": true, "net_id": "net_03", - "nodes_expanded": 54, - "pruned_closed_set": 7, - "pruned_cost": 21, + "nodes_expanded": 80, + "pruned_closed_set": 10, + "pruned_cost": 40, "pruned_hard_collision": 0, "reached_target": true }, @@ -1206,7 +1331,7 @@ "reached_target": true } ], - "nodes_expanded": 136, + "nodes_expanded": 167, "routed_net_ids": [ "net_07", "net_02", @@ -1279,40 +1404,40 @@ ], "metrics": { "congestion_cache_hits": 8, - "congestion_cache_misses": 2530, - "congestion_candidate_ids": 6173, - "congestion_candidate_nets": 5869, - "congestion_candidate_precheck_hits": 1152, - "congestion_candidate_precheck_misses": 1460, - "congestion_candidate_precheck_skips": 74, - "congestion_check_calls": 2530, - "congestion_exact_pair_checks": 4800, - "congestion_grid_net_cache_hits": 1192, - "congestion_grid_net_cache_misses": 2676, - "congestion_grid_span_cache_hits": 1065, - "congestion_grid_span_cache_misses": 1366, + "congestion_cache_misses": 2766, + "congestion_candidate_ids": 6715, + "congestion_candidate_nets": 6315, + "congestion_candidate_precheck_hits": 1342, + "congestion_candidate_precheck_misses": 1509, + "congestion_candidate_precheck_skips": 77, + "congestion_check_calls": 2766, + "congestion_exact_pair_checks": 5194, + "congestion_grid_net_cache_hits": 1366, + "congestion_grid_net_cache_misses": 2753, + "congestion_grid_span_cache_hits": 1230, + "congestion_grid_span_cache_misses": 1404, "congestion_lazy_requeues": 0, "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1234, - "congestion_net_envelope_cache_misses": 2769, - "congestion_presence_cache_hits": 1302, - "congestion_presence_cache_misses": 1664, - "congestion_presence_skips": 354, - "danger_map_cache_hits": 11485, - "danger_map_cache_misses": 5474, - "danger_map_lookup_calls": 16959, - "danger_map_query_calls": 5474, - "danger_map_total_ns": 145721703, + "congestion_net_envelope_cache_hits": 1435, + "congestion_net_envelope_cache_misses": 2856, + "congestion_presence_cache_hits": 1498, + "congestion_presence_cache_misses": 1717, + "congestion_presence_skips": 364, + "danger_map_cache_hits": 12083, + "danger_map_cache_misses": 5623, + "danger_map_lookup_calls": 17706, + "danger_map_query_calls": 5623, + "danger_map_total_ns": 154640823, "dynamic_grid_rebuilds": 0, "dynamic_path_objects_added": 397, "dynamic_path_objects_removed": 350, "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 7562.5, - "guidance_bonus_applied_bend90": 2937.5, - "guidance_bonus_applied_sbend": 250.0, - "guidance_bonus_applied_straight": 4375.0, - "guidance_match_moves": 121, - "guidance_match_moves_bend90": 47, + "guidance_bonus_applied": 3000.0, + "guidance_bonus_applied_bend90": 1150.0, + "guidance_bonus_applied_sbend": 100.0, + "guidance_bonus_applied_straight": 1750.0, + "guidance_match_moves": 120, + "guidance_match_moves_bend90": 46, "guidance_match_moves_sbend": 4, "guidance_match_moves_straight": 70, "hard_collision_cache_hits": 0, @@ -1322,33 +1447,33 @@ "iteration_reverify_calls": 6, "late_phase_capped_fallbacks": 2, "late_phase_capped_nets": 2, - "move_cache_abs_hits": 1304, - "move_cache_abs_misses": 4997, - "move_cache_rel_hits": 4419, - "move_cache_rel_misses": 578, - "moves_added": 5638, - "moves_generated": 6301, + "move_cache_abs_hits": 1479, + "move_cache_abs_misses": 5117, + "move_cache_rel_hits": 4529, + "move_cache_rel_misses": 588, + "moves_added": 5884, + "moves_generated": 6596, "nets_carried_forward": 14, "nets_reached_target": 44, "nets_routed": 46, - "nodes_expanded": 1203, + "nodes_expanded": 1268, "pair_local_search_accepts": 2, "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 39, + "pair_local_search_nodes_expanded": 42, "pair_local_search_pairs_considered": 2, "path_cost_calls": 0, - "pruned_closed_set": 354, - "pruned_cost": 309, + "pruned_closed_set": 366, + "pruned_cost": 346, "pruned_hard_collision": 0, - "ray_cast_calls": 4059, - "ray_cast_calls_expand_forward": 1159, + "ray_cast_calls": 4200, + "ray_cast_calls_expand_forward": 1224, "ray_cast_calls_expand_snap": 13, "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 2881, + "ray_cast_calls_straight_static": 2957, "ray_cast_calls_visibility_build": 0, "ray_cast_calls_visibility_query": 0, "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 170, + "ray_cast_candidate_bounds": 167, "ray_cast_exact_geometry_checks": 0, "refine_path_calls": 10, "refinement_candidate_side_extents": 0, @@ -1359,17 +1484,17 @@ "refinement_static_bounds_checked": 0, "refinement_windows_considered": 0, "route_iterations": 6, - "score_component_calls": 5962, - "score_component_total_ns": 164785883, + "score_component_calls": 6248, + "score_component_total_ns": 176194432, "static_net_tree_rebuilds": 1, "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1276, + "static_safe_cache_hits": 1444, "static_tree_rebuilds": 1, "timeout_events": 0, - "verify_dynamic_candidate_nets": 1884, - "verify_dynamic_exact_pair_checks": 557, - "verify_path_report_calls": 174, - "verify_static_buffer_ops": 805, + "verify_dynamic_candidate_nets": 1543, + "verify_dynamic_exact_pair_checks": 511, + "verify_path_report_calls": 144, + "verify_static_buffer_ops": 666, "visibility_builds": 0, "visibility_corner_hits_exact": 0, "visibility_corner_index_builds": 1, @@ -1380,7 +1505,7 @@ "visibility_point_queries": 0, "visibility_tangent_candidate_corner_checks": 6, "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1159, + "visibility_tangent_candidate_scans": 1224, "warm_start_paths_built": 0, "warm_start_paths_used": 0 }, diff --git a/archive/routing/iteration_trace.md b/archive/routing/iteration_trace.md index 54e4967..a546383 100644 --- a/archive/routing/iteration_trace.md +++ b/archive/routing/iteration_trace.md @@ -1,6 +1,6 @@ # Iteration Trace -Generated at 2026-04-02T18:51:01-07:00 by `scripts/record_iteration_trace.py`. +Generated at 2026-11-26T21:47:40-08:00 by `scripts/record_iteration_trace.py`. ## example_07_large_scale_routing_no_warm_start @@ -9,36 +9,37 @@ Results: 10 valid / 10 reached / 10 total. | Iteration | Penalty | Routed Nets | Completed | Conflict Edges | Dynamic Collisions | Nodes | Congestion Checks | Candidate Ids | Exact Pairs | | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | | 0 | 100.0 | 10 | 1 | 16 | 50 | 571 | 0 | 0 | 0 | -| 1 | 140.0 | 10 | 2 | 12 | 54 | 253 | 974 | 2378 | 1998 | -| 2 | 196.0 | 10 | 4 | 5 | 22 | 253 | 993 | 1928 | 1571 | -| 3 | 274.4 | 10 | 6 | 2 | 10 | 100 | 437 | 852 | 698 | -| 4 | 384.2 | 4 | 6 | 2 | 10 | 81 | 332 | 627 | 513 | +| 1 | 140.0 | 10 | 2 | 12 | 54 | 269 | 1074 | 2581 | 2150 | +| 2 | 196.0 | 10 | 5 | 4 | 18 | 244 | 980 | 1868 | 1539 | +| 3 | 274.4 | 10 | 2 | 4 | 20 | 95 | 483 | 977 | 749 | +| 4 | 384.2 | 10 | 6 | 2 | 10 | 196 | 703 | 1370 | 1137 | +| 5 | 537.8 | 4 | 6 | 2 | 10 | 33 | 171 | 417 | 285 | Top nets by iteration-attributed nodes expanded: -- `net_09`: 242 -- `net_00`: 201 -- `net_02`: 157 -- `net_06`: 155 -- `net_01`: 147 -- `net_08`: 144 -- `net_03`: 141 -- `net_07`: 45 -- `net_04`: 13 -- `net_05`: 13 +- `net_09`: 249 +- `net_03`: 217 +- `net_00`: 213 +- `net_08`: 159 +- `net_02`: 158 +- `net_06`: 151 +- `net_01`: 129 +- `net_07`: 91 +- `net_04`: 21 +- `net_05`: 20 Top nets by iteration-attributed congestion checks: -- `net_06`: 569 -- `net_02`: 514 -- `net_01`: 468 -- `net_03`: 425 -- `net_00`: 203 -- `net_08`: 170 -- `net_07`: 143 -- `net_09`: 124 -- `net_04`: 60 -- `net_05`: 60 +- `net_03`: 687 +- `net_06`: 545 +- `net_02`: 538 +- `net_01`: 433 +- `net_07`: 358 +- `net_08`: 254 +- `net_00`: 219 +- `net_09`: 165 +- `net_04`: 108 +- `net_05`: 104 ## example_07_large_scale_routing_no_warm_start_seed43 @@ -47,35 +48,35 @@ Results: 10 valid / 10 reached / 10 total. | Iteration | Penalty | Routed Nets | Completed | Conflict Edges | Dynamic Collisions | Nodes | Congestion Checks | Candidate Ids | Exact Pairs | | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | | 0 | 100.0 | 10 | 1 | 16 | 50 | 571 | 0 | 0 | 0 | -| 1 | 140.0 | 10 | 1 | 13 | 53 | 269 | 961 | 2562 | 2032 | -| 2 | 196.0 | 10 | 4 | 3 | 15 | 140 | 643 | 1610 | 1224 | -| 3 | 274.4 | 6 | 4 | 3 | 15 | 54 | 250 | 557 | 428 | -| 4 | 384.2 | 6 | 6 | 2 | 10 | 136 | 505 | 1025 | 829 | +| 1 | 140.0 | 10 | 1 | 13 | 53 | 281 | 1037 | 2807 | 2205 | +| 2 | 196.0 | 10 | 4 | 3 | 15 | 157 | 697 | 1678 | 1289 | +| 3 | 274.4 | 6 | 4 | 3 | 15 | 59 | 277 | 610 | 455 | +| 4 | 384.2 | 6 | 6 | 2 | 10 | 167 | 584 | 1201 | 958 | | 5 | 537.8 | 4 | 6 | 2 | 10 | 33 | 171 | 419 | 287 | Top nets by iteration-attributed nodes expanded: -- `net_09`: 250 -- `net_03`: 199 -- `net_00`: 177 -- `net_08`: 166 +- `net_09`: 248 +- `net_03`: 219 +- `net_00`: 176 +- `net_08`: 168 - `net_07`: 140 -- `net_06`: 105 -- `net_02`: 79 +- `net_06`: 130 +- `net_02`: 97 - `net_01`: 65 -- `net_05`: 12 -- `net_04`: 10 +- `net_05`: 13 +- `net_04`: 12 Top nets by iteration-attributed congestion checks: -- `net_03`: 639 +- `net_03`: 695 - `net_07`: 454 -- `net_06`: 382 -- `net_02`: 290 -- `net_08`: 283 +- `net_06`: 449 +- `net_02`: 368 +- `net_08`: 302 - `net_09`: 178 -- `net_01`: 135 -- `net_00`: 82 -- `net_05`: 47 -- `net_04`: 40 +- `net_01`: 136 +- `net_00`: 75 +- `net_05`: 55 +- `net_04`: 54 diff --git a/archive/routing/performance.md b/archive/routing/performance.md index 3a9fb37..0a54430 100644 --- a/archive/routing/performance.md +++ b/archive/routing/performance.md @@ -1,23 +1,21 @@ # Performance Baseline -Generated on 2026-04-02 by `scripts/record_performance_baseline.py`. +Generated on 2026-11-26 by `scripts/record_performance_baseline.py`. The full machine-readable snapshot is in [performance_baseline.json](performance_baseline.json). Use `scripts/diff_performance_baseline.py` to compare a fresh run against that snapshot. -The default table below intentionally excludes the heavier performance-only no-warm `example_07` canaries. Use `scripts/record_iteration_trace.py` and `scripts/record_pre_pair_frontier_trace.py` to inspect the late negotiated-congestion basin and pair-local handoff behavior for those scenarios. - | Scenario | Duration (s) | Total | Valid | Reached | Iter | Nets Routed | Nodes | Ray Casts | Moves Gen | Moves Added | Dyn Tree | Visibility Builds | Congestion Checks | Verify Calls | | :-- | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | -| example_01_simple_route | 0.0037 | 1 | 1 | 1 | 1 | 1 | 2 | 10 | 11 | 7 | 0 | 0 | 0 | 5 | -| example_02_congestion_resolution | 0.3361 | 3 | 3 | 3 | 1 | 3 | 366 | 1164 | 1413 | 668 | 0 | 0 | 0 | 41 | -| example_03_locked_paths | 0.1877 | 2 | 2 | 2 | 2 | 2 | 191 | 657 | 904 | 307 | 0 | 0 | 0 | 18 | -| example_04_sbends_and_radii | 0.0269 | 2 | 2 | 2 | 1 | 2 | 15 | 70 | 123 | 65 | 0 | 0 | 0 | 10 | -| example_05_orientation_stress | 0.2311 | 3 | 3 | 3 | 2 | 5 | 297 | 1274 | 1680 | 689 | 0 | 0 | 146 | 20 | -| example_06_bend_collision_models | 0.1988 | 3 | 3 | 3 | 3 | 3 | 240 | 682 | 1026 | 629 | 0 | 0 | 0 | 15 | -| example_07_large_scale_routing | 0.2088 | 10 | 10 | 10 | 1 | 10 | 78 | 383 | 372 | 227 | 0 | 0 | 0 | 50 | -| example_08_custom_bend_geometry | 0.0177 | 2 | 2 | 2 | 2 | 2 | 18 | 56 | 78 | 56 | 0 | 0 | 0 | 10 | -| example_09_unroutable_best_effort | 0.0057 | 1 | 0 | 0 | 1 | 1 | 3 | 13 | 16 | 10 | 0 | 0 | 0 | 1 | +| example_01_simple_route | 0.0043 | 1 | 1 | 1 | 1 | 1 | 2 | 10 | 11 | 7 | 0 | 0 | 0 | 4 | +| example_02_congestion_resolution | 0.2536 | 3 | 3 | 3 | 1 | 3 | 366 | 1164 | 1413 | 668 | 0 | 0 | 0 | 16 | +| example_03_locked_paths | 0.1450 | 2 | 2 | 2 | 2 | 2 | 191 | 657 | 904 | 307 | 0 | 0 | 0 | 10 | +| example_04_sbends_and_radii | 0.0217 | 2 | 2 | 2 | 1 | 2 | 15 | 70 | 123 | 65 | 0 | 0 | 0 | 8 | +| example_05_orientation_stress | 0.1859 | 3 | 3 | 3 | 2 | 5 | 297 | 1274 | 1680 | 689 | 0 | 0 | 146 | 17 | +| example_06_bend_collision_models | 0.1723 | 3 | 3 | 3 | 3 | 3 | 240 | 682 | 1026 | 629 | 0 | 0 | 0 | 12 | +| example_07_large_scale_routing | 0.1860 | 10 | 10 | 10 | 1 | 10 | 78 | 383 | 372 | 227 | 0 | 0 | 0 | 40 | +| example_08_custom_bend_geometry | 0.0152 | 2 | 2 | 2 | 2 | 2 | 18 | 56 | 78 | 56 | 0 | 0 | 0 | 8 | +| example_09_unroutable_best_effort | 0.0053 | 1 | 0 | 0 | 1 | 1 | 3 | 13 | 16 | 10 | 0 | 0 | 0 | 1 | ## Full Counter Set diff --git a/archive/routing/performance_baseline.json b/archive/routing/performance_baseline.json index 952600d..7076989 100644 --- a/archive/routing/performance_baseline.json +++ b/archive/routing/performance_baseline.json @@ -1,9 +1,9 @@ { - "generated_on": "2026-04-02", + "generated_on": "2026-11-26", "generator": "scripts/record_performance_baseline.py", "scenarios": [ { - "duration_s": 0.003715757979080081, + "duration_s": 0.004315305966883898, "metrics": { "congestion_cache_hits": 0, "congestion_cache_misses": 0, @@ -87,7 +87,7 @@ "refinement_windows_considered": 0, "route_iterations": 1, "score_component_calls": 11, - "score_component_total_ns": 16864, + "score_component_total_ns": 19890, "static_net_tree_rebuilds": 1, "static_raw_tree_rebuilds": 0, "static_safe_cache_hits": 1, @@ -95,7 +95,7 @@ "timeout_events": 0, "verify_dynamic_candidate_nets": 0, "verify_dynamic_exact_pair_checks": 0, - "verify_path_report_calls": 5, + "verify_path_report_calls": 4, "verify_static_buffer_ops": 0, "visibility_builds": 0, "visibility_corner_hits_exact": 0, @@ -117,7 +117,7 @@ "valid_results": 1 }, { - "duration_s": 0.33605348505079746, + "duration_s": 0.25360398599877954, "metrics": { "congestion_cache_hits": 0, "congestion_cache_misses": 0, @@ -177,7 +177,7 @@ "pair_local_search_attempts": 0, "pair_local_search_nodes_expanded": 0, "pair_local_search_pairs_considered": 0, - "path_cost_calls": 14, + "path_cost_calls": 30, "pruned_closed_set": 157, "pruned_cost": 208, "pruned_hard_collision": 380, @@ -194,22 +194,22 @@ "refine_path_calls": 3, "refinement_candidate_side_extents": 26, "refinement_candidates_accepted": 2, - "refinement_candidates_built": 26, - "refinement_candidates_verified": 26, + "refinement_candidates_built": 2, + "refinement_candidates_verified": 2, "refinement_dynamic_bounds_checked": 20, "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 10, + "refinement_windows_considered": 4, "route_iterations": 1, - "score_component_calls": 976, - "score_component_total_ns": 1109505, + "score_component_calls": 1088, + "score_component_total_ns": 1145758, "static_net_tree_rebuilds": 3, "static_raw_tree_rebuilds": 0, "static_safe_cache_hits": 1, "static_tree_rebuilds": 2, "timeout_events": 0, - "verify_dynamic_candidate_nets": 92, - "verify_dynamic_exact_pair_checks": 90, - "verify_path_report_calls": 41, + "verify_dynamic_candidate_nets": 14, + "verify_dynamic_exact_pair_checks": 12, + "verify_path_report_calls": 16, "verify_static_buffer_ops": 0, "visibility_builds": 0, "visibility_corner_hits_exact": 0, @@ -231,7 +231,7 @@ "valid_results": 3 }, { - "duration_s": 0.18771230895072222, + "duration_s": 0.14500006497837603, "metrics": { "congestion_cache_hits": 0, "congestion_cache_misses": 0, @@ -291,7 +291,7 @@ "pair_local_search_attempts": 0, "pair_local_search_nodes_expanded": 0, "pair_local_search_pairs_considered": 0, - "path_cost_calls": 9, + "path_cost_calls": 10, "pruned_closed_set": 97, "pruned_cost": 140, "pruned_hard_collision": 181, @@ -308,23 +308,23 @@ "refine_path_calls": 2, "refinement_candidate_side_extents": 8, "refinement_candidates_accepted": 1, - "refinement_candidates_built": 8, - "refinement_candidates_verified": 8, + "refinement_candidates_built": 1, + "refinement_candidates_verified": 1, "refinement_dynamic_bounds_checked": 2, "refinement_static_bounds_checked": 2, "refinement_windows_considered": 2, "route_iterations": 2, - "score_component_calls": 504, - "score_component_total_ns": 546567, + "score_component_calls": 510, + "score_component_total_ns": 545847, "static_net_tree_rebuilds": 2, "static_raw_tree_rebuilds": 1, "static_safe_cache_hits": 1, "static_tree_rebuilds": 1, "timeout_events": 0, - "verify_dynamic_candidate_nets": 10, - "verify_dynamic_exact_pair_checks": 10, - "verify_path_report_calls": 18, - "verify_static_buffer_ops": 90, + "verify_dynamic_candidate_nets": 8, + "verify_dynamic_exact_pair_checks": 8, + "verify_path_report_calls": 10, + "verify_static_buffer_ops": 48, "visibility_builds": 0, "visibility_corner_hits_exact": 0, "visibility_corner_index_builds": 2, @@ -345,7 +345,7 @@ "valid_results": 2 }, { - "duration_s": 0.026945222169160843, + "duration_s": 0.021677320008166134, "metrics": { "congestion_cache_hits": 0, "congestion_cache_misses": 0, @@ -429,15 +429,15 @@ "refinement_windows_considered": 0, "route_iterations": 1, "score_component_calls": 90, - "score_component_total_ns": 97710, + "score_component_total_ns": 94482, "static_net_tree_rebuilds": 2, "static_raw_tree_rebuilds": 0, "static_safe_cache_hits": 1, "static_tree_rebuilds": 1, "timeout_events": 0, - "verify_dynamic_candidate_nets": 12, + "verify_dynamic_candidate_nets": 9, "verify_dynamic_exact_pair_checks": 0, - "verify_path_report_calls": 10, + "verify_path_report_calls": 8, "verify_static_buffer_ops": 0, "visibility_builds": 0, "visibility_corner_hits_exact": 0, @@ -459,7 +459,7 @@ "valid_results": 2 }, { - "duration_s": 0.23108969815075397, + "duration_s": 0.18591969890985638, "metrics": { "congestion_cache_hits": 3, "congestion_cache_misses": 146, @@ -543,7 +543,7 @@ "refinement_windows_considered": 0, "route_iterations": 2, "score_component_calls": 1234, - "score_component_total_ns": 1223569, + "score_component_total_ns": 1189711, "static_net_tree_rebuilds": 3, "static_raw_tree_rebuilds": 0, "static_safe_cache_hits": 8, @@ -551,7 +551,7 @@ "timeout_events": 0, "verify_dynamic_candidate_nets": 8, "verify_dynamic_exact_pair_checks": 12, - "verify_path_report_calls": 20, + "verify_path_report_calls": 17, "verify_static_buffer_ops": 0, "visibility_builds": 0, "visibility_corner_hits_exact": 0, @@ -573,7 +573,7 @@ "valid_results": 3 }, { - "duration_s": 0.19879506202414632, + "duration_s": 0.1722618379862979, "metrics": { "congestion_cache_hits": 0, "congestion_cache_misses": 0, @@ -599,7 +599,7 @@ "danger_map_cache_misses": 731, "danger_map_lookup_calls": 1914, "danger_map_query_calls": 731, - "danger_map_total_ns": 19050142, + "danger_map_total_ns": 18541396, "dynamic_grid_rebuilds": 0, "dynamic_path_objects_added": 54, "dynamic_path_objects_removed": 36, @@ -645,7 +645,7 @@ "ray_cast_calls_visibility_build": 0, "ray_cast_calls_visibility_query": 0, "ray_cast_calls_visibility_tangent": 34, - "ray_cast_candidate_bounds": 97, + "ray_cast_candidate_bounds": 88, "ray_cast_exact_geometry_checks": 0, "refine_path_calls": 3, "refinement_candidate_side_extents": 0, @@ -657,7 +657,7 @@ "refinement_windows_considered": 0, "route_iterations": 3, "score_component_calls": 842, - "score_component_total_ns": 21353240, + "score_component_total_ns": 20820878, "static_net_tree_rebuilds": 3, "static_raw_tree_rebuilds": 3, "static_safe_cache_hits": 141, @@ -665,8 +665,8 @@ "timeout_events": 0, "verify_dynamic_candidate_nets": 0, "verify_dynamic_exact_pair_checks": 0, - "verify_path_report_calls": 15, - "verify_static_buffer_ops": 90, + "verify_path_report_calls": 12, + "verify_static_buffer_ops": 72, "visibility_builds": 0, "visibility_corner_hits_exact": 0, "visibility_corner_index_builds": 3, @@ -687,7 +687,7 @@ "valid_results": 3 }, { - "duration_s": 0.20880168909206986, + "duration_s": 0.18596431298647076, "metrics": { "congestion_cache_hits": 0, "congestion_cache_misses": 0, @@ -713,7 +713,7 @@ "danger_map_cache_misses": 448, "danger_map_lookup_calls": 681, "danger_map_query_calls": 448, - "danger_map_total_ns": 11025527, + "danger_map_total_ns": 10931551, "dynamic_grid_rebuilds": 0, "dynamic_path_objects_added": 132, "dynamic_path_objects_removed": 88, @@ -771,16 +771,16 @@ "refinement_windows_considered": 0, "route_iterations": 1, "score_component_calls": 291, - "score_component_total_ns": 11875928, + "score_component_total_ns": 11785678, "static_net_tree_rebuilds": 10, "static_raw_tree_rebuilds": 1, "static_safe_cache_hits": 6, "static_tree_rebuilds": 10, "timeout_events": 0, - "verify_dynamic_candidate_nets": 476, - "verify_dynamic_exact_pair_checks": 72, - "verify_path_report_calls": 50, - "verify_static_buffer_ops": 220, + "verify_dynamic_candidate_nets": 370, + "verify_dynamic_exact_pair_checks": 56, + "verify_path_report_calls": 40, + "verify_static_buffer_ops": 176, "visibility_builds": 0, "visibility_corner_hits_exact": 0, "visibility_corner_index_builds": 10, @@ -801,7 +801,7 @@ "valid_results": 10 }, { - "duration_s": 0.017696003895252943, + "duration_s": 0.015218257089145482, "metrics": { "congestion_cache_hits": 0, "congestion_cache_misses": 0, @@ -885,7 +885,7 @@ "refinement_windows_considered": 0, "route_iterations": 2, "score_component_calls": 72, - "score_component_total_ns": 87742, + "score_component_total_ns": 84457, "static_net_tree_rebuilds": 2, "static_raw_tree_rebuilds": 0, "static_safe_cache_hits": 2, @@ -893,7 +893,7 @@ "timeout_events": 0, "verify_dynamic_candidate_nets": 0, "verify_dynamic_exact_pair_checks": 0, - "verify_path_report_calls": 10, + "verify_path_report_calls": 8, "verify_static_buffer_ops": 0, "visibility_builds": 0, "visibility_corner_hits_exact": 0, @@ -915,7 +915,7 @@ "valid_results": 2 }, { - "duration_s": 0.005660973023623228, + "duration_s": 0.005253698094747961, "metrics": { "congestion_cache_hits": 0, "congestion_cache_misses": 0, @@ -941,7 +941,7 @@ "danger_map_cache_misses": 20, "danger_map_lookup_calls": 30, "danger_map_query_calls": 20, - "danger_map_total_ns": 515133, + "danger_map_total_ns": 504814, "dynamic_grid_rebuilds": 0, "dynamic_path_objects_added": 2, "dynamic_path_objects_removed": 1, @@ -999,7 +999,7 @@ "refinement_windows_considered": 0, "route_iterations": 1, "score_component_calls": 14, - "score_component_total_ns": 554809, + "score_component_total_ns": 543596, "static_net_tree_rebuilds": 1, "static_raw_tree_rebuilds": 1, "static_safe_cache_hits": 0, diff --git a/archive/routing/pre_pair_frontier_trace.json b/archive/routing/pre_pair_frontier_trace.json index 42d83c6..72db90d 100644 --- a/archive/routing/pre_pair_frontier_trace.json +++ b/archive/routing/pre_pair_frontier_trace.json @@ -1,80 +1,80 @@ { - "generated_at": "2026-04-02T18:51:01-07:00", + "generated_at": "2026-11-26T21:47:45-08:00", "generator": "scripts/record_pre_pair_frontier_trace.py", "scenarios": [ { "metrics": { - "congestion_cache_hits": 31, - "congestion_cache_misses": 2736, - "congestion_candidate_ids": 5785, - "congestion_candidate_nets": 6163, - "congestion_candidate_precheck_hits": 1383, - "congestion_candidate_precheck_misses": 1418, - "congestion_candidate_precheck_skips": 34, - "congestion_check_calls": 2736, - "congestion_exact_pair_checks": 4780, - "congestion_grid_net_cache_hits": 1356, - "congestion_grid_net_cache_misses": 2608, - "congestion_grid_span_cache_hits": 1247, - "congestion_grid_span_cache_misses": 1308, + "congestion_cache_hits": 24, + "congestion_cache_misses": 3411, + "congestion_candidate_ids": 7213, + "congestion_candidate_nets": 7410, + "congestion_candidate_precheck_hits": 1677, + "congestion_candidate_precheck_misses": 1795, + "congestion_candidate_precheck_skips": 37, + "congestion_check_calls": 3411, + "congestion_exact_pair_checks": 5860, + "congestion_grid_net_cache_hits": 1676, + "congestion_grid_net_cache_misses": 3276, + "congestion_grid_span_cache_hits": 1517, + "congestion_grid_span_cache_misses": 1637, "congestion_lazy_requeues": 0, "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1452, - "congestion_net_envelope_cache_misses": 2720, - "congestion_presence_cache_hits": 1541, - "congestion_presence_cache_misses": 1642, - "congestion_presence_skips": 382, - "danger_map_cache_hits": 11547, - "danger_map_cache_misses": 6063, - "danger_map_lookup_calls": 17610, - "danger_map_query_calls": 6063, - "danger_map_total_ns": 171779571, + "congestion_net_envelope_cache_hits": 1801, + "congestion_net_envelope_cache_misses": 3433, + "congestion_presence_cache_hits": 1857, + "congestion_presence_cache_misses": 2075, + "congestion_presence_skips": 460, + "danger_map_cache_hits": 13605, + "danger_map_cache_misses": 6252, + "danger_map_lookup_calls": 19857, + "danger_map_query_calls": 6252, + "danger_map_total_ns": 182509223, "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 399, - "dynamic_path_objects_removed": 351, + "dynamic_path_objects_added": 430, + "dynamic_path_objects_removed": 384, "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 6750.0, - "guidance_bonus_applied_bend90": 2250.0, - "guidance_bonus_applied_sbend": 375.0, - "guidance_bonus_applied_straight": 4125.0, - "guidance_match_moves": 108, - "guidance_match_moves_bend90": 36, - "guidance_match_moves_sbend": 6, - "guidance_match_moves_straight": 66, + "guidance_bonus_applied": 3275.0, + "guidance_bonus_applied_bend90": 1075.0, + "guidance_bonus_applied_sbend": 200.0, + "guidance_bonus_applied_straight": 2000.0, + "guidance_match_moves": 131, + "guidance_match_moves_bend90": 43, + "guidance_match_moves_sbend": 8, + "guidance_match_moves_straight": 80, "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 37, - "iteration_conflicting_nets": 32, - "iteration_reverified_nets": 50, - "iteration_reverify_calls": 5, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 1200, - "move_cache_abs_misses": 5338, - "move_cache_rel_hits": 4768, - "move_cache_rel_misses": 570, - "moves_added": 5853, - "moves_generated": 6538, + "iteration_conflict_edges": 40, + "iteration_conflicting_nets": 39, + "iteration_reverified_nets": 60, + "iteration_reverify_calls": 6, + "late_phase_capped_fallbacks": 2, + "late_phase_capped_nets": 2, + "move_cache_abs_hits": 1831, + "move_cache_abs_misses": 5516, + "move_cache_rel_hits": 4926, + "move_cache_rel_misses": 590, + "moves_added": 6594, + "moves_generated": 7347, "nets_carried_forward": 6, - "nets_reached_target": 44, - "nets_routed": 44, - "nodes_expanded": 1258, + "nets_reached_target": 52, + "nets_routed": 54, + "nodes_expanded": 1408, "pair_local_search_accepts": 2, - "pair_local_search_attempts": 2, - "pair_local_search_nodes_expanded": 68, + "pair_local_search_attempts": 3, + "pair_local_search_nodes_expanded": 42, "pair_local_search_pairs_considered": 2, "path_cost_calls": 0, - "pruned_closed_set": 374, - "pruned_cost": 311, + "pruned_closed_set": 414, + "pruned_cost": 339, "pruned_hard_collision": 0, - "ray_cast_calls": 4310, - "ray_cast_calls_expand_forward": 1214, - "ray_cast_calls_expand_snap": 39, + "ray_cast_calls": 4577, + "ray_cast_calls_expand_forward": 1356, + "ray_cast_calls_expand_snap": 36, "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3051, + "ray_cast_calls_straight_static": 3179, "ray_cast_calls_visibility_build": 0, "ray_cast_calls_visibility_query": 0, "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 159, + "ray_cast_candidate_bounds": 162, "ray_cast_exact_geometry_checks": 0, "refine_path_calls": 10, "refinement_candidate_side_extents": 0, @@ -84,18 +84,18 @@ "refinement_dynamic_bounds_checked": 0, "refinement_static_bounds_checked": 0, "refinement_windows_considered": 0, - "route_iterations": 5, - "score_component_calls": 6181, - "score_component_total_ns": 192508906, + "route_iterations": 6, + "score_component_calls": 6958, + "score_component_total_ns": 206697616, "static_net_tree_rebuilds": 1, "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1170, + "static_safe_cache_hits": 1778, "static_tree_rebuilds": 1, "timeout_events": 0, - "verify_dynamic_candidate_nets": 1822, - "verify_dynamic_exact_pair_checks": 504, - "verify_path_report_calls": 164, - "verify_static_buffer_ops": 779, + "verify_dynamic_candidate_nets": 1638, + "verify_dynamic_exact_pair_checks": 507, + "verify_path_report_calls": 152, + "verify_static_buffer_ops": 699, "visibility_builds": 0, "visibility_corner_hits_exact": 0, "visibility_corner_index_builds": 1, @@ -106,7 +106,7 @@ "visibility_point_queries": 0, "visibility_tangent_candidate_corner_checks": 6, "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1214, + "visibility_tangent_candidate_scans": 1356, "warm_start_paths_built": 0, "warm_start_paths_used": 0 }, @@ -114,18 +114,18 @@ "pre_pair_frontier_trace": { "conflict_edges": [ [ - "net_01", - "net_02" + "net_02", + "net_03" ], [ "net_06", "net_07" ] ], - "iteration": 4, + "iteration": 5, "nets": [ { - "congestion_check_calls": 30, + "congestion_check_calls": 85, "frontier": { "hotspot_bounds": [ [ @@ -142,21 +142,129 @@ ] ], "net_id": "net_07", - "pruned_closed_set": 0, + "pruned_closed_set": 2, "pruned_cost": 0, "pruned_hard_collision": 0, "pruned_self_collision": 0, - "samples": [] + "samples": [ + { + "end_state": [ + 850, + 520, + 0 + ], + "hotspot_index": 0, + "move_type": "straight", + "parent_state": [ + 525, + 520, + 0 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 850, + 520, + 0 + ], + "hotspot_index": 0, + "move_type": "straight", + "parent_state": [ + 763, + 520, + 0 + ], + "reason": "closed_set" + } + ] }, "guidance_seed_present": true, "net_id": "net_07", - "nodes_expanded": 7, - "pruned_closed_set": 1, + "nodes_expanded": 16, + "pruned_closed_set": 3, "pruned_cost": 0, "pruned_hard_collision": 0 }, { - "congestion_check_calls": 179, + "congestion_check_calls": 86, + "frontier": { + "hotspot_bounds": [ + [ + 826.3396407947511, + 418.0, + 917.3906878342618, + 507.1148801363561 + ], + [ + 884.0, + 402.0, + 916.0, + 435.0 + ] + ], + "net_id": "net_02", + "pruned_closed_set": 3, + "pruned_cost": 0, + "pruned_hard_collision": 0, + "pruned_self_collision": 0, + "samples": [ + { + "end_state": [ + 850, + 470, + 0 + ], + "hotspot_index": 0, + "move_type": "straight", + "parent_state": [ + 525, + 470, + 0 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 850, + 470, + 0 + ], + "hotspot_index": 0, + "move_type": "straight", + "parent_state": [ + 763, + 470, + 0 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 470, + 0 + ], + "hotspot_index": 0, + "move_type": "straight", + "parent_state": [ + 881, + 470, + 0 + ], + "reason": "closed_set" + } + ] + }, + "guidance_seed_present": true, + "net_id": "net_02", + "nodes_expanded": 17, + "pruned_closed_set": 4, + "pruned_cost": 0, + "pruned_hard_collision": 0 + }, + { + "congestion_check_calls": 0, "frontier": { "hotspot_bounds": [ [ @@ -179,26 +287,11 @@ ] ], "net_id": "net_06", - "pruned_closed_set": 5, + "pruned_closed_set": 10, "pruned_cost": 0, "pruned_hard_collision": 0, "pruned_self_collision": 0, "samples": [ - { - "end_state": [ - 900, - 510, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 525, - 510, - 0 - ], - "reason": "closed_set" - }, { "end_state": [ 850, @@ -214,21 +307,6 @@ ], "reason": "closed_set" }, - { - "end_state": [ - 900, - 510, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 763, - 510, - 0 - ], - "reason": "closed_set" - }, { "end_state": [ 850, @@ -258,90 +336,405 @@ 0 ], "reason": "closed_set" + }, + { + "end_state": [ + 900, + 633, + 270 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 638, + 270 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 895, + 633, + 270 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 895, + 638, + 270 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 880, + 633, + 270 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 880, + 638, + 270 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 633, + 270 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 827, + 270 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 633, + 270 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 832, + 270 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 633, + 270 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 780, + 270 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 633, + 270 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 785, + 270 + ], + "reason": "closed_set" } ] }, "guidance_seed_present": true, "net_id": "net_06", - "nodes_expanded": 46, - "pruned_closed_set": 7, - "pruned_cost": 15, - "pruned_hard_collision": 0 - }, - { - "congestion_check_calls": 43, - "frontier": { - "hotspot_bounds": [ - [ - 506.3396407947511, - 398.0, - 597.3906878342618, - 487.1148801363561 - ], - [ - 564.0, - 224.0, - 596.0, - 415.0 - ] - ], - "net_id": "net_00", - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "pruned_self_collision": 0, - "samples": [] - }, - "guidance_seed_present": true, - "net_id": "net_00", - "nodes_expanded": 10, - "pruned_closed_set": 1, + "nodes_expanded": 0, + "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0 }, { - "congestion_check_calls": 80, + "congestion_check_calls": 0, "frontier": { "hotspot_bounds": [ [ - 506.3396407947511, - 398.0, - 597.3906878342618, - 487.1148801363561 + 826.3396407947511, + 418.0, + 917.3906878342618, + 507.1148801363561 ], [ - 564.0, - 388.0, - 596.2379632934325, - 425.0 + 884.0, + 408.0, + 916.2379632934325, + 445.0 ], [ - 563.7620367065675, - 169.71498824645388, - 596.0, - 251.0 + 883.7620367065675, + 347.71498824645397, + 916.0, + 429.0 ] ], - "net_id": "net_01", - "pruned_closed_set": 0, + "net_id": "net_03", + "pruned_closed_set": 16, "pruned_cost": 0, "pruned_hard_collision": 0, "pruned_self_collision": 0, - "samples": [] + "samples": [ + { + "end_state": [ + 850, + 480, + 0 + ], + "hotspot_index": 0, + "move_type": "straight", + "parent_state": [ + 525, + 480, + 0 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 850, + 480, + 0 + ], + "hotspot_index": 0, + "move_type": "straight", + "parent_state": [ + 763, + 480, + 0 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 362, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 895, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 895, + 362, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 880, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 880, + 362, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 896, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 896, + 362, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 891, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 891, + 362, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 886, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 886, + 362, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 882, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 882, + 362, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 1000, + 380, + 0 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 868, + 380, + 0 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 995, + 380, + 0 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 868, + 380, + 0 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 163, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 158, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 267, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 215, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 210, + 90 + ], + "reason": "closed_set" + } + ] }, "guidance_seed_present": true, - "net_id": "net_01", - "nodes_expanded": 18, - "pruned_closed_set": 3, + "net_id": "net_03", + "nodes_expanded": 0, + "pruned_closed_set": 0, "pruned_cost": 0, "pruned_hard_collision": 0 } ], "routed_net_ids": [ "net_07", + "net_02", "net_06", - "net_00", - "net_01" + "net_03" ] }, "summary": { @@ -353,40 +746,40 @@ { "metrics": { "congestion_cache_hits": 8, - "congestion_cache_misses": 2530, - "congestion_candidate_ids": 6173, - "congestion_candidate_nets": 5869, - "congestion_candidate_precheck_hits": 1152, - "congestion_candidate_precheck_misses": 1460, - "congestion_candidate_precheck_skips": 74, - "congestion_check_calls": 2530, - "congestion_exact_pair_checks": 4800, - "congestion_grid_net_cache_hits": 1192, - "congestion_grid_net_cache_misses": 2676, - "congestion_grid_span_cache_hits": 1065, - "congestion_grid_span_cache_misses": 1366, + "congestion_cache_misses": 2766, + "congestion_candidate_ids": 6715, + "congestion_candidate_nets": 6315, + "congestion_candidate_precheck_hits": 1342, + "congestion_candidate_precheck_misses": 1509, + "congestion_candidate_precheck_skips": 77, + "congestion_check_calls": 2766, + "congestion_exact_pair_checks": 5194, + "congestion_grid_net_cache_hits": 1366, + "congestion_grid_net_cache_misses": 2753, + "congestion_grid_span_cache_hits": 1230, + "congestion_grid_span_cache_misses": 1404, "congestion_lazy_requeues": 0, "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1234, - "congestion_net_envelope_cache_misses": 2769, - "congestion_presence_cache_hits": 1302, - "congestion_presence_cache_misses": 1664, - "congestion_presence_skips": 354, - "danger_map_cache_hits": 11485, - "danger_map_cache_misses": 5474, - "danger_map_lookup_calls": 16959, - "danger_map_query_calls": 5474, - "danger_map_total_ns": 143896014, + "congestion_net_envelope_cache_hits": 1435, + "congestion_net_envelope_cache_misses": 2856, + "congestion_presence_cache_hits": 1498, + "congestion_presence_cache_misses": 1717, + "congestion_presence_skips": 364, + "danger_map_cache_hits": 12083, + "danger_map_cache_misses": 5623, + "danger_map_lookup_calls": 17706, + "danger_map_query_calls": 5623, + "danger_map_total_ns": 159397726, "dynamic_grid_rebuilds": 0, "dynamic_path_objects_added": 397, "dynamic_path_objects_removed": 350, "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 7562.5, - "guidance_bonus_applied_bend90": 2937.5, - "guidance_bonus_applied_sbend": 250.0, - "guidance_bonus_applied_straight": 4375.0, - "guidance_match_moves": 121, - "guidance_match_moves_bend90": 47, + "guidance_bonus_applied": 3000.0, + "guidance_bonus_applied_bend90": 1150.0, + "guidance_bonus_applied_sbend": 100.0, + "guidance_bonus_applied_straight": 1750.0, + "guidance_match_moves": 120, + "guidance_match_moves_bend90": 46, "guidance_match_moves_sbend": 4, "guidance_match_moves_straight": 70, "hard_collision_cache_hits": 0, @@ -396,33 +789,33 @@ "iteration_reverify_calls": 6, "late_phase_capped_fallbacks": 2, "late_phase_capped_nets": 2, - "move_cache_abs_hits": 1304, - "move_cache_abs_misses": 4997, - "move_cache_rel_hits": 4419, - "move_cache_rel_misses": 578, - "moves_added": 5638, - "moves_generated": 6301, + "move_cache_abs_hits": 1479, + "move_cache_abs_misses": 5117, + "move_cache_rel_hits": 4529, + "move_cache_rel_misses": 588, + "moves_added": 5884, + "moves_generated": 6596, "nets_carried_forward": 14, "nets_reached_target": 44, "nets_routed": 46, - "nodes_expanded": 1203, + "nodes_expanded": 1268, "pair_local_search_accepts": 2, "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 39, + "pair_local_search_nodes_expanded": 42, "pair_local_search_pairs_considered": 2, "path_cost_calls": 0, - "pruned_closed_set": 354, - "pruned_cost": 309, + "pruned_closed_set": 366, + "pruned_cost": 346, "pruned_hard_collision": 0, - "ray_cast_calls": 4059, - "ray_cast_calls_expand_forward": 1159, + "ray_cast_calls": 4200, + "ray_cast_calls_expand_forward": 1224, "ray_cast_calls_expand_snap": 13, "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 2881, + "ray_cast_calls_straight_static": 2957, "ray_cast_calls_visibility_build": 0, "ray_cast_calls_visibility_query": 0, "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 170, + "ray_cast_candidate_bounds": 167, "ray_cast_exact_geometry_checks": 0, "refine_path_calls": 10, "refinement_candidate_side_extents": 0, @@ -433,17 +826,17 @@ "refinement_static_bounds_checked": 0, "refinement_windows_considered": 0, "route_iterations": 6, - "score_component_calls": 5962, - "score_component_total_ns": 163113517, + "score_component_calls": 6248, + "score_component_total_ns": 181369777, "static_net_tree_rebuilds": 1, "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1276, + "static_safe_cache_hits": 1444, "static_tree_rebuilds": 1, "timeout_events": 0, - "verify_dynamic_candidate_nets": 1884, - "verify_dynamic_exact_pair_checks": 557, - "verify_path_report_calls": 174, - "verify_static_buffer_ops": 805, + "verify_dynamic_candidate_nets": 1543, + "verify_dynamic_exact_pair_checks": 511, + "verify_path_report_calls": 144, + "verify_static_buffer_ops": 666, "visibility_builds": 0, "visibility_corner_hits_exact": 0, "visibility_corner_index_builds": 1, @@ -454,7 +847,7 @@ "visibility_point_queries": 0, "visibility_tangent_candidate_corner_checks": 6, "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1159, + "visibility_tangent_candidate_scans": 1224, "warm_start_paths_built": 0, "warm_start_paths_used": 0 }, @@ -635,7 +1028,7 @@ ] ], "net_id": "net_06", - "pruned_closed_set": 8, + "pruned_closed_set": 10, "pruned_cost": 0, "pruned_hard_collision": 0, "pruned_self_collision": 0, @@ -759,6 +1152,36 @@ 270 ], "reason": "closed_set" + }, + { + "end_state": [ + 900, + 633, + 270 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 780, + 270 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 633, + 270 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 785, + 270 + ], + "reason": "closed_set" } ] }, @@ -793,7 +1216,7 @@ ] ], "net_id": "net_03", - "pruned_closed_set": 12, + "pruned_closed_set": 14, "pruned_cost": 0, "pruned_hard_collision": 0, "pruned_self_collision": 0, @@ -977,6 +1400,36 @@ 90 ], "reason": "closed_set" + }, + { + "end_state": [ + 900, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 215, + 90 + ], + "reason": "closed_set" + }, + { + "end_state": [ + 900, + 367, + 90 + ], + "hotspot_index": 2, + "move_type": "straight", + "parent_state": [ + 900, + 210, + 90 + ], + "reason": "closed_set" } ] }, diff --git a/archive/routing/pre_pair_frontier_trace.md b/archive/routing/pre_pair_frontier_trace.md index a760f82..e07ab16 100644 --- a/archive/routing/pre_pair_frontier_trace.md +++ b/archive/routing/pre_pair_frontier_trace.md @@ -1,25 +1,25 @@ # Pre-Pair Frontier Trace -Generated at 2026-04-02T18:51:01-07:00 by `scripts/record_pre_pair_frontier_trace.py`. +Generated at 2026-11-26T21:47:45-08:00 by `scripts/record_pre_pair_frontier_trace.py`. ## example_07_large_scale_routing_no_warm_start Results: 10 valid / 10 reached / 10 total. -Captured iteration: `4` +Captured iteration: `5` -Conflict edges: `(('net_01', 'net_02'), ('net_06', 'net_07'))` +Conflict edges: `(('net_02', 'net_03'), ('net_06', 'net_07'))` | Net | Nodes | Checks | Closed-Set | Cost | Hard Collision | Guidance Seed | Frontier Samples | | :-- | --: | --: | --: | --: | --: | :--: | --: | -| net_07 | 7 | 30 | 1 | 0 | 0 | yes | 0 | -| net_06 | 46 | 179 | 7 | 15 | 0 | yes | 5 | -| net_00 | 10 | 43 | 1 | 0 | 0 | yes | 0 | -| net_01 | 18 | 80 | 3 | 0 | 0 | yes | 0 | +| net_07 | 16 | 85 | 3 | 0 | 0 | yes | 2 | +| net_02 | 17 | 86 | 4 | 0 | 0 | yes | 3 | +| net_06 | 0 | 0 | 0 | 0 | 0 | yes | 10 | +| net_03 | 0 | 0 | 0 | 0 | 0 | yes | 16 | Frontier prune totals by reason: -- `closed_set`: 5 +- `closed_set`: 31 - `hard_collision`: 0 - `self_collision`: 0 - `cost`: 0 @@ -36,12 +36,12 @@ Conflict edges: `(('net_02', 'net_03'), ('net_06', 'net_07'))` | :-- | --: | --: | --: | --: | --: | :--: | --: | | net_07 | 16 | 85 | 3 | 0 | 0 | yes | 2 | | net_02 | 17 | 86 | 4 | 0 | 0 | yes | 3 | -| net_06 | 0 | 0 | 0 | 0 | 0 | yes | 8 | -| net_03 | 0 | 0 | 0 | 0 | 0 | yes | 12 | +| net_06 | 0 | 0 | 0 | 0 | 0 | yes | 10 | +| net_03 | 0 | 0 | 0 | 0 | 0 | yes | 14 | Frontier prune totals by reason: -- `closed_set`: 25 +- `closed_set`: 29 - `hard_collision`: 0 - `self_collision`: 0 - `cost`: 0 diff --git a/docs/routing-diagnostics.md b/docs/routing-diagnostics.md index 48fc4a2..edc2729 100644 --- a/docs/routing-diagnostics.md +++ b/docs/routing-diagnostics.md @@ -42,7 +42,7 @@ Capture the no-warm-start fan-out scenario from the repository root. ```sh python -m scripts.record_iteration_trace --scenario example_07_large_scale_routing_no_warm_start \ - --include-performance-only --output-dir /tmp/inire-trace + --output-dir /tmp/inire-trace ``` 1. Open the generated `iteration_trace.md`. Compare the last iteration's completed count and conflict edges with the final result summary. In the recorded example, the last iteration had six completed nets and two conflict edges. @@ -64,6 +64,6 @@ python -m scripts.routing_benchmark_parity capture /tmp/routing-after.json --cas python -m scripts.routing_benchmark_parity compare /tmp/routing-before.json /tmp/routing-after.json ``` -Use `scripts.record_iteration_trace` and `scripts.record_pre_pair_frontier_trace` to inspect a late conflict. Use `scripts.record_conflict_trace` and `scripts.record_frontier_trace` to locate an overlap and inspect rejected moves near it. Pass `--output-dir /tmp/inire-trace` for a scratch capture. The trace writers support `--scenario` for an individual built-in case and `--include-performance-only` for the heavier cases. +Use `scripts.record_iteration_trace` and `scripts.record_pre_pair_frontier_trace` to inspect a late conflict. Use `scripts.record_conflict_trace` and `scripts.record_frontier_trace` to locate an overlap and inspect rejected moves near it. Pass `--output-dir /tmp/inire-trace` for a scratch capture. Select any built-in trace case by name with `--scenario`. For isolated timing gates, run `INIRE_RUN_PERFORMANCE=1 python -m pytest -q inire/tests/test_example_performance.py`. Use `scripts.record_performance_baseline` with `--output-dir` to record a snapshot. Use `scripts.diff_performance_baseline` to compare a fresh run with the archived baseline, or pass `--baseline` to select a different snapshot. Use `--metric` to select counters. [Routing development archive](../archive/routing/README.md) diff --git a/inire/geometry/collision.py b/inire/geometry/collision.py index dd6f166..db72927 100644 --- a/inire/geometry/collision.py +++ b/inire/geometry/collision.py @@ -142,12 +142,6 @@ class RoutingWorld: def _ensure_static_raw_tree(self) -> None: self._static_obstacles.ensure_raw_tree() - def _ensure_dynamic_tree(self) -> None: - self._dynamic_paths.ensure_tree() - - def _ensure_dynamic_grid(self) -> None: - self._dynamic_paths.ensure_grid() - def add_path( self, net_id: str, @@ -349,10 +343,6 @@ class RoutingWorld: if not dynamic_paths.dilated: return {} - self._ensure_dynamic_grid() - if not dynamic_paths.grid: - return {} - candidates_by_net: dict[str, dict[int, set[int]]] = {} for test_geometry_index, test_bounds in enumerate(result.dilated_bounds): if not self._has_possible_congestion_in_grid(test_bounds, net_id): @@ -407,16 +397,16 @@ class RoutingWorld: net_id: str, ) -> bool: gx_min, gy_min, gx_max, gy_max = grid_cell_span(bounds, self.grid_cell_size) - dynamic_paths = self._dynamic_paths + cells = self._dynamic_paths.grid_net_obj_ids if gx_min == gx_max and gy_min == gy_max: - net_counts = dynamic_paths.grid_net_counts.get((gx_min, gy_min)) - return bool(net_counts and (len(net_counts) > 1 or net_id not in net_counts)) + members = cells.get((gx_min, gy_min)) + return bool(members and (len(members) > 1 or net_id not in members)) for gx in range(gx_min, gx_max + 1): for gy in range(gy_min, gy_max + 1): - net_counts = dynamic_paths.grid_net_counts.get((gx, gy)) - if net_counts and (len(net_counts) > 1 or net_id not in net_counts): + members = cells.get((gx, gy)) + if members and (len(members) > 1 or net_id not in members): return True return False @@ -430,10 +420,6 @@ class RoutingWorld: if not dynamic_paths.dilated: return False - self._ensure_dynamic_grid() - if not dynamic_paths.grid: - return False - for bounds in result.dilated_bounds: gx_min, gy_min, gx_max, gy_max = grid_cell_span(bounds, self.grid_cell_size) cache_key = (net_id, gx_min, gy_min, gx_max, gy_max) diff --git a/inire/geometry/dynamic_path_index.py b/inire/geometry/dynamic_path_index.py index a0807f8..778bbef 100644 --- a/inire/geometry/dynamic_path_index.py +++ b/inire/geometry/dynamic_path_index.py @@ -1,13 +1,10 @@ from __future__ import annotations -from contextlib import suppress from typing import TYPE_CHECKING -import numpy import rtree -from shapely.strtree import STRtree -from inire.geometry.index_helpers import build_index_payload, iter_grid_cells +from inire.geometry.index_helpers import iter_grid_cells if TYPE_CHECKING: from collections.abc import Sequence @@ -29,16 +26,10 @@ class DynamicPathIndex: "net_envelopes", "net_envelope_obj_ids", "net_envelope_obj_to_net", - "tree", - "obj_ids", - "grid", "grid_net_obj_ids", - "grid_net_counts", "obj_cells", "net_to_obj_ids", "id_counter", - "net_ids_array", - "bounds_array", ) def __init__(self, engine: RoutingWorld) -> None: @@ -52,16 +43,10 @@ class DynamicPathIndex: self.net_envelopes: dict[str, tuple[float, float, float, float]] = {} self.net_envelope_obj_ids: dict[str, int] = {} self.net_envelope_obj_to_net: dict[int, str] = {} - self.tree: STRtree | None = None - self.obj_ids: numpy.ndarray = numpy.array([], dtype=numpy.int32) - self.grid: dict[tuple[int, int], list[int]] = {} self.grid_net_obj_ids: dict[tuple[int, int], dict[str, set[int]]] = {} - self.grid_net_counts: dict[tuple[int, int], dict[str, int]] = {} self.obj_cells: dict[int, tuple[tuple[int, int], ...]] = {} self.net_to_obj_ids: dict[str, set[int]] = {} self.id_counter = 0 - self.net_ids_array = numpy.array([], dtype=object) - self.bounds_array = numpy.array([], dtype=numpy.float64).reshape(0, 4) def _combine_net_bounds(self, obj_ids: set[int]) -> tuple[float, float, float, float]: first_obj_id = next(iter(obj_ids)) @@ -104,34 +89,6 @@ class DynamicPathIndex: return self._set_net_envelope(net_id, self._combine_net_bounds(obj_ids)) - def invalidate_queries(self) -> None: - self.tree = None - self.grid = {} - self.grid_net_obj_ids = {} - self.grid_net_counts = {} - self.obj_cells = {} - - def ensure_tree(self) -> None: - if self.tree is None and self.dilated: - if self.engine.metrics is not None: - self.engine.metrics.total_dynamic_tree_rebuilds += 1 - ids, geometries, bounds_array = build_index_payload(self.dilated) - self.tree = STRtree(geometries) - self.obj_ids = numpy.array(ids, dtype=numpy.int32) - self.bounds_array = bounds_array - net_ids = [self.geometries[obj_id][0] for obj_id in self.obj_ids] - self.net_ids_array = numpy.array(net_ids, dtype=object) - - def ensure_grid(self) -> None: - if self.grid or not self.dilated: - return - - if self.engine.metrics is not None: - self.engine.metrics.total_dynamic_grid_rebuilds += 1 - cell_size = self.engine.grid_cell_size - for obj_id, polygon in self.dilated.items(): - self._register_grid_membership(obj_id, self.geometries[obj_id][0], polygon.bounds, cell_size=cell_size) - def _register_grid_membership( self, obj_id: int, @@ -143,39 +100,17 @@ class DynamicPathIndex: cells = tuple(iter_grid_cells(bounds, cell_size)) self.obj_cells[obj_id] = cells for cell in cells: - self.grid.setdefault(cell, []).append(obj_id) - net_obj_ids = self.grid_net_obj_ids.setdefault(cell, {}) - net_obj_ids.setdefault(net_id, set()).add(obj_id) - net_counts = self.grid_net_counts.setdefault(cell, {}) - net_counts[net_id] = net_counts.get(net_id, 0) + 1 + self.grid_net_obj_ids.setdefault(cell, {}).setdefault(net_id, set()).add(obj_id) def _unregister_grid_membership(self, obj_id: int, net_id: str) -> None: - cells = self.obj_cells.pop(obj_id, ()) - for cell in cells: - obj_ids = self.grid.get(cell) - if obj_ids is not None: - with suppress(ValueError): - obj_ids.remove(obj_id) - if not obj_ids: - self.grid.pop(cell, None) - net_obj_ids = self.grid_net_obj_ids.get(cell) - if net_obj_ids is not None: - member_ids = net_obj_ids.get(net_id) - if member_ids is not None: - member_ids.discard(obj_id) - if not member_ids: - net_obj_ids.pop(net_id, None) - if not net_obj_ids: - self.grid_net_obj_ids.pop(cell, None) - net_counts = self.grid_net_counts.get(cell) - if net_counts is not None: - remaining = net_counts.get(net_id, 0) - 1 - if remaining > 0: - net_counts[net_id] = remaining - else: - net_counts.pop(net_id, None) - if not net_counts: - self.grid_net_counts.pop(cell, None) + for cell in self.obj_cells.pop(obj_id): + net_obj_ids = self.grid_net_obj_ids[cell] + member_ids = net_obj_ids[net_id] + member_ids.remove(obj_id) + if not member_ids: + del net_obj_ids[net_id] + if not net_obj_ids: + del self.grid_net_obj_ids[cell] def add_path( self, @@ -200,7 +135,6 @@ class DynamicPathIndex: self.net_to_obj_ids.setdefault(net_id, set()).add(obj_id) self._register_grid_membership(obj_id, net_id, dilated_bounds, cell_size=cell_size) self._refresh_net_envelope(net_id) - self.tree = None def remove_path(self, net_id: str) -> None: to_remove = list(self.net_to_obj_ids.get(net_id, ())) @@ -229,4 +163,3 @@ class DynamicPathIndex: self.net_to_obj_ids.pop(net_id, None) for net_id in affected_nets: self._refresh_net_envelope(net_id) - self.tree = None diff --git a/inire/router/_automatic.py b/inire/router/_automatic.py index 156c2d3..6002a22 100644 --- a/inire/router/_automatic.py +++ b/inire/router/_automatic.py @@ -391,7 +391,7 @@ class _AutomaticRun: policy = "incumbent-residual" locks = LockPlan(retained) - run, stage = _route_residual(problem, options, "direct-seed", locks, run_route=partial(self._run, policy=policy)) + run, stage = _route_residual(problem, options, locks, residual_mode="seed", run_route=partial(self._run, policy=policy)) stage = replace(stage, kind=policy, policy=policy, retry_reason="Residual terminals remain connected with the incumbents locked") trial = self._trial(run, stage) if len(trial.valid_costs) == len(problem.nets): @@ -580,7 +580,7 @@ class _AutomaticRun: return None retry = replace(options, congestion=replace(options.congestion, max_iterations=min(3, options.congestion.max_iterations))) run, stage = _route_residual( - self.problem, retry, "direct-seed", locks, run_route=partial(self._run, policy=policy, corridors=corridors) + self.problem, retry, locks, residual_mode="seed", run_route=partial(self._run, policy=policy, corridors=corridors) ) stage = replace( stage, diff --git a/inire/router/_router.py b/inire/router/_router.py index 53bf2f6..31bf5a0 100644 --- a/inire/router/_router.py +++ b/inire/router/_router.py @@ -382,21 +382,15 @@ class PathFinder: if result and result.path and (result.reached_target or not state.corridors): self._install_path(net_id, result.path) - def _analyze_restored_best( - self, - state: _RoutingState, - ) -> tuple[dict[str, PathVerificationDetail], _IterationReview]: - capture_component_conflicts = ( - self.context.options.diagnostics.capture_conflict_trace - or self.context.options.diagnostics.capture_pre_pair_frontier_trace - ) + def _review_restored_best(self, state: _RoutingState) -> _IterationReview: + diagnostics = self.context.options.diagnostics state.results, details_by_net, review = self._analyze_results( state.ordered_net_ids, state.results, - capture_component_conflicts=capture_component_conflicts, + capture_component_conflicts=diagnostics.capture_conflict_trace or diagnostics.capture_pre_pair_frontier_trace, count_iteration_metrics=False, ) - if self.context.options.diagnostics.capture_conflict_trace: + if diagnostics.capture_conflict_trace: self._capture_conflict_trace_entry( state, stage="restored_best", @@ -405,13 +399,13 @@ class PathFinder: details_by_net=details_by_net, review=review, ) - if self.context.options.diagnostics.capture_pre_pair_frontier_trace: + if diagnostics.capture_pre_pair_frontier_trace: self.pre_pair_frontier_trace = self._materialize_pre_pair_frontier_trace( state, state.results, details_by_net, ) - return details_by_net, review + return review def _update_best_iteration(self, state: _RoutingState, review: _IterationReview) -> bool: completed_nets = len(review.completed_net_ids) @@ -874,13 +868,7 @@ class PathFinder: self._replace_installed_paths(state, incumbent_results) return incumbent_review - def _run_pair_local_search(self, state: _RoutingState) -> None: - state.results, _details_by_net, review = self._analyze_results( - state.ordered_net_ids, - state.results, - capture_component_conflicts=True, - count_iteration_metrics=False, - ) + def _run_pair_local_search(self, state: _RoutingState, review: _IterationReview) -> None: targets = self._collect_pair_local_targets(state, state.results, review) if not targets: return @@ -1192,10 +1180,13 @@ class PathFinder: timed_out = self._run_iterations(state, iteration_callback) self.accumulated_expanded_nodes = list(state.accumulated_expanded_nodes) self._restore_best_iteration(state) - self._analyze_restored_best(state) + diagnostics = self.context.options.diagnostics + if not timed_out or diagnostics.capture_conflict_trace or diagnostics.capture_pre_pair_frontier_trace: + review = self._review_restored_best(state) + if not timed_out: + self._run_pair_local_search(state, review) if not timed_out: - self._run_pair_local_search(state) with phase_timer("refine") if phase_timer is not None and self.context.options.refinement.enabled else nullcontext(): self._refine_results(state) with phase_timer("verify") if phase_timer is not None else nullcontext(): diff --git a/inire/router/_routing_policy.py b/inire/router/_routing_policy.py index 198b1ae..e3bc0f6 100644 --- a/inire/router/_routing_policy.py +++ b/inire/router/_routing_policy.py @@ -33,33 +33,6 @@ class RouteCall(Protocol): def __call__(self, problem: RoutingProblem, *, options: RoutingOptions) -> RoutingRunResult: ... -@dataclass(frozen=True, slots=True) -class _DirectPolicy: - residual_mode: Literal["guide", "seed"] | None = None - check_connectivity: bool = False - reorder_disconnected: bool = False - split_budget: bool = False - probe: Literal["first", "near-port", "after"] | None = None - retry_unresolved: bool = False - - -_LOOKAHEAD_RETRY = _DirectPolicy(check_connectivity=True, reorder_disconnected=True, split_budget=True) -_DIRECT_POLICY_SETTINGS = { - "direct-guide": _DirectPolicy(residual_mode="guide"), - "direct-seed": _DirectPolicy(residual_mode="seed"), - "direct-adaptive": _DirectPolicy(), - "direct-adaptive-retry": _DirectPolicy(retry_unresolved=True), - "direct-cull": _DirectPolicy(check_connectivity=True), - "direct-lookahead": _DirectPolicy(check_connectivity=True, reorder_disconnected=True), - "direct-budgeted-retry": _DirectPolicy(split_budget=True), - "direct-lookahead-retry": _LOOKAHEAD_RETRY, - "direct-probe-first": replace(_LOOKAHEAD_RETRY, probe="first"), - "direct-probe-near-port": replace(_LOOKAHEAD_RETRY, probe="near-port"), - "direct-probe-after": replace(_LOOKAHEAD_RETRY, probe="after"), -} -DIRECT_POLICIES = tuple(_DIRECT_POLICY_SETTINGS) - - @dataclass(frozen=True, slots=True) class LockPlan: direct: dict[str, RoutingResult] @@ -176,15 +149,48 @@ def _plan_locks( problem: RoutingProblem, board: Polygon, options: RoutingOptions, - policy: _DirectPolicy, *, + check_connectivity: bool = True, priority: frozenset[str] = frozenset(), ) -> LockPlan: direct = _direct_paths(problem, board, options, priority=priority) - disconnected = _disconnected_nets(problem, board, options, direct) if direct and policy.check_connectivity else frozenset() + disconnected = _disconnected_nets(problem, board, options, direct) if direct and check_connectivity else frozenset() return LockPlan(direct, disconnected) +def _prefer_connected_locks(problem: RoutingProblem, board: Polygon, options: RoutingOptions, locks: LockPlan) -> LockPlan: + if not locks.disconnected: + return locks + candidate = _plan_locks(problem, board, options, priority=locks.disconnected) + return candidate if len(candidate.disconnected) < len(locks.disconnected) else locks + + +def _alternate_locks( + problem: RoutingProblem, + board: Polygon, + options: RoutingOptions, + locks: LockPlan, + *, + check_connectivity: bool = True, +) -> LockPlan | None: + if not 0 < len(locks.direct) < len(problem.nets) or options.search.node_limit <= 1: + return None + priority = frozenset(net.net_id for net in problem.nets if net.net_id not in locks.direct) + candidate = _plan_locks(problem, board, options, check_connectivity=check_connectivity, priority=priority) + if candidate.direct.keys() != locks.direct.keys() and len(candidate.disconnected) <= len(locks.disconnected): + return candidate + return None + + +def _split_search_budget(options: RoutingOptions, probe_limit: int) -> tuple[RoutingOptions, RoutingOptions]: + remaining = options.search.node_limit - probe_limit + first_limit = remaining // 2 + return ( + replace(options, search=replace(options.search, node_limit=first_limit)), + replace(options, search=replace(options.search, node_limit=remaining - first_limit)), + ) + + def _residual_problem(problem: RoutingProblem, locks: LockPlan) -> RoutingProblem: if not locks.direct and not locks.disconnected: return problem @@ -196,15 +202,14 @@ def _residual_problem(problem: RoutingProblem, locks: LockPlan) -> RoutingProble def _route_residual( problem: RoutingProblem, options: RoutingOptions, - policy: str, locks: LockPlan, *, + residual_mode: Literal["guide", "seed"] | None = None, run_route: RouteCall = route_once, ) -> tuple[RoutingRunResult, RoutingStage]: direct = locks.direct problem = _residual_problem(problem, locks) residual = problem.nets - residual_mode = _DIRECT_POLICY_SETTINGS[policy].residual_mode if not residual: mode = "off" elif residual_mode is not None: @@ -227,11 +232,7 @@ def _route_residual( ) -def _length(result: RoutingResult) -> float: - return sum(component.length for component in result.path) - - -def _trial(run: RoutingRunResult, stage: RoutingStage, board: Polygon, *, score: Scorer = _length) -> Trial: +def _trial(run: RoutingRunResult, stage: RoutingStage, board: Polygon, *, score: Scorer) -> Trial: outside = tuple( net_id for net_id, result in run.results_by_net.items() @@ -292,65 +293,33 @@ def _direct_trials( options: RoutingOptions, strategy: str, *, + check_trial: CheckTrial, run_route: RouteCall = route_once, - score: Scorer = _length, - check_trial: CheckTrial | None = None, ) -> list[Trial]: def check(run: RoutingRunResult, stage: RoutingStage) -> Trial: - stage = replace(stage, policy=strategy) - return _trial(run, stage, board, score=score) if check_trial is None else check_trial(run, stage) + return check_trial(run, replace(stage, policy=strategy)) - policy = _DIRECT_POLICY_SETTINGS[strategy] - locks = _plan_locks(problem, board, options, policy) - if locks.disconnected and policy.reorder_disconnected: - candidate = _plan_locks(problem, board, options, policy, priority=locks.disconnected) - if len(candidate.disconnected) < len(locks.disconnected): - locks = candidate - - first_options = retry_options = options - retry_locks = None + locks = _prefer_connected_locks(problem, board, options, _plan_locks(problem, board, options)) + retry_locks = _alternate_locks(problem, board, options, locks) + first_options = options + retry_options = options probe_limit = 0 - can_reorder = 0 < len(locks.direct) < len(problem.nets) - if can_reorder and policy.split_budget and options.search.node_limit > 1: - priority = frozenset(net.net_id for net in problem.nets if net.net_id not in locks.direct) - candidate = _plan_locks(problem, board, options, policy, priority=priority) - if candidate.direct.keys() != locks.direct.keys() and len(candidate.disconnected) <= len(locks.disconnected): - retry_locks = candidate - limit = options.search.node_limit - if policy.probe is not None and ( - policy.probe != "near-port" or _lock_near_new_port(problem, options, locks, retry_locks) - ): - probe_limit = min(32, limit // 3) - remaining = limit - probe_limit - first_limit = remaining // 2 - first_options = replace(options, search=replace(options.search, node_limit=first_limit)) - retry_options = replace(options, search=replace(options.search, node_limit=remaining - first_limit)) + if retry_locks is not None: + if strategy == "direct-probe-near-port" and _lock_near_new_port(problem, options, locks, retry_locks): + probe_limit = min(32, options.search.node_limit // 3) + first_options, retry_options = _split_search_budget(options, probe_limit) trials = [] - if probe_limit and policy.probe in ("first", "near-port"): + if probe_limit: probe = _lattice_probe(problem, options, probe_limit, run_route=run_route, check_trial=check) trials.append(probe) if len(probe.valid_costs) == len(problem.nets): return trials - first = check(*_route_residual(problem, first_options, strategy, locks, run_route=run_route)) + first = check(*_route_residual(problem, first_options, locks, run_route=run_route)) trials.append(first) - if len(first.valid_costs) == len(problem.nets): - return trials - - if probe_limit and policy.probe == "after": - probe = _lattice_probe(problem, options, probe_limit, run_route=run_route, check_trial=check) - trials.append(probe) - if len(probe.valid_costs) == len(problem.nets): - return trials - - if policy.retry_unresolved and can_reorder: - unresolved = frozenset(first.run.results_by_net.keys() - first.valid_costs.keys()) - candidate = _plan_locks(problem, board, options, policy, priority=unresolved) - if candidate.direct.keys() != locks.direct.keys(): - retry_locks = candidate - if retry_locks is not None: - trials.append(check(*_route_residual(problem, retry_options, strategy, retry_locks, run_route=run_route))) + if retry_locks is not None and len(first.valid_costs) < len(problem.nets): + trials.append(check(*_route_residual(problem, retry_options, retry_locks, run_route=run_route))) return trials diff --git a/inire/tests/direct_routing_policies.py b/inire/tests/direct_routing_policies.py new file mode 100644 index 0000000..8820c68 --- /dev/null +++ b/inire/tests/direct_routing_policies.py @@ -0,0 +1,109 @@ +"""Direct routing policies available through the benchmark CLI.""" + +from __future__ import annotations + +from dataclasses import dataclass, replace +from functools import partial +from typing import TYPE_CHECKING + +from inire.router._routing_policy import ( + _alternate_locks, + _direct_trials, + _lattice_probe, + _plan_locks, + _prefer_connected_locks, + _route_residual, + _split_search_budget, + _trial, +) +from inire.router._stack import route_once +from inire.tests.routing_corpus import benchmark_weighted_length + +if TYPE_CHECKING: + from typing import Literal + + from shapely.geometry import Polygon + + from inire import RoutingOptions, RoutingProblem, RoutingRunResult, RoutingStage + from inire.router._routing_policy import LockPlan, Trial + + +@dataclass(frozen=True, slots=True) +class _DirectExperiment: + residual_mode: Literal["guide", "seed"] | None = None + check_connectivity: bool = False + reorder_disconnected: bool = False + split_budget: bool = False + probe: Literal["first", "after"] | None = None + retry_unresolved: bool = False + + +_LOOKAHEAD = _DirectExperiment(check_connectivity=True, reorder_disconnected=True) +# The two None entries use the shipped retry sequence. +_EXPERIMENTS = { + "direct-guide": _DirectExperiment(residual_mode="guide"), + "direct-seed": _DirectExperiment(residual_mode="seed"), + "direct-adaptive": _DirectExperiment(), + "direct-adaptive-retry": _DirectExperiment(retry_unresolved=True), + "direct-cull": _DirectExperiment(check_connectivity=True), + "direct-lookahead": _LOOKAHEAD, + "direct-budgeted-retry": _DirectExperiment(split_budget=True), + "direct-lookahead-retry": None, + "direct-probe-first": replace(_LOOKAHEAD, split_budget=True, probe="first"), + "direct-probe-near-port": None, + "direct-probe-after": replace(_LOOKAHEAD, split_budget=True, probe="after"), +} +DIRECT_POLICIES = tuple(_EXPERIMENTS) + + +def direct_trials(problem: RoutingProblem, board: Polygon, options: RoutingOptions, strategy: str) -> list[Trial]: + experiment = _EXPERIMENTS[strategy] + summarize = partial(_trial, board=board, score=benchmark_weighted_length) + if experiment is None: + return _direct_trials(problem, board, options, strategy, check_trial=summarize) + + def check(run: RoutingRunResult, stage: RoutingStage) -> Trial: + return summarize(run, replace(stage, policy=strategy)) + + def run_residual(worker: RoutingOptions, locks: LockPlan) -> Trial: + return check(*_route_residual(problem, worker, locks, residual_mode=experiment.residual_mode)) + + plan = partial(_plan_locks, problem, board, options, check_connectivity=experiment.check_connectivity) + locks = plan() + if experiment.reorder_disconnected: + locks = _prefer_connected_locks(problem, board, options, locks) + + first_options = options + retry_options = options + retry_locks = None + probe_limit = 0 + if experiment.split_budget: + retry_locks = _alternate_locks(problem, board, options, locks, check_connectivity=experiment.check_connectivity) + if retry_locks is not None: + probe_limit = min(32, options.search.node_limit // 3) if experiment.probe else 0 + first_options, retry_options = _split_search_budget(options, probe_limit) + + trials = [] + if probe_limit and experiment.probe == "first": + trials.append(_lattice_probe(problem, options, probe_limit, run_route=route_once, check_trial=check)) + if len(trials[-1].valid_costs) == len(problem.nets): + return trials + + first = run_residual(first_options, locks) + trials.append(first) + if len(first.valid_costs) == len(problem.nets): + return trials + + if probe_limit and experiment.probe == "after": + trials.append(_lattice_probe(problem, options, probe_limit, run_route=route_once, check_trial=check)) + if len(trials[-1].valid_costs) == len(problem.nets): + return trials + + if experiment.retry_unresolved and 0 < len(locks.direct) < len(problem.nets): + unresolved = frozenset(first.run.results_by_net.keys() - first.valid_costs.keys()) + candidate = plan(priority=unresolved) + if candidate.direct.keys() != locks.direct.keys(): + retry_locks = candidate + if retry_locks is not None: + trials.append(run_residual(retry_options, retry_locks)) + return trials diff --git a/inire/tests/example_scenarios.py b/inire/tests/example_scenarios.py index 9489d98..32fea64 100644 --- a/inire/tests/example_scenarios.py +++ b/inire/tests/example_scenarios.py @@ -26,6 +26,7 @@ from inire.geometry.primitives import Port from inire.results import RouteMetrics, _sum_route_metrics from inire.router._astar_types import AStarContext, AStarMetrics from inire.router._router import PathFinder +from inire.router._stack import build_routing_stack from inire.router.cost import CostEvaluator from inire.router.danger_map import DangerMap from inire.tests.routing_corpus import SNAPSHOT_CASES, profile_options @@ -455,54 +456,59 @@ def _build_example_07_variant_stack( capture_pre_pair_frontier_trace: bool = False, ) -> tuple[CostEvaluator, AStarMetrics, PathFinder]: bounds = (0, 0, 1000, 1000) - obstacles = [ + obstacles = ( box(450, 0, 550, 400), box(450, 600, 550, 1000), - ] + ) start_x = 50 start_y_base = 500 - (num_nets * 10.0) / 2.0 end_x = 950 end_y_base = 100 end_y_pitch = 800.0 / (num_nets - 1) - netlist = {} + nets = [] for index in range(num_nets): sy = int(round(start_y_base + index * 10.0)) ey = int(round(end_y_base + index * end_y_pitch)) - netlist[f"net_{index:02d}"] = (Port(start_x, sy, 0), Port(end_x, ey, 0)) - widths = dict.fromkeys(netlist, 2.0) - _, evaluator, metrics, pathfinder = _build_routing_stack( + nets.append(NetSpec(f"net_{index:02d}", Port(start_x, sy, 0), Port(end_x, ey, 0))) + problem = RoutingProblem( bounds=bounds, - netlist=netlist, - widths=widths, + nets=tuple(nets), + static_obstacles=obstacles, clearance=6.0, - obstacles=obstacles, - evaluator_kwargs={ - "greedy_h_weight": 1.5, - "unit_length_cost": 0.1, - "bend_penalty": 100.0, - "sbend_penalty": 400.0, - }, - request_kwargs={ - "node_limit": 2000000, - "bend_radii": [50.0], - "sbend_radii": [50.0], - "bend_clip_margin": 10.0, - "max_iterations": 15, - "base_penalty": 100.0, - "multiplier": 1.4, - "net_order": "shortest", - "capture_expanded": True, - "capture_conflict_trace": capture_conflict_trace, - "capture_frontier_trace": capture_frontier_trace, - "capture_iteration_trace": capture_iteration_trace, - "capture_pre_pair_frontier_trace": capture_pre_pair_frontier_trace, - "shuffle_nets": True, - "seed": seed, - "warm_start_enabled": warm_start_enabled, - }, ) - return evaluator, metrics, pathfinder + options = RoutingOptions( + search=SearchOptions( + node_limit=2_000_000, + bend_radii=(50.0,), + sbend_radii=(50.0,), + greedy_h_weight=1.5, + bend_clip_margin=10.0, + ), + objective=ObjectiveWeights( + unit_length_cost=0.1, + bend_penalty=100.0, + sbend_penalty=400.0, + ), + congestion=CongestionOptions( + max_iterations=15, + base_penalty=100.0, + multiplier=1.4, + net_order="shortest", + shuffle_nets=True, + seed=seed, + warm_start_enabled=warm_start_enabled, + ), + diagnostics=DiagnosticsOptions( + capture_expanded=True, + capture_conflict_trace=capture_conflict_trace, + capture_frontier_trace=capture_frontier_trace, + capture_iteration_trace=capture_iteration_trace, + capture_pre_pair_frontier_trace=capture_pre_pair_frontier_trace, + ), + ) + stack = build_routing_stack(problem, options) + return stack.evaluator, stack.finder.metrics, stack.finder def _run_example_07_variant( diff --git a/inire/tests/test_api.py b/inire/tests/test_api.py index 46a0d76..eece699 100644 --- a/inire/tests/test_api.py +++ b/inire/tests/test_api.py @@ -519,7 +519,7 @@ def test_reverify_iterations_limit_late_reroutes_to_conflicting_nets(monkeypatch monkeypatch.setattr(PathFinder, "_run_iteration", fake_run_iteration) monkeypatch.setattr(PathFinder, "_verify_results", lambda self, state: (dict(state.results), {})) - monkeypatch.setattr(PathFinder, "_run_pair_local_search", lambda self, state: None) + monkeypatch.setattr(PathFinder, "_run_pair_local_search", lambda self, state, review: None) results = pathfinder.route_all() diff --git a/inire/tests/test_collision.py b/inire/tests/test_collision.py index 02ed644..711d6bf 100644 --- a/inire/tests/test_collision.py +++ b/inire/tests/test_collision.py @@ -335,7 +335,7 @@ def test_dynamic_grid_updates_incrementally_on_add_and_remove() -> None: dynamic_paths = engine._dynamic_paths assert dynamic_paths.net_to_obj_ids["netA"] assert dynamic_paths.net_to_obj_ids["netB"] - assert dynamic_paths.grid + assert dynamic_paths.grid_net_obj_ids assert engine.metrics.total_dynamic_grid_rebuilds == 0 engine.remove_path("netA") diff --git a/inire/tests/test_example_regressions.py b/inire/tests/test_example_regressions.py index c7a10d9..68ce4d4 100644 --- a/inire/tests/test_example_regressions.py +++ b/inire/tests/test_example_regressions.py @@ -17,6 +17,7 @@ from inire.seeds import Bend90Seed, PathSeed, StraightSeed from inire.tests.example_scenarios import ( SCENARIOS, _build_evaluator, + _build_example_07_variant_stack, _build_pathfinder, _net_specs, AStarMetrics, @@ -52,6 +53,15 @@ def test_example_05_avoids_dynamic_tree_rebuilds() -> None: assert snapshot.metrics.dynamic_tree_rebuilds == 0 +def test_example_07_variant_uses_one_configuration() -> None: + evaluator, _, finder = _build_example_07_variant_stack(num_nets=10, seed=42, warm_start_enabled=False) + world = evaluator.collision_engine + + assert finder.context.options.objective == evaluator.default_weights + assert finder.context.problem.clearance == world.clearance == 6.0 + assert finder.context.problem.static_obstacles == tuple(world.iter_static_geometries()) + + def test_example_07_no_warm_start_canary_improves_validity() -> None: snapshot = snapshot_example_07_no_warm_start() diff --git a/inire/tests/test_performance_reporting.py b/inire/tests/test_performance_reporting.py index 9ded29a..e0c5c56 100644 --- a/inire/tests/test_performance_reporting.py +++ b/inire/tests/test_performance_reporting.py @@ -244,7 +244,6 @@ def test_record_conflict_trace_script_supports_performance_only_scenario(tmp_pat str(script_path), "--output-dir", str(tmp_path), - "--include-performance-only", "--scenario", "example_07_large_scale_routing_no_warm_start", ], @@ -286,7 +285,6 @@ def test_record_iteration_trace_script_writes_selected_scenario(tmp_path: Path) [ sys.executable, str(script_path), - "--include-performance-only", "--scenario", "example_07_large_scale_routing_no_warm_start", "--output-dir", @@ -310,7 +308,6 @@ def test_record_pre_pair_frontier_trace_script_writes_selected_scenario(tmp_path [ sys.executable, str(script_path), - "--include-performance-only", "--scenario", "example_07_large_scale_routing_no_warm_start", "--output-dir", diff --git a/inire/tests/trace_recording.py b/inire/tests/trace_recording.py index 5e86dde..6b7483a 100644 --- a/inire/tests/trace_recording.py +++ b/inire/tests/trace_recording.py @@ -43,7 +43,6 @@ def record_trace( ) -> None: parser = ArgumentParser(description=f"Record {name.replace('_', '-')} artifacts for selected trace scenarios.") parser.add_argument("--scenario", action="append", help="Trace scenario name. Repeat to select multiple scenarios.") - parser.add_argument("--include-performance-only", action="store_true", help="Accept performance-only scenario names.") parser.add_argument("--output-dir", type=Path, help=f"Directory for {name}.json and {name}.md. Defaults to /archive/routing.") args = parser.parse_args() diff --git a/scripts/benchmark_retry_order.py b/scripts/benchmark_retry_order.py index 11f30e1..1042b1e 100644 --- a/scripts/benchmark_retry_order.py +++ b/scripts/benchmark_retry_order.py @@ -155,7 +155,7 @@ class _RetryExperiment(_AutomaticRun): topology=replace(options.topology, seed_node_limit=max(limit, options.topology.seed_node_limit)), congestion=replace(options.congestion, max_iterations=min(2, options.congestion.max_iterations)), ) - run, stage = _route_residual(self.problem, retry, "direct-seed", LockPlan(retained), run_route=partial(self._run, policy=policy)) + run, stage = _route_residual(self.problem, retry, LockPlan(retained), residual_mode="seed", run_route=partial(self._run, policy=policy)) trial = self._trial(run, replace(stage, kind=policy, policy=policy, incumbent_net_ids=tuple(retained))) trials = [replace(trial, selection="requires-layout-check")] complete = False diff --git a/scripts/compare_topological_routing.py b/scripts/compare_topological_routing.py index 783c905..fd0cb1b 100644 --- a/scripts/compare_topological_routing.py +++ b/scripts/compare_topological_routing.py @@ -17,9 +17,10 @@ import shapely from shapely.geometry import box, mapping from inire import RoutingOptions, RoutingStage, route -from inire.router._routing_policy import DIRECT_POLICIES, _best_trial -from inire.router._routing_policy import _direct_trials as _run_direct_trials +from inire.router._routing_policy import _best_trial from inire.router._routing_policy import _trial as _summarize_trial +from inire.tests.direct_routing_policies import DIRECT_POLICIES +from inire.tests.direct_routing_policies import direct_trials as _direct_trials from inire.tests.routing_corpus import ( AUTOMATIC_POLICIES, CASE_GROUPS, @@ -67,7 +68,6 @@ class RunSample: _trial = partial(_summarize_trial, score=benchmark_weighted_length) -_direct_trials = partial(_run_direct_trials, score=benchmark_weighted_length) def _mode_options(options: RoutingOptions, strategy: str, profile: str = "matched-budget") -> RoutingOptions: