diff --git a/DOCS.md b/DOCS.md index 28280e2..d70cd8c 100644 --- a/DOCS.md +++ b/DOCS.md @@ -272,7 +272,7 @@ Separately from the observational trace tooling, the router may run a bounded po Lower-level search and collision modules are semi-private implementation details. They remain accessible through deep imports for advanced use, but they are unstable and may change without notice. The stable supported entrypoint is `route(problem, options=...)`. The current implementation structure is summarized in **[docs/architecture.md](docs/architecture.md)**. The committed example-corpus counter baseline is tracked in **[docs/performance.md](docs/performance.md)**. -Use `scripts/diff_performance_baseline.py` to compare a fresh local run against that baseline. Use `scripts/record_conflict_trace.py` for opt-in conflict-hotspot traces and `scripts/record_frontier_trace.py` for hotspot-adjacent prune traces. The counter baseline is currently observational and is not enforced as a CI gate. +Use `scripts/diff_performance_baseline.py` to compare a fresh local run against that baseline. Use `scripts/record_conflict_trace.py` for opt-in conflict-hotspot traces, `scripts/record_frontier_trace.py` for hotspot-adjacent prune traces, and `scripts/characterize_pair_local_search.py` to sweep example_07-style no-warm runs for pair-local repair behavior. The counter baseline is currently observational and is not enforced as a CI gate. ## 11. Tuning Notes diff --git a/docs/pair_local_characterization.json b/docs/pair_local_characterization.json new file mode 100644 index 0000000..160ca48 --- /dev/null +++ b/docs/pair_local_characterization.json @@ -0,0 +1,2108 @@ +{ + "cases": [ + { + "duration_s": 0.5461949198506773, + "metrics": { + "congestion_cache_hits": 8, + "congestion_cache_misses": 674, + "congestion_candidate_ids": 1105, + "congestion_candidate_nets": 1045, + "congestion_candidate_precheck_hits": 266, + "congestion_candidate_precheck_misses": 416, + "congestion_candidate_precheck_skips": 0, + "congestion_check_calls": 674, + "congestion_exact_pair_checks": 952, + "congestion_grid_net_cache_hits": 287, + "congestion_grid_net_cache_misses": 755, + "congestion_grid_span_cache_hits": 251, + "congestion_grid_span_cache_misses": 375, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 308, + "congestion_net_envelope_cache_misses": 807, + "congestion_presence_cache_hits": 282, + "congestion_presence_cache_misses": 475, + "congestion_presence_skips": 75, + "danger_map_cache_hits": 3159, + "danger_map_cache_misses": 1632, + "danger_map_lookup_calls": 4791, + "danger_map_query_calls": 1632, + "danger_map_total_ns": 46195989, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 131, + "dynamic_path_objects_removed": 106, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 3312.5, + "guidance_bonus_applied_bend90": 1187.5, + "guidance_bonus_applied_sbend": 375.0, + "guidance_bonus_applied_straight": 1750.0, + "guidance_match_moves": 53, + "guidance_match_moves_bend90": 19, + "guidance_match_moves_sbend": 6, + "guidance_match_moves_straight": 28, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 18, + "iteration_conflicting_nets": 21, + "iteration_reverified_nets": 24, + "iteration_reverify_calls": 4, + "move_cache_abs_hits": 459, + "move_cache_abs_misses": 2216, + "move_cache_rel_hits": 2062, + "move_cache_rel_misses": 154, + "moves_added": 1597, + "moves_generated": 2675, + "nets_carried_forward": 0, + "nets_reached_target": 24, + "nets_routed": 24, + "nodes_expanded": 500, + "pair_local_search_accepts": 0, + "pair_local_search_attempts": 0, + "pair_local_search_nodes_expanded": 0, + "pair_local_search_pairs_considered": 0, + "path_cost_calls": 0, + "pruned_closed_set": 174, + "pruned_cost": 904, + "pruned_hard_collision": 0, + "ray_cast_calls": 1780, + "ray_cast_calls_expand_forward": 476, + "ray_cast_calls_expand_snap": 0, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 1300, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 4, + "ray_cast_candidate_bounds": 86, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 1, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 4, + "score_component_calls": 2501, + "score_component_total_ns": 52377581, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 444, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 296, + "verify_dynamic_exact_pair_checks": 320, + "verify_path_report_calls": 60, + "verify_static_buffer_ops": 256, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 4, + "visibility_tangent_candidate_ray_tests": 4, + "visibility_tangent_candidate_scans": 476, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 6, + "repeat": 0, + "seed": 41, + "summary": { + "reached_targets": 6, + "total_results": 6, + "valid_results": 1 + } + }, + { + "duration_s": 0.5255939338821918, + "metrics": { + "congestion_cache_hits": 8, + "congestion_cache_misses": 674, + "congestion_candidate_ids": 1105, + "congestion_candidate_nets": 1045, + "congestion_candidate_precheck_hits": 266, + "congestion_candidate_precheck_misses": 416, + "congestion_candidate_precheck_skips": 0, + "congestion_check_calls": 674, + "congestion_exact_pair_checks": 952, + "congestion_grid_net_cache_hits": 287, + "congestion_grid_net_cache_misses": 755, + "congestion_grid_span_cache_hits": 251, + "congestion_grid_span_cache_misses": 375, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 308, + "congestion_net_envelope_cache_misses": 807, + "congestion_presence_cache_hits": 282, + "congestion_presence_cache_misses": 475, + "congestion_presence_skips": 75, + "danger_map_cache_hits": 3159, + "danger_map_cache_misses": 1632, + "danger_map_lookup_calls": 4791, + "danger_map_query_calls": 1632, + "danger_map_total_ns": 42685332, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 131, + "dynamic_path_objects_removed": 106, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 3312.5, + "guidance_bonus_applied_bend90": 1187.5, + "guidance_bonus_applied_sbend": 375.0, + "guidance_bonus_applied_straight": 1750.0, + "guidance_match_moves": 53, + "guidance_match_moves_bend90": 19, + "guidance_match_moves_sbend": 6, + "guidance_match_moves_straight": 28, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 18, + "iteration_conflicting_nets": 21, + "iteration_reverified_nets": 24, + "iteration_reverify_calls": 4, + "move_cache_abs_hits": 459, + "move_cache_abs_misses": 2216, + "move_cache_rel_hits": 2062, + "move_cache_rel_misses": 154, + "moves_added": 1597, + "moves_generated": 2675, + "nets_carried_forward": 0, + "nets_reached_target": 24, + "nets_routed": 24, + "nodes_expanded": 500, + "pair_local_search_accepts": 0, + "pair_local_search_attempts": 0, + "pair_local_search_nodes_expanded": 0, + "pair_local_search_pairs_considered": 0, + "path_cost_calls": 0, + "pruned_closed_set": 174, + "pruned_cost": 904, + "pruned_hard_collision": 0, + "ray_cast_calls": 1780, + "ray_cast_calls_expand_forward": 476, + "ray_cast_calls_expand_snap": 0, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 1300, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 4, + "ray_cast_candidate_bounds": 86, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 1, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 4, + "score_component_calls": 2501, + "score_component_total_ns": 48631281, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 444, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 296, + "verify_dynamic_exact_pair_checks": 320, + "verify_path_report_calls": 60, + "verify_static_buffer_ops": 256, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 4, + "visibility_tangent_candidate_ray_tests": 4, + "visibility_tangent_candidate_scans": 476, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 6, + "repeat": 1, + "seed": 41, + "summary": { + "reached_targets": 6, + "total_results": 6, + "valid_results": 1 + } + }, + { + "duration_s": 0.5240974249318242, + "metrics": { + "congestion_cache_hits": 8, + "congestion_cache_misses": 683, + "congestion_candidate_ids": 1119, + "congestion_candidate_nets": 1059, + "congestion_candidate_precheck_hits": 271, + "congestion_candidate_precheck_misses": 420, + "congestion_candidate_precheck_skips": 0, + "congestion_check_calls": 683, + "congestion_exact_pair_checks": 974, + "congestion_grid_net_cache_hits": 294, + "congestion_grid_net_cache_misses": 761, + "congestion_grid_span_cache_hits": 257, + "congestion_grid_span_cache_misses": 378, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 315, + "congestion_net_envelope_cache_misses": 813, + "congestion_presence_cache_hits": 287, + "congestion_presence_cache_misses": 479, + "congestion_presence_skips": 75, + "danger_map_cache_hits": 3186, + "danger_map_cache_misses": 1632, + "danger_map_lookup_calls": 4818, + "danger_map_query_calls": 1632, + "danger_map_total_ns": 42252659, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 131, + "dynamic_path_objects_removed": 106, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 3312.5, + "guidance_bonus_applied_bend90": 1187.5, + "guidance_bonus_applied_sbend": 375.0, + "guidance_bonus_applied_straight": 1750.0, + "guidance_match_moves": 53, + "guidance_match_moves_bend90": 19, + "guidance_match_moves_sbend": 6, + "guidance_match_moves_straight": 28, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 18, + "iteration_conflicting_nets": 21, + "iteration_reverified_nets": 24, + "iteration_reverify_calls": 4, + "move_cache_abs_hits": 472, + "move_cache_abs_misses": 2216, + "move_cache_rel_hits": 2062, + "move_cache_rel_misses": 154, + "moves_added": 1606, + "moves_generated": 2688, + "nets_carried_forward": 0, + "nets_reached_target": 24, + "nets_routed": 24, + "nodes_expanded": 503, + "pair_local_search_accepts": 0, + "pair_local_search_attempts": 0, + "pair_local_search_nodes_expanded": 0, + "pair_local_search_pairs_considered": 0, + "path_cost_calls": 0, + "pruned_closed_set": 174, + "pruned_cost": 908, + "pruned_hard_collision": 0, + "ray_cast_calls": 1783, + "ray_cast_calls_expand_forward": 479, + "ray_cast_calls_expand_snap": 0, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 1300, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 4, + "ray_cast_candidate_bounds": 86, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 1, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 4, + "score_component_calls": 2514, + "score_component_total_ns": 48076710, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 457, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 292, + "verify_dynamic_exact_pair_checks": 324, + "verify_path_report_calls": 60, + "verify_static_buffer_ops": 256, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 4, + "visibility_tangent_candidate_ray_tests": 4, + "visibility_tangent_candidate_scans": 479, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 6, + "repeat": 0, + "seed": 42, + "summary": { + "reached_targets": 6, + "total_results": 6, + "valid_results": 1 + } + }, + { + "duration_s": 0.547705102013424, + "metrics": { + "congestion_cache_hits": 8, + "congestion_cache_misses": 683, + "congestion_candidate_ids": 1119, + "congestion_candidate_nets": 1059, + "congestion_candidate_precheck_hits": 271, + "congestion_candidate_precheck_misses": 420, + "congestion_candidate_precheck_skips": 0, + "congestion_check_calls": 683, + "congestion_exact_pair_checks": 974, + "congestion_grid_net_cache_hits": 294, + "congestion_grid_net_cache_misses": 761, + "congestion_grid_span_cache_hits": 257, + "congestion_grid_span_cache_misses": 378, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 315, + "congestion_net_envelope_cache_misses": 813, + "congestion_presence_cache_hits": 287, + "congestion_presence_cache_misses": 479, + "congestion_presence_skips": 75, + "danger_map_cache_hits": 3186, + "danger_map_cache_misses": 1632, + "danger_map_lookup_calls": 4818, + "danger_map_query_calls": 1632, + "danger_map_total_ns": 43365736, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 131, + "dynamic_path_objects_removed": 106, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 3312.5, + "guidance_bonus_applied_bend90": 1187.5, + "guidance_bonus_applied_sbend": 375.0, + "guidance_bonus_applied_straight": 1750.0, + "guidance_match_moves": 53, + "guidance_match_moves_bend90": 19, + "guidance_match_moves_sbend": 6, + "guidance_match_moves_straight": 28, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 18, + "iteration_conflicting_nets": 21, + "iteration_reverified_nets": 24, + "iteration_reverify_calls": 4, + "move_cache_abs_hits": 472, + "move_cache_abs_misses": 2216, + "move_cache_rel_hits": 2062, + "move_cache_rel_misses": 154, + "moves_added": 1606, + "moves_generated": 2688, + "nets_carried_forward": 0, + "nets_reached_target": 24, + "nets_routed": 24, + "nodes_expanded": 503, + "pair_local_search_accepts": 0, + "pair_local_search_attempts": 0, + "pair_local_search_nodes_expanded": 0, + "pair_local_search_pairs_considered": 0, + "path_cost_calls": 0, + "pruned_closed_set": 174, + "pruned_cost": 908, + "pruned_hard_collision": 0, + "ray_cast_calls": 1783, + "ray_cast_calls_expand_forward": 479, + "ray_cast_calls_expand_snap": 0, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 1300, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 4, + "ray_cast_candidate_bounds": 86, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 1, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 4, + "score_component_calls": 2514, + "score_component_total_ns": 49498429, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 457, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 292, + "verify_dynamic_exact_pair_checks": 324, + "verify_path_report_calls": 60, + "verify_static_buffer_ops": 256, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 4, + "visibility_tangent_candidate_ray_tests": 4, + "visibility_tangent_candidate_scans": 479, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 6, + "repeat": 1, + "seed": 42, + "summary": { + "reached_targets": 6, + "total_results": 6, + "valid_results": 1 + } + }, + { + "duration_s": 0.5199470021761954, + "metrics": { + "congestion_cache_hits": 8, + "congestion_cache_misses": 654, + "congestion_candidate_ids": 1048, + "congestion_candidate_nets": 995, + "congestion_candidate_precheck_hits": 250, + "congestion_candidate_precheck_misses": 412, + "congestion_candidate_precheck_skips": 0, + "congestion_check_calls": 654, + "congestion_exact_pair_checks": 915, + "congestion_grid_net_cache_hits": 272, + "congestion_grid_net_cache_misses": 746, + "congestion_grid_span_cache_hits": 234, + "congestion_grid_span_cache_misses": 372, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 293, + "congestion_net_envelope_cache_misses": 796, + "congestion_presence_cache_hits": 261, + "congestion_presence_cache_misses": 466, + "congestion_presence_skips": 65, + "danger_map_cache_hits": 3103, + "danger_map_cache_misses": 1598, + "danger_map_lookup_calls": 4701, + "danger_map_query_calls": 1598, + "danger_map_total_ns": 41631872, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 131, + "dynamic_path_objects_removed": 106, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 3312.5, + "guidance_bonus_applied_bend90": 1187.5, + "guidance_bonus_applied_sbend": 375.0, + "guidance_bonus_applied_straight": 1750.0, + "guidance_match_moves": 53, + "guidance_match_moves_bend90": 19, + "guidance_match_moves_sbend": 6, + "guidance_match_moves_straight": 28, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 18, + "iteration_conflicting_nets": 21, + "iteration_reverified_nets": 24, + "iteration_reverify_calls": 4, + "move_cache_abs_hits": 451, + "move_cache_abs_misses": 2192, + "move_cache_rel_hits": 2038, + "move_cache_rel_misses": 154, + "moves_added": 1567, + "moves_generated": 2643, + "nets_carried_forward": 0, + "nets_reached_target": 24, + "nets_routed": 24, + "nodes_expanded": 493, + "pair_local_search_accepts": 0, + "pair_local_search_attempts": 0, + "pair_local_search_nodes_expanded": 0, + "pair_local_search_pairs_considered": 0, + "path_cost_calls": 0, + "pruned_closed_set": 172, + "pruned_cost": 904, + "pruned_hard_collision": 0, + "ray_cast_calls": 1763, + "ray_cast_calls_expand_forward": 469, + "ray_cast_calls_expand_snap": 0, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 1290, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 4, + "ray_cast_candidate_bounds": 80, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 1, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 4, + "score_component_calls": 2471, + "score_component_total_ns": 47519774, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 436, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 293, + "verify_dynamic_exact_pair_checks": 317, + "verify_path_report_calls": 60, + "verify_static_buffer_ops": 256, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 4, + "visibility_tangent_candidate_ray_tests": 4, + "visibility_tangent_candidate_scans": 469, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 6, + "repeat": 0, + "seed": 43, + "summary": { + "reached_targets": 6, + "total_results": 6, + "valid_results": 1 + } + }, + { + "duration_s": 0.5160259250551462, + "metrics": { + "congestion_cache_hits": 8, + "congestion_cache_misses": 654, + "congestion_candidate_ids": 1048, + "congestion_candidate_nets": 995, + "congestion_candidate_precheck_hits": 250, + "congestion_candidate_precheck_misses": 412, + "congestion_candidate_precheck_skips": 0, + "congestion_check_calls": 654, + "congestion_exact_pair_checks": 915, + "congestion_grid_net_cache_hits": 272, + "congestion_grid_net_cache_misses": 746, + "congestion_grid_span_cache_hits": 234, + "congestion_grid_span_cache_misses": 372, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 293, + "congestion_net_envelope_cache_misses": 796, + "congestion_presence_cache_hits": 261, + "congestion_presence_cache_misses": 466, + "congestion_presence_skips": 65, + "danger_map_cache_hits": 3103, + "danger_map_cache_misses": 1598, + "danger_map_lookup_calls": 4701, + "danger_map_query_calls": 1598, + "danger_map_total_ns": 41135911, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 131, + "dynamic_path_objects_removed": 106, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 3312.5, + "guidance_bonus_applied_bend90": 1187.5, + "guidance_bonus_applied_sbend": 375.0, + "guidance_bonus_applied_straight": 1750.0, + "guidance_match_moves": 53, + "guidance_match_moves_bend90": 19, + "guidance_match_moves_sbend": 6, + "guidance_match_moves_straight": 28, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 18, + "iteration_conflicting_nets": 21, + "iteration_reverified_nets": 24, + "iteration_reverify_calls": 4, + "move_cache_abs_hits": 451, + "move_cache_abs_misses": 2192, + "move_cache_rel_hits": 2038, + "move_cache_rel_misses": 154, + "moves_added": 1567, + "moves_generated": 2643, + "nets_carried_forward": 0, + "nets_reached_target": 24, + "nets_routed": 24, + "nodes_expanded": 493, + "pair_local_search_accepts": 0, + "pair_local_search_attempts": 0, + "pair_local_search_nodes_expanded": 0, + "pair_local_search_pairs_considered": 0, + "path_cost_calls": 0, + "pruned_closed_set": 172, + "pruned_cost": 904, + "pruned_hard_collision": 0, + "ray_cast_calls": 1763, + "ray_cast_calls_expand_forward": 469, + "ray_cast_calls_expand_snap": 0, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 1290, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 4, + "ray_cast_candidate_bounds": 80, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 1, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 4, + "score_component_calls": 2471, + "score_component_total_ns": 47047772, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 436, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 293, + "verify_dynamic_exact_pair_checks": 317, + "verify_path_report_calls": 60, + "verify_static_buffer_ops": 256, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 4, + "visibility_tangent_candidate_ray_tests": 4, + "visibility_tangent_candidate_scans": 469, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 6, + "repeat": 1, + "seed": 43, + "summary": { + "reached_targets": 6, + "total_results": 6, + "valid_results": 1 + } + }, + { + "duration_s": 1.8817617469467223, + "metrics": { + "congestion_cache_hits": 31, + "congestion_cache_misses": 4313, + "congestion_candidate_ids": 7976, + "congestion_candidate_nets": 7240, + "congestion_candidate_precheck_hits": 2327, + "congestion_candidate_precheck_misses": 2036, + "congestion_candidate_precheck_skips": 19, + "congestion_check_calls": 4313, + "congestion_exact_pair_checks": 6217, + "congestion_grid_net_cache_hits": 2369, + "congestion_grid_net_cache_misses": 3714, + "congestion_grid_span_cache_hits": 2055, + "congestion_grid_span_cache_misses": 1837, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 2527, + "congestion_net_envelope_cache_misses": 3896, + "congestion_presence_cache_hits": 2955, + "congestion_presence_cache_misses": 2536, + "congestion_presence_skips": 1126, + "danger_map_cache_hits": 16937, + "danger_map_cache_misses": 6391, + "danger_map_lookup_calls": 23328, + "danger_map_query_calls": 6391, + "danger_map_total_ns": 192446411, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 450, + "dynamic_path_objects_removed": 416, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 10812.5, + "guidance_bonus_applied_bend90": 3125.0, + "guidance_bonus_applied_sbend": 750.0, + "guidance_bonus_applied_straight": 6937.5, + "guidance_match_moves": 173, + "guidance_match_moves_bend90": 50, + "guidance_match_moves_sbend": 12, + "guidance_match_moves_straight": 111, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 33, + "iteration_conflicting_nets": 38, + "iteration_reverified_nets": 56, + "iteration_reverify_calls": 7, + "move_cache_abs_hits": 2874, + "move_cache_abs_misses": 5680, + "move_cache_rel_hits": 4979, + "move_cache_rel_misses": 701, + "moves_added": 7771, + "moves_generated": 8554, + "nets_carried_forward": 0, + "nets_reached_target": 56, + "nets_routed": 56, + "nodes_expanded": 1558, + "pair_local_search_accepts": 2, + "pair_local_search_attempts": 3, + "pair_local_search_nodes_expanded": 38, + "pair_local_search_pairs_considered": 2, + "path_cost_calls": 0, + "pruned_closed_set": 461, + "pruned_cost": 322, + "pruned_hard_collision": 0, + "ray_cast_calls": 4910, + "ray_cast_calls_expand_forward": 1502, + "ray_cast_calls_expand_snap": 39, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 3363, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 6, + "ray_cast_candidate_bounds": 237, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 8, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 7, + "score_component_calls": 8098, + "score_component_total_ns": 218008329, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 2788, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 1244, + "verify_dynamic_exact_pair_checks": 464, + "verify_path_report_calls": 144, + "verify_static_buffer_ops": 732, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 6, + "visibility_tangent_candidate_ray_tests": 6, + "visibility_tangent_candidate_scans": 1502, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 8, + "repeat": 0, + "seed": 41, + "summary": { + "reached_targets": 8, + "total_results": 8, + "valid_results": 8 + } + }, + { + "duration_s": 1.8618457240518183, + "metrics": { + "congestion_cache_hits": 31, + "congestion_cache_misses": 4313, + "congestion_candidate_ids": 7976, + "congestion_candidate_nets": 7240, + "congestion_candidate_precheck_hits": 2327, + "congestion_candidate_precheck_misses": 2036, + "congestion_candidate_precheck_skips": 19, + "congestion_check_calls": 4313, + "congestion_exact_pair_checks": 6217, + "congestion_grid_net_cache_hits": 2369, + "congestion_grid_net_cache_misses": 3714, + "congestion_grid_span_cache_hits": 2055, + "congestion_grid_span_cache_misses": 1837, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 2527, + "congestion_net_envelope_cache_misses": 3896, + "congestion_presence_cache_hits": 2955, + "congestion_presence_cache_misses": 2536, + "congestion_presence_skips": 1126, + "danger_map_cache_hits": 16937, + "danger_map_cache_misses": 6391, + "danger_map_lookup_calls": 23328, + "danger_map_query_calls": 6391, + "danger_map_total_ns": 172147520, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 450, + "dynamic_path_objects_removed": 416, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 10812.5, + "guidance_bonus_applied_bend90": 3125.0, + "guidance_bonus_applied_sbend": 750.0, + "guidance_bonus_applied_straight": 6937.5, + "guidance_match_moves": 173, + "guidance_match_moves_bend90": 50, + "guidance_match_moves_sbend": 12, + "guidance_match_moves_straight": 111, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 33, + "iteration_conflicting_nets": 38, + "iteration_reverified_nets": 56, + "iteration_reverify_calls": 7, + "move_cache_abs_hits": 2874, + "move_cache_abs_misses": 5680, + "move_cache_rel_hits": 4979, + "move_cache_rel_misses": 701, + "moves_added": 7771, + "moves_generated": 8554, + "nets_carried_forward": 0, + "nets_reached_target": 56, + "nets_routed": 56, + "nodes_expanded": 1558, + "pair_local_search_accepts": 2, + "pair_local_search_attempts": 3, + "pair_local_search_nodes_expanded": 38, + "pair_local_search_pairs_considered": 2, + "path_cost_calls": 0, + "pruned_closed_set": 461, + "pruned_cost": 322, + "pruned_hard_collision": 0, + "ray_cast_calls": 4910, + "ray_cast_calls_expand_forward": 1502, + "ray_cast_calls_expand_snap": 39, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 3363, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 6, + "ray_cast_candidate_bounds": 237, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 8, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 7, + "score_component_calls": 8098, + "score_component_total_ns": 197998309, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 2788, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 1244, + "verify_dynamic_exact_pair_checks": 464, + "verify_path_report_calls": 144, + "verify_static_buffer_ops": 732, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 6, + "visibility_tangent_candidate_ray_tests": 6, + "visibility_tangent_candidate_scans": 1502, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 8, + "repeat": 1, + "seed": 41, + "summary": { + "reached_targets": 8, + "total_results": 8, + "valid_results": 8 + } + }, + { + "duration_s": 1.4850338851101696, + "metrics": { + "congestion_cache_hits": 37, + "congestion_cache_misses": 3799, + "congestion_candidate_ids": 7050, + "congestion_candidate_nets": 6725, + "congestion_candidate_precheck_hits": 1823, + "congestion_candidate_precheck_misses": 2035, + "congestion_candidate_precheck_skips": 22, + "congestion_check_calls": 3799, + "congestion_exact_pair_checks": 5684, + "congestion_grid_net_cache_hits": 1836, + "congestion_grid_net_cache_misses": 3693, + "congestion_grid_span_cache_hits": 1591, + "congestion_grid_span_cache_misses": 1804, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 1992, + "congestion_net_envelope_cache_misses": 3901, + "congestion_presence_cache_hits": 2321, + "congestion_presence_cache_misses": 2616, + "congestion_presence_skips": 1079, + "danger_map_cache_hits": 16398, + "danger_map_cache_misses": 5274, + "danger_map_lookup_calls": 21672, + "danger_map_query_calls": 5274, + "danger_map_total_ns": 142151688, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 435, + "dynamic_path_objects_removed": 400, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 14187.5, + "guidance_bonus_applied_bend90": 4187.5, + "guidance_bonus_applied_sbend": 875.0, + "guidance_bonus_applied_straight": 9125.0, + "guidance_match_moves": 227, + "guidance_match_moves_bend90": 67, + "guidance_match_moves_sbend": 14, + "guidance_match_moves_straight": 146, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 31, + "iteration_conflicting_nets": 35, + "iteration_reverified_nets": 64, + "iteration_reverify_calls": 8, + "move_cache_abs_hits": 3181, + "move_cache_abs_misses": 4740, + "move_cache_rel_hits": 4171, + "move_cache_rel_misses": 569, + "moves_added": 7220, + "moves_generated": 7921, + "nets_carried_forward": 0, + "nets_reached_target": 64, + "nets_routed": 64, + "nodes_expanded": 1440, + "pair_local_search_accepts": 1, + "pair_local_search_attempts": 1, + "pair_local_search_nodes_expanded": 19, + "pair_local_search_pairs_considered": 1, + "path_cost_calls": 0, + "pruned_closed_set": 407, + "pruned_cost": 294, + "pruned_hard_collision": 0, + "ray_cast_calls": 4201, + "ray_cast_calls_expand_forward": 1376, + "ray_cast_calls_expand_snap": 46, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 2773, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 6, + "ray_cast_candidate_bounds": 187, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 8, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 8, + "score_component_calls": 7518, + "score_component_total_ns": 164933249, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 3079, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 1295, + "verify_dynamic_exact_pair_checks": 415, + "verify_path_report_calls": 152, + "verify_static_buffer_ops": 755, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 6, + "visibility_tangent_candidate_ray_tests": 6, + "visibility_tangent_candidate_scans": 1376, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 8, + "repeat": 0, + "seed": 42, + "summary": { + "reached_targets": 8, + "total_results": 8, + "valid_results": 8 + } + }, + { + "duration_s": 1.4636062050703913, + "metrics": { + "congestion_cache_hits": 37, + "congestion_cache_misses": 3799, + "congestion_candidate_ids": 7050, + "congestion_candidate_nets": 6725, + "congestion_candidate_precheck_hits": 1823, + "congestion_candidate_precheck_misses": 2035, + "congestion_candidate_precheck_skips": 22, + "congestion_check_calls": 3799, + "congestion_exact_pair_checks": 5684, + "congestion_grid_net_cache_hits": 1836, + "congestion_grid_net_cache_misses": 3693, + "congestion_grid_span_cache_hits": 1591, + "congestion_grid_span_cache_misses": 1804, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 1992, + "congestion_net_envelope_cache_misses": 3901, + "congestion_presence_cache_hits": 2321, + "congestion_presence_cache_misses": 2616, + "congestion_presence_skips": 1079, + "danger_map_cache_hits": 16398, + "danger_map_cache_misses": 5274, + "danger_map_lookup_calls": 21672, + "danger_map_query_calls": 5274, + "danger_map_total_ns": 142480011, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 435, + "dynamic_path_objects_removed": 400, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 14187.5, + "guidance_bonus_applied_bend90": 4187.5, + "guidance_bonus_applied_sbend": 875.0, + "guidance_bonus_applied_straight": 9125.0, + "guidance_match_moves": 227, + "guidance_match_moves_bend90": 67, + "guidance_match_moves_sbend": 14, + "guidance_match_moves_straight": 146, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 31, + "iteration_conflicting_nets": 35, + "iteration_reverified_nets": 64, + "iteration_reverify_calls": 8, + "move_cache_abs_hits": 3181, + "move_cache_abs_misses": 4740, + "move_cache_rel_hits": 4171, + "move_cache_rel_misses": 569, + "moves_added": 7220, + "moves_generated": 7921, + "nets_carried_forward": 0, + "nets_reached_target": 64, + "nets_routed": 64, + "nodes_expanded": 1440, + "pair_local_search_accepts": 1, + "pair_local_search_attempts": 1, + "pair_local_search_nodes_expanded": 19, + "pair_local_search_pairs_considered": 1, + "path_cost_calls": 0, + "pruned_closed_set": 407, + "pruned_cost": 294, + "pruned_hard_collision": 0, + "ray_cast_calls": 4201, + "ray_cast_calls_expand_forward": 1376, + "ray_cast_calls_expand_snap": 46, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 2773, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 6, + "ray_cast_candidate_bounds": 187, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 8, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 8, + "score_component_calls": 7518, + "score_component_total_ns": 165301696, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 3079, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 1295, + "verify_dynamic_exact_pair_checks": 415, + "verify_path_report_calls": 152, + "verify_static_buffer_ops": 755, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 6, + "visibility_tangent_candidate_ray_tests": 6, + "visibility_tangent_candidate_scans": 1376, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 8, + "repeat": 1, + "seed": 42, + "summary": { + "reached_targets": 8, + "total_results": 8, + "valid_results": 8 + } + }, + { + "duration_s": 1.065187250962481, + "metrics": { + "congestion_cache_hits": 10, + "congestion_cache_misses": 1844, + "congestion_candidate_ids": 3568, + "congestion_candidate_nets": 3390, + "congestion_candidate_precheck_hits": 757, + "congestion_candidate_precheck_misses": 1113, + "congestion_candidate_precheck_skips": 16, + "congestion_check_calls": 1844, + "congestion_exact_pair_checks": 2796, + "congestion_grid_net_cache_hits": 772, + "congestion_grid_net_cache_misses": 2030, + "congestion_grid_span_cache_hits": 678, + "congestion_grid_span_cache_misses": 1016, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 838, + "congestion_net_envelope_cache_misses": 2135, + "congestion_presence_cache_hits": 850, + "congestion_presence_cache_misses": 1349, + "congestion_presence_skips": 329, + "danger_map_cache_hits": 9125, + "danger_map_cache_misses": 4333, + "danger_map_lookup_calls": 13458, + "danger_map_query_calls": 4333, + "danger_map_total_ns": 126835582, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 256, + "dynamic_path_objects_removed": 218, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 5625.0, + "guidance_bonus_applied_bend90": 2000.0, + "guidance_bonus_applied_sbend": 500.0, + "guidance_bonus_applied_straight": 3125.0, + "guidance_match_moves": 90, + "guidance_match_moves_bend90": 32, + "guidance_match_moves_sbend": 8, + "guidance_match_moves_straight": 50, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 27, + "iteration_conflicting_nets": 26, + "iteration_reverified_nets": 40, + "iteration_reverify_calls": 5, + "move_cache_abs_hits": 1094, + "move_cache_abs_misses": 3955, + "move_cache_rel_hits": 3487, + "move_cache_rel_misses": 468, + "moves_added": 4475, + "moves_generated": 5049, + "nets_carried_forward": 0, + "nets_reached_target": 40, + "nets_routed": 40, + "nodes_expanded": 939, + "pair_local_search_accepts": 0, + "pair_local_search_attempts": 0, + "pair_local_search_nodes_expanded": 0, + "pair_local_search_pairs_considered": 0, + "path_cost_calls": 0, + "pruned_closed_set": 319, + "pruned_cost": 255, + "pruned_hard_collision": 0, + "ray_cast_calls": 3212, + "ray_cast_calls_expand_forward": 899, + "ray_cast_calls_expand_snap": 20, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 2287, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 6, + "ray_cast_candidate_bounds": 140, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 8, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 5, + "score_component_calls": 4741, + "score_component_total_ns": 141872767, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 1057, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 751, + "verify_dynamic_exact_pair_checks": 363, + "verify_path_report_calls": 96, + "verify_static_buffer_ops": 436, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 6, + "visibility_tangent_candidate_ray_tests": 6, + "visibility_tangent_candidate_scans": 899, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 8, + "repeat": 0, + "seed": 43, + "summary": { + "reached_targets": 8, + "total_results": 8, + "valid_results": 8 + } + }, + { + "duration_s": 1.0501909658778459, + "metrics": { + "congestion_cache_hits": 10, + "congestion_cache_misses": 1844, + "congestion_candidate_ids": 3568, + "congestion_candidate_nets": 3390, + "congestion_candidate_precheck_hits": 757, + "congestion_candidate_precheck_misses": 1113, + "congestion_candidate_precheck_skips": 16, + "congestion_check_calls": 1844, + "congestion_exact_pair_checks": 2796, + "congestion_grid_net_cache_hits": 772, + "congestion_grid_net_cache_misses": 2030, + "congestion_grid_span_cache_hits": 678, + "congestion_grid_span_cache_misses": 1016, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 838, + "congestion_net_envelope_cache_misses": 2135, + "congestion_presence_cache_hits": 850, + "congestion_presence_cache_misses": 1349, + "congestion_presence_skips": 329, + "danger_map_cache_hits": 9125, + "danger_map_cache_misses": 4333, + "danger_map_lookup_calls": 13458, + "danger_map_query_calls": 4333, + "danger_map_total_ns": 112792178, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 256, + "dynamic_path_objects_removed": 218, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 5625.0, + "guidance_bonus_applied_bend90": 2000.0, + "guidance_bonus_applied_sbend": 500.0, + "guidance_bonus_applied_straight": 3125.0, + "guidance_match_moves": 90, + "guidance_match_moves_bend90": 32, + "guidance_match_moves_sbend": 8, + "guidance_match_moves_straight": 50, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 27, + "iteration_conflicting_nets": 26, + "iteration_reverified_nets": 40, + "iteration_reverify_calls": 5, + "move_cache_abs_hits": 1094, + "move_cache_abs_misses": 3955, + "move_cache_rel_hits": 3487, + "move_cache_rel_misses": 468, + "moves_added": 4475, + "moves_generated": 5049, + "nets_carried_forward": 0, + "nets_reached_target": 40, + "nets_routed": 40, + "nodes_expanded": 939, + "pair_local_search_accepts": 0, + "pair_local_search_attempts": 0, + "pair_local_search_nodes_expanded": 0, + "pair_local_search_pairs_considered": 0, + "path_cost_calls": 0, + "pruned_closed_set": 319, + "pruned_cost": 255, + "pruned_hard_collision": 0, + "ray_cast_calls": 3212, + "ray_cast_calls_expand_forward": 899, + "ray_cast_calls_expand_snap": 20, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 2287, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 6, + "ray_cast_candidate_bounds": 140, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 8, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 5, + "score_component_calls": 4741, + "score_component_total_ns": 127782063, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 1057, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 751, + "verify_dynamic_exact_pair_checks": 363, + "verify_path_report_calls": 96, + "verify_static_buffer_ops": 436, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 6, + "visibility_tangent_candidate_ray_tests": 6, + "visibility_tangent_candidate_scans": 899, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 8, + "repeat": 1, + "seed": 43, + "summary": { + "reached_targets": 8, + "total_results": 8, + "valid_results": 8 + } + }, + { + "duration_s": 2.861715276958421, + "metrics": { + "congestion_cache_hits": 181, + "congestion_cache_misses": 6208, + "congestion_candidate_ids": 14969, + "congestion_candidate_nets": 14477, + "congestion_candidate_precheck_hits": 4046, + "congestion_candidate_precheck_misses": 2450, + "congestion_candidate_precheck_skips": 107, + "congestion_check_calls": 6208, + "congestion_exact_pair_checks": 12175, + "congestion_grid_net_cache_hits": 3733, + "congestion_grid_net_cache_misses": 4394, + "congestion_grid_span_cache_hits": 3484, + "congestion_grid_span_cache_misses": 2188, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 4110, + "congestion_net_envelope_cache_misses": 4614, + "congestion_presence_cache_hits": 4474, + "congestion_presence_cache_misses": 2857, + "congestion_presence_skips": 835, + "danger_map_cache_hits": 21570, + "danger_map_cache_misses": 8484, + "danger_map_lookup_calls": 30054, + "danger_map_query_calls": 8484, + "danger_map_total_ns": 229555102, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 470, + "dynamic_path_objects_removed": 422, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 12937.5, + "guidance_bonus_applied_bend90": 4187.5, + "guidance_bonus_applied_sbend": 750.0, + "guidance_bonus_applied_straight": 8000.0, + "guidance_match_moves": 207, + "guidance_match_moves_bend90": 67, + "guidance_match_moves_sbend": 12, + "guidance_match_moves_straight": 128, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 43, + "iteration_conflicting_nets": 43, + "iteration_reverified_nets": 60, + "iteration_reverify_calls": 6, + "move_cache_abs_hits": 3714, + "move_cache_abs_misses": 7526, + "move_cache_rel_hits": 6718, + "move_cache_rel_misses": 808, + "moves_added": 9950, + "moves_generated": 11240, + "nets_carried_forward": 0, + "nets_reached_target": 60, + "nets_routed": 60, + "nodes_expanded": 2223, + "pair_local_search_accepts": 2, + "pair_local_search_attempts": 3, + "pair_local_search_nodes_expanded": 41, + "pair_local_search_pairs_considered": 2, + "path_cost_calls": 0, + "pruned_closed_set": 566, + "pruned_cost": 724, + "pruned_hard_collision": 0, + "ray_cast_calls": 6546, + "ray_cast_calls_expand_forward": 2163, + "ray_cast_calls_expand_snap": 43, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 4334, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 6, + "ray_cast_candidate_bounds": 438, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 8, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 6, + "score_component_calls": 10742, + "score_component_total_ns": 262906657, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 3614, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 1812, + "verify_dynamic_exact_pair_checks": 590, + "verify_path_report_calls": 160, + "verify_static_buffer_ops": 771, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 6, + "visibility_tangent_candidate_ray_tests": 6, + "visibility_tangent_candidate_scans": 2163, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 10, + "repeat": 0, + "seed": 41, + "summary": { + "reached_targets": 10, + "total_results": 10, + "valid_results": 8 + } + }, + { + "duration_s": 2.8281878910493106, + "metrics": { + "congestion_cache_hits": 181, + "congestion_cache_misses": 6208, + "congestion_candidate_ids": 14969, + "congestion_candidate_nets": 14477, + "congestion_candidate_precheck_hits": 4046, + "congestion_candidate_precheck_misses": 2450, + "congestion_candidate_precheck_skips": 107, + "congestion_check_calls": 6208, + "congestion_exact_pair_checks": 12175, + "congestion_grid_net_cache_hits": 3733, + "congestion_grid_net_cache_misses": 4394, + "congestion_grid_span_cache_hits": 3484, + "congestion_grid_span_cache_misses": 2188, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 4110, + "congestion_net_envelope_cache_misses": 4614, + "congestion_presence_cache_hits": 4474, + "congestion_presence_cache_misses": 2857, + "congestion_presence_skips": 835, + "danger_map_cache_hits": 21570, + "danger_map_cache_misses": 8484, + "danger_map_lookup_calls": 30054, + "danger_map_query_calls": 8484, + "danger_map_total_ns": 223711146, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 470, + "dynamic_path_objects_removed": 422, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 12937.5, + "guidance_bonus_applied_bend90": 4187.5, + "guidance_bonus_applied_sbend": 750.0, + "guidance_bonus_applied_straight": 8000.0, + "guidance_match_moves": 207, + "guidance_match_moves_bend90": 67, + "guidance_match_moves_sbend": 12, + "guidance_match_moves_straight": 128, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 43, + "iteration_conflicting_nets": 43, + "iteration_reverified_nets": 60, + "iteration_reverify_calls": 6, + "move_cache_abs_hits": 3714, + "move_cache_abs_misses": 7526, + "move_cache_rel_hits": 6718, + "move_cache_rel_misses": 808, + "moves_added": 9950, + "moves_generated": 11240, + "nets_carried_forward": 0, + "nets_reached_target": 60, + "nets_routed": 60, + "nodes_expanded": 2223, + "pair_local_search_accepts": 2, + "pair_local_search_attempts": 3, + "pair_local_search_nodes_expanded": 41, + "pair_local_search_pairs_considered": 2, + "path_cost_calls": 0, + "pruned_closed_set": 566, + "pruned_cost": 724, + "pruned_hard_collision": 0, + "ray_cast_calls": 6546, + "ray_cast_calls_expand_forward": 2163, + "ray_cast_calls_expand_snap": 43, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 4334, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 6, + "ray_cast_candidate_bounds": 438, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 8, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 6, + "score_component_calls": 10742, + "score_component_total_ns": 257092830, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 3614, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 1812, + "verify_dynamic_exact_pair_checks": 590, + "verify_path_report_calls": 160, + "verify_static_buffer_ops": 771, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 6, + "visibility_tangent_candidate_ray_tests": 6, + "visibility_tangent_candidate_scans": 2163, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 10, + "repeat": 1, + "seed": 41, + "summary": { + "reached_targets": 10, + "total_results": 10, + "valid_results": 8 + } + }, + { + "duration_s": 2.035589807201177, + "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_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": 197092109, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 471, + "dynamic_path_objects_removed": 423, + "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, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 39, + "iteration_conflicting_nets": 36, + "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, + "pair_local_search_accepts": 2, + "pair_local_search_attempts": 2, + "pair_local_search_nodes_expanded": 68, + "pair_local_search_pairs_considered": 2, + "path_cost_calls": 0, + "pruned_closed_set": 439, + "pruned_cost": 533, + "pruned_hard_collision": 0, + "ray_cast_calls": 5477, + "ray_cast_calls_expand_forward": 1704, + "ray_cast_calls_expand_snap": 46, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 3721, + "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_exact_geometry_checks": 0, + "refine_path_calls": 10, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 6, + "score_component_calls": 8634, + "score_component_total_ns": 223430894, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 2482, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 1756, + "verify_dynamic_exact_pair_checks": 510, + "verify_path_report_calls": 160, + "verify_static_buffer_ops": 751, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 6, + "visibility_tangent_candidate_ray_tests": 6, + "visibility_tangent_candidate_scans": 1704, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 10, + "repeat": 0, + "seed": 42, + "summary": { + "reached_targets": 10, + "total_results": 10, + "valid_results": 10 + } + }, + { + "duration_s": 2.0052393269725144, + "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_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": 196041391, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 471, + "dynamic_path_objects_removed": 423, + "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, + "hard_collision_cache_hits": 0, + "iteration_conflict_edges": 39, + "iteration_conflicting_nets": 36, + "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, + "pair_local_search_accepts": 2, + "pair_local_search_attempts": 2, + "pair_local_search_nodes_expanded": 68, + "pair_local_search_pairs_considered": 2, + "path_cost_calls": 0, + "pruned_closed_set": 439, + "pruned_cost": 533, + "pruned_hard_collision": 0, + "ray_cast_calls": 5477, + "ray_cast_calls_expand_forward": 1704, + "ray_cast_calls_expand_snap": 46, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 3721, + "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_exact_geometry_checks": 0, + "refine_path_calls": 10, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 6, + "score_component_calls": 8634, + "score_component_total_ns": 222749506, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 2482, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 1756, + "verify_dynamic_exact_pair_checks": 510, + "verify_path_report_calls": 160, + "verify_static_buffer_ops": 751, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 6, + "visibility_tangent_candidate_ray_tests": 6, + "visibility_tangent_candidate_scans": 1704, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 10, + "repeat": 1, + "seed": 42, + "summary": { + "reached_targets": 10, + "total_results": 10, + "valid_results": 10 + } + }, + { + "duration_s": 50.18633775901981, + "metrics": { + "congestion_cache_hits": 1713, + "congestion_cache_misses": 165223, + "congestion_candidate_ids": 312161, + "congestion_candidate_nets": 300960, + "congestion_candidate_precheck_hits": 159843, + "congestion_candidate_precheck_misses": 7810, + "congestion_candidate_precheck_skips": 717, + "congestion_check_calls": 165223, + "congestion_exact_pair_checks": 249697, + "congestion_grid_net_cache_hits": 152369, + "congestion_grid_net_cache_misses": 13481, + "congestion_grid_span_cache_hits": 144618, + "congestion_grid_span_cache_misses": 6885, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 160549, + "congestion_net_envelope_cache_misses": 14205, + "congestion_presence_cache_hits": 186369, + "congestion_presence_cache_misses": 9324, + "congestion_presence_skips": 27588, + "danger_map_cache_hits": 453553, + "danger_map_cache_misses": 140744, + "danger_map_lookup_calls": 594297, + "danger_map_query_calls": 140744, + "danger_map_total_ns": 4360608337, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 683, + "dynamic_path_objects_removed": 637, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 23437.5, + "guidance_bonus_applied_bend90": 8437.5, + "guidance_bonus_applied_sbend": 1000.0, + "guidance_bonus_applied_straight": 14000.0, + "guidance_match_moves": 375, + "guidance_match_moves_bend90": 135, + "guidance_match_moves_sbend": 16, + "guidance_match_moves_straight": 224, + "hard_collision_cache_hits": 859, + "iteration_conflict_edges": 51, + "iteration_conflicting_nets": 57, + "iteration_reverified_nets": 90, + "iteration_reverify_calls": 9, + "move_cache_abs_hits": 140734, + "move_cache_abs_misses": 183345, + "move_cache_rel_hits": 180943, + "move_cache_rel_misses": 2402, + "moves_added": 197062, + "moves_generated": 324079, + "nets_carried_forward": 0, + "nets_reached_target": 90, + "nets_routed": 90, + "nodes_expanded": 61259, + "pair_local_search_accepts": 2, + "pair_local_search_attempts": 3, + "pair_local_search_nodes_expanded": 38, + "pair_local_search_pairs_considered": 2, + "path_cost_calls": 0, + "pruned_closed_set": 49632, + "pruned_cost": 5502, + "pruned_hard_collision": 2123, + "ray_cast_calls": 166977, + "ray_cast_calls_expand_forward": 61169, + "ray_cast_calls_expand_snap": 735, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 103738, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 1335, + "ray_cast_candidate_bounds": 11494, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 10, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 9, + "score_component_calls": 203601, + "score_component_total_ns": 5065858683, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 120231, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 2653, + "verify_dynamic_exact_pair_checks": 714, + "verify_path_report_calls": 220, + "verify_static_buffer_ops": 1185, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 1405, + "visibility_tangent_candidate_ray_tests": 1335, + "visibility_tangent_candidate_scans": 61169, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 10, + "repeat": 0, + "seed": 43, + "summary": { + "reached_targets": 10, + "total_results": 10, + "valid_results": 10 + } + }, + { + "duration_s": 50.40192667697556, + "metrics": { + "congestion_cache_hits": 1713, + "congestion_cache_misses": 165223, + "congestion_candidate_ids": 312161, + "congestion_candidate_nets": 300960, + "congestion_candidate_precheck_hits": 159843, + "congestion_candidate_precheck_misses": 7810, + "congestion_candidate_precheck_skips": 717, + "congestion_check_calls": 165223, + "congestion_exact_pair_checks": 249697, + "congestion_grid_net_cache_hits": 152369, + "congestion_grid_net_cache_misses": 13481, + "congestion_grid_span_cache_hits": 144618, + "congestion_grid_span_cache_misses": 6885, + "congestion_lazy_requeues": 0, + "congestion_lazy_resolutions": 0, + "congestion_net_envelope_cache_hits": 160549, + "congestion_net_envelope_cache_misses": 14205, + "congestion_presence_cache_hits": 186369, + "congestion_presence_cache_misses": 9324, + "congestion_presence_skips": 27588, + "danger_map_cache_hits": 453553, + "danger_map_cache_misses": 140744, + "danger_map_lookup_calls": 594297, + "danger_map_query_calls": 140744, + "danger_map_total_ns": 4932050184, + "dynamic_grid_rebuilds": 0, + "dynamic_path_objects_added": 683, + "dynamic_path_objects_removed": 637, + "dynamic_tree_rebuilds": 0, + "guidance_bonus_applied": 23437.5, + "guidance_bonus_applied_bend90": 8437.5, + "guidance_bonus_applied_sbend": 1000.0, + "guidance_bonus_applied_straight": 14000.0, + "guidance_match_moves": 375, + "guidance_match_moves_bend90": 135, + "guidance_match_moves_sbend": 16, + "guidance_match_moves_straight": 224, + "hard_collision_cache_hits": 859, + "iteration_conflict_edges": 51, + "iteration_conflicting_nets": 57, + "iteration_reverified_nets": 90, + "iteration_reverify_calls": 9, + "move_cache_abs_hits": 140734, + "move_cache_abs_misses": 183345, + "move_cache_rel_hits": 180943, + "move_cache_rel_misses": 2402, + "moves_added": 197062, + "moves_generated": 324079, + "nets_carried_forward": 0, + "nets_reached_target": 90, + "nets_routed": 90, + "nodes_expanded": 61259, + "pair_local_search_accepts": 2, + "pair_local_search_attempts": 3, + "pair_local_search_nodes_expanded": 38, + "pair_local_search_pairs_considered": 2, + "path_cost_calls": 0, + "pruned_closed_set": 49632, + "pruned_cost": 5502, + "pruned_hard_collision": 2123, + "ray_cast_calls": 166977, + "ray_cast_calls_expand_forward": 61169, + "ray_cast_calls_expand_snap": 735, + "ray_cast_calls_other": 0, + "ray_cast_calls_straight_static": 103738, + "ray_cast_calls_visibility_build": 0, + "ray_cast_calls_visibility_query": 0, + "ray_cast_calls_visibility_tangent": 1335, + "ray_cast_candidate_bounds": 11494, + "ray_cast_exact_geometry_checks": 0, + "refine_path_calls": 10, + "refinement_candidate_side_extents": 0, + "refinement_candidates_accepted": 0, + "refinement_candidates_built": 0, + "refinement_candidates_verified": 0, + "refinement_dynamic_bounds_checked": 0, + "refinement_static_bounds_checked": 0, + "refinement_windows_considered": 0, + "route_iterations": 9, + "score_component_calls": 203601, + "score_component_total_ns": 5635427939, + "static_net_tree_rebuilds": 1, + "static_raw_tree_rebuilds": 1, + "static_safe_cache_hits": 120231, + "static_tree_rebuilds": 1, + "timeout_events": 0, + "verify_dynamic_candidate_nets": 2653, + "verify_dynamic_exact_pair_checks": 714, + "verify_path_report_calls": 220, + "verify_static_buffer_ops": 1185, + "visibility_builds": 0, + "visibility_corner_hits_exact": 0, + "visibility_corner_index_builds": 1, + "visibility_corner_pairs_checked": 0, + "visibility_corner_queries_exact": 0, + "visibility_point_cache_hits": 0, + "visibility_point_cache_misses": 0, + "visibility_point_queries": 0, + "visibility_tangent_candidate_corner_checks": 1405, + "visibility_tangent_candidate_ray_tests": 1335, + "visibility_tangent_candidate_scans": 61169, + "warm_start_paths_built": 0, + "warm_start_paths_used": 0 + }, + "num_nets": 10, + "repeat": 1, + "seed": 43, + "summary": { + "reached_targets": 10, + "total_results": 10, + "valid_results": 10 + } + } + ], + "generated_at": "2026-04-02T15:53:29-07:00", + "generator": "scripts/characterize_pair_local_search.py", + "grid": { + "num_nets": [ + 6, + 8, + 10 + ], + "repeats": 2, + "seeds": [ + 41, + 42, + 43 + ] + }, + "recommended_smoke_scenario": null +} diff --git a/docs/pair_local_characterization.md b/docs/pair_local_characterization.md new file mode 100644 index 0000000..753cbdf --- /dev/null +++ b/docs/pair_local_characterization.md @@ -0,0 +1,30 @@ +# Pair-Local Search Characterization + +Generated at 2026-04-02T15:53:29-07:00 by `scripts/characterize_pair_local_search.py`. + +Grid: `num_nets=[6, 8, 10]`, `seed=[41, 42, 43]`, repeats=2. + +| Nets | Seed | Repeat | Duration (s) | Valid | Reached | Pair Pairs | Pair Accepts | Pair Nodes | Nodes | Checks | +| :-- | :-- | :-- | --: | --: | --: | --: | --: | --: | --: | --: | +| 6 | 41 | 0 | 0.5462 | 1 | 6 | 0 | 0 | 0 | 500 | 674 | +| 6 | 41 | 1 | 0.5256 | 1 | 6 | 0 | 0 | 0 | 500 | 674 | +| 6 | 42 | 0 | 0.5241 | 1 | 6 | 0 | 0 | 0 | 503 | 683 | +| 6 | 42 | 1 | 0.5477 | 1 | 6 | 0 | 0 | 0 | 503 | 683 | +| 6 | 43 | 0 | 0.5199 | 1 | 6 | 0 | 0 | 0 | 493 | 654 | +| 6 | 43 | 1 | 0.5160 | 1 | 6 | 0 | 0 | 0 | 493 | 654 | +| 8 | 41 | 0 | 1.8818 | 8 | 8 | 2 | 2 | 38 | 1558 | 4313 | +| 8 | 41 | 1 | 1.8618 | 8 | 8 | 2 | 2 | 38 | 1558 | 4313 | +| 8 | 42 | 0 | 1.4850 | 8 | 8 | 1 | 1 | 19 | 1440 | 3799 | +| 8 | 42 | 1 | 1.4636 | 8 | 8 | 1 | 1 | 19 | 1440 | 3799 | +| 8 | 43 | 0 | 1.0652 | 8 | 8 | 0 | 0 | 0 | 939 | 1844 | +| 8 | 43 | 1 | 1.0502 | 8 | 8 | 0 | 0 | 0 | 939 | 1844 | +| 10 | 41 | 0 | 2.8617 | 8 | 10 | 2 | 2 | 41 | 2223 | 6208 | +| 10 | 41 | 1 | 2.8282 | 8 | 10 | 2 | 2 | 41 | 2223 | 6208 | +| 10 | 42 | 0 | 2.0356 | 10 | 10 | 2 | 2 | 68 | 1764 | 4625 | +| 10 | 42 | 1 | 2.0052 | 10 | 10 | 2 | 2 | 68 | 1764 | 4625 | +| 10 | 43 | 0 | 50.1863 | 10 | 10 | 2 | 2 | 38 | 61259 | 165223 | +| 10 | 43 | 1 | 50.4019 | 10 | 10 | 2 | 2 | 38 | 61259 | 165223 | + +## Recommendation + +No smaller stable pair-local smoke scenario satisfied the rule `valid_results == total_results`, `pair_local_search_accepts >= 1`, and `duration_s <= 1.0` across all repeats. diff --git a/docs/performance.md b/docs/performance.md index ed68e16..7085214 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -7,6 +7,9 @@ Use `scripts/diff_performance_baseline.py` to compare a fresh run against that s The default baseline table below covers the standard example corpus only. The heavier `example_07_large_scale_routing_no_warm_start` canary remains performance-only and is tracked through targeted diffs plus the conflict/frontier trace artifacts. +Use `scripts/characterize_pair_local_search.py` when you want a small parameter sweep over example_07-style no-warm runs instead of a single canary reading. +The current tracked sweep output lives in `docs/pair_local_characterization.json` and `docs/pair_local_characterization.md`. + | 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.0040 | 1 | 1 | 1 | 1 | 1 | 2 | 10 | 11 | 7 | 0 | 0 | 0 | 4 | @@ -31,6 +34,8 @@ For the current accepted branch, the most important performance-only canary is ` - `pair_local_search_accepts` - `pair_local_search_nodes_expanded` +The latest tracked characterization sweep confirms there is no smaller stable pair-local smoke case under the `<=1.0s` rule, so the 10-net no-warm-start canary remains the primary regression target for this behavior. + Tracked metric keys: nodes_expanded, moves_generated, moves_added, pruned_closed_set, pruned_hard_collision, pruned_cost, route_iterations, nets_routed, nets_reached_target, warm_start_paths_built, warm_start_paths_used, refine_path_calls, timeout_events, iteration_reverify_calls, iteration_reverified_nets, iteration_conflicting_nets, iteration_conflict_edges, nets_carried_forward, score_component_calls, score_component_total_ns, path_cost_calls, danger_map_lookup_calls, danger_map_cache_hits, danger_map_cache_misses, danger_map_query_calls, danger_map_total_ns, move_cache_abs_hits, move_cache_abs_misses, move_cache_rel_hits, move_cache_rel_misses, guidance_match_moves, guidance_match_moves_straight, guidance_match_moves_bend90, guidance_match_moves_sbend, guidance_bonus_applied, guidance_bonus_applied_straight, guidance_bonus_applied_bend90, guidance_bonus_applied_sbend, static_safe_cache_hits, hard_collision_cache_hits, congestion_cache_hits, congestion_cache_misses, congestion_presence_cache_hits, congestion_presence_cache_misses, congestion_presence_skips, congestion_candidate_precheck_hits, congestion_candidate_precheck_misses, congestion_candidate_precheck_skips, congestion_grid_net_cache_hits, congestion_grid_net_cache_misses, congestion_grid_span_cache_hits, congestion_grid_span_cache_misses, congestion_candidate_nets, congestion_net_envelope_cache_hits, congestion_net_envelope_cache_misses, dynamic_path_objects_added, dynamic_path_objects_removed, dynamic_tree_rebuilds, dynamic_grid_rebuilds, static_tree_rebuilds, static_raw_tree_rebuilds, static_net_tree_rebuilds, visibility_corner_index_builds, visibility_builds, visibility_corner_pairs_checked, visibility_corner_queries_exact, visibility_corner_hits_exact, visibility_point_queries, visibility_point_cache_hits, visibility_point_cache_misses, visibility_tangent_candidate_scans, visibility_tangent_candidate_corner_checks, visibility_tangent_candidate_ray_tests, ray_cast_calls, ray_cast_calls_straight_static, ray_cast_calls_expand_snap, ray_cast_calls_expand_forward, ray_cast_calls_visibility_build, ray_cast_calls_visibility_query, ray_cast_calls_visibility_tangent, ray_cast_calls_other, ray_cast_candidate_bounds, ray_cast_exact_geometry_checks, congestion_check_calls, congestion_lazy_resolutions, congestion_lazy_requeues, congestion_candidate_ids, congestion_exact_pair_checks, verify_path_report_calls, verify_static_buffer_ops, verify_dynamic_candidate_nets, verify_dynamic_exact_pair_checks, refinement_windows_considered, refinement_static_bounds_checked, refinement_dynamic_bounds_checked, refinement_candidate_side_extents, refinement_candidates_built, refinement_candidates_verified, refinement_candidates_accepted, pair_local_search_pairs_considered, pair_local_search_attempts, pair_local_search_accepts, pair_local_search_nodes_expanded diff --git a/inire/tests/example_scenarios.py b/inire/tests/example_scenarios.py index 3023688..c7feb84 100644 --- a/inire/tests/example_scenarios.py +++ b/inire/tests/example_scenarios.py @@ -432,17 +432,19 @@ def trace_example_07_no_warm_start() -> RoutingRunResult: return _trace_example_07_variant(warm_start_enabled=False) -def _snapshot_example_07_variant( - name: str, +def _build_example_07_variant_stack( *, + num_nets: int, + seed: int, warm_start_enabled: bool, -) -> ScenarioSnapshot: + capture_conflict_trace: bool = False, + capture_frontier_trace: bool = False, +) -> tuple[CostEvaluator, AStarMetrics, PathFinder]: bounds = (0, 0, 1000, 1000) obstacles = [ box(450, 0, 550, 400), box(450, 600, 550, 1000), ] - num_nets = 10 start_x = 50 start_y_base = 500 - (num_nets * 10.0) / 2.0 end_x = 950 @@ -477,74 +479,30 @@ def _snapshot_example_07_variant( "multiplier": 1.4, "net_order": "shortest", "capture_expanded": True, + "capture_conflict_trace": capture_conflict_trace, + "capture_frontier_trace": capture_frontier_trace, "shuffle_nets": True, - "seed": 42, + "seed": seed, "warm_start_enabled": warm_start_enabled, }, ) - - def iteration_callback(idx: int, current_results: dict[str, RoutingResult]) -> None: - _ = current_results - new_greedy = max(1.1, 1.5 - ((idx + 1) / 10.0) * 0.4) - evaluator.greedy_h_weight = new_greedy - metrics.reset_per_route() - - t0 = perf_counter() - results = pathfinder.route_all(iteration_callback=iteration_callback) - t1 = perf_counter() - return _make_snapshot(name, results, t1 - t0, pathfinder.metrics.snapshot()) + return evaluator, metrics, pathfinder -def _trace_example_07_variant( +def _run_example_07_variant( *, + num_nets: int, + seed: int, warm_start_enabled: bool, + capture_conflict_trace: bool = False, + capture_frontier_trace: bool = False, ) -> RoutingRunResult: - bounds = (0, 0, 1000, 1000) - obstacles = [ - box(450, 0, 550, 400), - box(450, 600, 550, 1000), - ] - num_nets = 10 - 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 = {} - 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( - bounds=bounds, - netlist=netlist, - widths=widths, - 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": True, - "capture_frontier_trace": True, - "shuffle_nets": True, - "seed": 42, - "warm_start_enabled": warm_start_enabled, - }, + evaluator, metrics, pathfinder = _build_example_07_variant_stack( + num_nets=num_nets, + seed=seed, + warm_start_enabled=warm_start_enabled, + capture_conflict_trace=capture_conflict_trace, + capture_frontier_trace=capture_frontier_trace, ) def iteration_callback(idx: int, current_results: dict[str, RoutingResult]) -> None: @@ -557,6 +515,34 @@ def _trace_example_07_variant( return _make_run_result(results, pathfinder) +def _snapshot_example_07_variant( + name: str, + *, + warm_start_enabled: bool, +) -> ScenarioSnapshot: + t0 = perf_counter() + run = _run_example_07_variant( + num_nets=10, + seed=42, + warm_start_enabled=warm_start_enabled, + ) + t1 = perf_counter() + return _make_snapshot(name, run.results_by_net, t1 - t0, run.metrics) + + +def _trace_example_07_variant( + *, + warm_start_enabled: bool, +) -> RoutingRunResult: + return _run_example_07_variant( + num_nets=10, + seed=42, + warm_start_enabled=warm_start_enabled, + capture_conflict_trace=True, + capture_frontier_trace=True, + ) + + def run_example_07() -> ScenarioOutcome: return snapshot_example_07().as_outcome() diff --git a/inire/tests/test_example_performance.py b/inire/tests/test_example_performance.py index 5b594a5..d572228 100644 --- a/inire/tests/test_example_performance.py +++ b/inire/tests/test_example_performance.py @@ -15,7 +15,7 @@ if TYPE_CHECKING: RUN_PERFORMANCE = os.environ.get("INIRE_RUN_PERFORMANCE") == "1" PERFORMANCE_REPEATS = 3 REGRESSION_FACTOR = 1.5 -NO_WARM_START_REGRESSION_SECONDS = 180.0 +NO_WARM_START_REGRESSION_SECONDS = 15.0 # Baselines are measured from clean 6a28dcf-style runs without plotting. BASELINE_SECONDS = { diff --git a/inire/tests/test_example_regressions.py b/inire/tests/test_example_regressions.py index 43256da..a7c3b73 100644 --- a/inire/tests/test_example_regressions.py +++ b/inire/tests/test_example_regressions.py @@ -22,6 +22,7 @@ from inire.tests.example_scenarios import ( AStarMetrics, snapshot_example_05, snapshot_example_07_no_warm_start, + trace_example_07_no_warm_start, ) @@ -57,6 +58,28 @@ def test_example_07_no_warm_start_canary_improves_validity() -> None: assert snapshot.total_results == 10 assert snapshot.reached_targets == 10 assert snapshot.valid_results == 10 + assert snapshot.metrics.warm_start_paths_built == 0 + assert snapshot.metrics.warm_start_paths_used == 0 + assert snapshot.metrics.pair_local_search_pairs_considered >= 1 + assert snapshot.metrics.pair_local_search_accepts >= 1 + assert snapshot.metrics.pair_local_search_nodes_expanded <= 128 + assert snapshot.metrics.nodes_expanded <= 2500 + assert snapshot.metrics.congestion_check_calls <= 6000 + + +def test_example_07_no_warm_start_trace_finishes_without_conflict_edges() -> None: + run = trace_example_07_no_warm_start() + + assert len(run.results_by_net) == 10 + assert sum(result.is_valid for result in run.results_by_net.values()) == 10 + assert sum(result.reached_target for result in run.results_by_net.values()) == 10 + assert run.metrics.pair_local_search_pairs_considered >= 1 + assert run.metrics.pair_local_search_accepts >= 1 + + final_entry = run.conflict_trace[-1] + assert final_entry.stage == "final" + assert len(final_entry.completed_net_ids) == 10 + assert final_entry.conflict_edges == () def test_example_06_clipped_bbox_margin_restores_legacy_seed() -> None: diff --git a/inire/tests/test_performance_reporting.py b/inire/tests/test_performance_reporting.py index 062747d..b594308 100644 --- a/inire/tests/test_performance_reporting.py +++ b/inire/tests/test_performance_reporting.py @@ -274,3 +274,33 @@ def test_record_frontier_trace_script_writes_selected_scenario(tmp_path: Path) - assert payload["generator"] == "scripts/record_frontier_trace.py" assert [entry["name"] for entry in payload["scenarios"]] == ["example_05_orientation_stress"] assert (tmp_path / "frontier_trace.md").exists() + + +def test_characterize_pair_local_search_script_writes_outputs(tmp_path: Path) -> None: + repo_root = Path(__file__).resolve().parents[2] + script_path = repo_root / "scripts" / "characterize_pair_local_search.py" + + subprocess.run( + [ + sys.executable, + str(script_path), + "--output-dir", + str(tmp_path), + "--num-nets", + "6", + "--seeds", + "41", + "--repeats", + "1", + ], + check=True, + ) + + payload = json.loads((tmp_path / "pair_local_characterization.json").read_text()) + assert payload["generated_at"] + assert payload["generator"] == "scripts/characterize_pair_local_search.py" + assert payload["grid"]["num_nets"] == [6] + assert payload["grid"]["seeds"] == [41] + assert payload["grid"]["repeats"] == 1 + assert len(payload["cases"]) == 1 + assert (tmp_path / "pair_local_characterization.md").exists() diff --git a/scripts/characterize_pair_local_search.py b/scripts/characterize_pair_local_search.py new file mode 100644 index 0000000..5b575e3 --- /dev/null +++ b/scripts/characterize_pair_local_search.py @@ -0,0 +1,177 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import argparse +import json +from dataclasses import asdict +from datetime import datetime +from pathlib import Path +from time import perf_counter + +from inire.tests.example_scenarios import _run_example_07_variant + + +def _parse_csv_ints(raw: str) -> tuple[int, ...]: + return tuple(int(part) for part in raw.split(",") if part.strip()) + + +def _run_case(num_nets: int, seed: int) -> dict[str, object]: + t0 = perf_counter() + run = _run_example_07_variant( + num_nets=num_nets, + seed=seed, + warm_start_enabled=False, + ) + duration_s = perf_counter() - t0 + return { + "duration_s": duration_s, + "summary": { + "total_results": len(run.results_by_net), + "valid_results": sum(1 for result in run.results_by_net.values() if result.is_valid), + "reached_targets": sum(1 for result in run.results_by_net.values() if result.reached_target), + }, + "metrics": asdict(run.metrics), + } + + +def _is_smoke_candidate(entry: dict[str, object]) -> bool: + summary = entry["summary"] + metrics = entry["metrics"] + return ( + summary["valid_results"] == summary["total_results"] + and metrics["pair_local_search_accepts"] >= 1 + and entry["duration_s"] <= 1.0 + ) + + +def _select_smoke_case(cases: list[dict[str, object]]) -> dict[str, object] | None: + grouped: dict[tuple[int, int], list[dict[str, object]]] = {} + for case in cases: + key = (case["num_nets"], case["seed"]) + grouped.setdefault(key, []).append(case) + + candidates = [] + for (num_nets, seed), repeats in grouped.items(): + if repeats and all(_is_smoke_candidate(repeat) for repeat in repeats): + candidates.append({"num_nets": num_nets, "seed": seed}) + if not candidates: + return None + candidates.sort(key=lambda item: (item["num_nets"], item["seed"])) + return candidates[0] + + +def _render_markdown(payload: dict[str, object]) -> str: + lines = [ + "# Pair-Local Search Characterization", + "", + f"Generated at {payload['generated_at']} by `{payload['generator']}`.", + "", + f"Grid: `num_nets={payload['grid']['num_nets']}`, `seed={payload['grid']['seeds']}`, repeats={payload['grid']['repeats']}.", + "", + "| Nets | Seed | Repeat | Duration (s) | Valid | Reached | Pair Pairs | Pair Accepts | Pair Nodes | Nodes | Checks |", + "| :-- | :-- | :-- | --: | --: | --: | --: | --: | --: | --: | --: |", + ] + for case in payload["cases"]: + summary = case["summary"] + metrics = case["metrics"] + lines.append( + "| " + f"{case['num_nets']} | " + f"{case['seed']} | " + f"{case['repeat']} | " + f"{case['duration_s']:.4f} | " + f"{summary['valid_results']} | " + f"{summary['reached_targets']} | " + f"{metrics['pair_local_search_pairs_considered']} | " + f"{metrics['pair_local_search_accepts']} | " + f"{metrics['pair_local_search_nodes_expanded']} | " + f"{metrics['nodes_expanded']} | " + f"{metrics['congestion_check_calls']} |" + ) + + lines.extend(["", "## Recommendation", ""]) + recommended = payload["recommended_smoke_scenario"] + if recommended is None: + lines.append( + "No smaller stable pair-local smoke scenario satisfied the rule " + "`valid_results == total_results`, `pair_local_search_accepts >= 1`, and `duration_s <= 1.0` across all repeats." + ) + else: + lines.append( + f"Recommended smoke scenario: `num_nets={recommended['num_nets']}`, `seed={recommended['seed']}`." + ) + return "\n".join(lines) + + +def main() -> None: + parser = argparse.ArgumentParser(description="Characterize pair-local search across example_07-style no-warm runs.") + parser.add_argument( + "--num-nets", + default="6,8,10", + help="Comma-separated num_nets values to sweep. Default: 6,8,10.", + ) + parser.add_argument( + "--seeds", + default="41,42,43", + help="Comma-separated seed values to sweep. Default: 41,42,43.", + ) + parser.add_argument( + "--repeats", + type=int, + default=2, + help="Number of repeated runs per (num_nets, seed). Default: 2.", + ) + parser.add_argument( + "--output-dir", + type=Path, + default=None, + help="Directory to write pair_local_characterization.json and .md into. Defaults to /docs.", + ) + args = parser.parse_args() + + repo_root = Path(__file__).resolve().parents[1] + output_dir = repo_root / "docs" if args.output_dir is None else args.output_dir.resolve() + output_dir.mkdir(exist_ok=True) + + num_nets_values = _parse_csv_ints(args.num_nets) + seed_values = _parse_csv_ints(args.seeds) + + cases: list[dict[str, object]] = [] + for num_nets in num_nets_values: + for seed in seed_values: + for repeat in range(args.repeats): + case = _run_case(num_nets, seed) + case["num_nets"] = num_nets + case["seed"] = seed + case["repeat"] = repeat + cases.append(case) + + payload = { + "generated_at": datetime.now().astimezone().isoformat(timespec="seconds"), + "generator": "scripts/characterize_pair_local_search.py", + "grid": { + "num_nets": list(num_nets_values), + "seeds": list(seed_values), + "repeats": args.repeats, + }, + "cases": cases, + "recommended_smoke_scenario": _select_smoke_case(cases), + } + + json_path = output_dir / "pair_local_characterization.json" + markdown_path = output_dir / "pair_local_characterization.md" + json_path.write_text(json.dumps(payload, indent=2, sort_keys=True) + "\n") + markdown_path.write_text(_render_markdown(payload) + "\n") + + if json_path.is_relative_to(repo_root): + print(f"Wrote {json_path.relative_to(repo_root)}") + else: + print(f"Wrote {json_path}") + if markdown_path.is_relative_to(repo_root): + print(f"Wrote {markdown_path.relative_to(repo_root)}") + else: + print(f"Wrote {markdown_path}") + + +if __name__ == "__main__": + main()