P4Learned Delivery Routing
9

System line · 09 of 13

Test suite

The suite runs in about ten seconds on a committed fixture of 3,000 real trips, so it needs no download. Impossible cases must end in a clear no-solution report.

Normal
18 test functions
Edge
6 test functions
Impossible
5 test functions
Result
38 passed

Normal

  • test_all_solvers_valid_and_identicalcsp
  • test_forward_checking_never_needs_more_assignmentscsp
  • test_ac3_prunes_triangle_with_a_fixed_ordercsp
  • test_pairwise_conflict_edge_is_created_from_predicted_timescsp
  • test_plan_serves_every_order_once_on_timeintegration
  • test_replay_counts_late_deliveries_with_known_durationsintegration
  • test_backprop_matches_finite_differencesnn_data
  • test_fixture_schema_and_filtersnn_data
  • test_nn_trains_and_beats_global_mean_on_fixturenn_data
  • test_baselines_fit_and_back_offnn_data
  • test_generator_is_seedednn_data
  • test_time_model_interpolation_is_fifo_and_exact_at_knotsnn_data
  • test_known_answer_small_examplesearch
  • test_astar_and_ucs_match_brute_force_on_6_stopssearch
  • test_admissible_heuristic_never_overestimatessearch
  • test_naive_current_hour_heuristic_can_overestimatesearch
  • test_astar_expands_fewer_nodes_than_ucssearch
  • test_greedy_feasible_and_not_better_than_optimalsearch

Edge

  • test_edge_late_shift_van_removed_from_domain_by_unary_constraintcsp
  • test_edge_more_vans_than_ordersintegration
  • test_edge_empty_vansearch
  • test_edge_single_stop_in_depot_zonesearch
  • test_edge_zero_width_window_hit_exactly_and_boundary_arrivalsearch
  • test_edge_early_arrival_waitssearch

Impossible

  • test_impossible_four_mutually_conflicting_orders_three_vanscsp
  • test_impossible_capacitycsp
  • test_impossible_unreachable_window_reports_reason_and_wideningintegration
  • test_impossible_single_van_loop_ends_in_no_solutionintegration
  • test_impossible_route_returns_none_then_least_late_routesearch

Last run

python -m pytest -v
============================= test session starts =============================
platform win32 -- Python 3.13.14, pytest-9.2.0, pluggy-1.7.0
rootdir: IS-Project-P4-Delivery-Routing
collecting ... collected 38 items

tests/test_csp.py::test_all_solvers_valid_and_identical[0] PASSED        [  2%]
tests/test_csp.py::test_all_solvers_valid_and_identical[1] PASSED        [  5%]
tests/test_csp.py::test_all_solvers_valid_and_identical[2] PASSED        [  7%]
tests/test_csp.py::test_forward_checking_never_needs_more_assignments PASSED [ 10%]
tests/test_csp.py::test_ac3_prunes_triangle_with_a_fixed_order PASSED    [ 13%]
tests/test_csp.py::test_pairwise_conflict_edge_is_created_from_predicted_times PASSED [ 15%]
tests/test_csp.py::test_edge_late_shift_van_removed_from_domain_by_unary_constraint PASSED [ 18%]
tests/test_csp.py::test_impossible_four_mutually_conflicting_orders_three_vans PASSED [ 21%]
tests/test_csp.py::test_impossible_capacity PASSED                       [ 23%]
tests/test_integration.py::test_plan_serves_every_order_once_on_time[0] PASSED [ 26%]
tests/test_integration.py::test_plan_serves_every_order_once_on_time[1] PASSED [ 28%]
tests/test_integration.py::test_plan_serves_every_order_once_on_time[2] PASSED [ 31%]
tests/test_integration.py::test_replay_counts_late_deliveries_with_known_durations PASSED [ 34%]
tests/test_integration.py::test_edge_more_vans_than_orders PASSED        [ 36%]
tests/test_integration.py::test_impossible_unreachable_window_reports_reason_and_widening PASSED [ 39%]
tests/test_integration.py::test_impossible_single_van_loop_ends_in_no_solution PASSED [ 42%]
tests/test_nn_data.py::test_backprop_matches_finite_differences PASSED   [ 44%]
tests/test_nn_data.py::test_fixture_schema_and_filters PASSED            [ 47%]
tests/test_nn_data.py::test_nn_trains_and_beats_global_mean_on_fixture PASSED [ 50%]
tests/test_nn_data.py::test_baselines_fit_and_back_off PASSED            [ 52%]
tests/test_nn_data.py::test_generator_is_seeded PASSED                   [ 55%]
tests/test_nn_data.py::test_time_model_interpolation_is_fifo_and_exact_at_knots PASSED [ 57%]
tests/test_search.py::test_known_answer_small_example[astar] PASSED      [ 60%]
tests/test_search.py::test_known_answer_small_example[ucs] PASSED        [ 63%]
tests/test_search.py::test_astar_and_ucs_match_brute_force_on_6_stops[0] PASSED [ 65%]
tests/test_search.py::test_astar_and_ucs_match_brute_force_on_6_stops[1] PASSED [ 68%]
tests/test_search.py::test_astar_and_ucs_match_brute_force_on_6_stops[2] PASSED [ 71%]
tests/test_search.py::test_astar_and_ucs_match_brute_force_on_6_stops[3] PASSED [ 73%]
tests/test_search.py::test_astar_and_ucs_match_brute_force_on_6_stops[4] PASSED [ 76%]
tests/test_search.py::test_admissible_heuristic_never_overestimates PASSED [ 78%]
tests/test_search.py::test_naive_current_hour_heuristic_can_overestimate PASSED [ 81%]
tests/test_search.py::test_astar_expands_fewer_nodes_than_ucs PASSED     [ 84%]
tests/test_search.py::test_greedy_feasible_and_not_better_than_optimal PASSED [ 86%]
tests/test_search.py::test_edge_empty_van PASSED                         [ 89%]
tests/test_search.py::test_edge_single_stop_in_depot_zone PASSED         [ 92%]
tests/test_search.py::test_edge_zero_width_window_hit_exactly_and_boundary_arrival PASSED [ 94%]
tests/test_search.py::test_edge_early_arrival_waits PASSED               [ 97%]
tests/test_search.py::test_impossible_route_returns_none_then_least_late_route PASSED [100%]

============================= 38 passed in 9.81s ==============================