Tests that the load_between() method correctly calculates the load for multiple dimensions.
(frm, to, dim, expected)
| 680 | ], |
| 681 | ) |
| 682 | def test_load_between_multiple_dimensions(frm, to, dim, expected): |
| 683 | """ |
| 684 | Tests that the load_between() method correctly calculates the load for |
| 685 | multiple dimensions. |
| 686 | """ |
| 687 | data = ProblemData( |
| 688 | clients=[ |
| 689 | Client(1, 0, delivery=[1, 2]), |
| 690 | Client(2, 0, delivery=[4, 5]), |
| 691 | ], |
| 692 | depots=[Depot(0, 0)], |
| 693 | vehicle_types=[VehicleType(1, capacity=[10, 10])], |
| 694 | distance_matrices=[np.zeros((3, 3), dtype=int)], |
| 695 | duration_matrices=[np.zeros((3, 3), dtype=int)], |
| 696 | ) |
| 697 | |
| 698 | route = make_search_route(data, [1, 2]) |
| 699 | assert_equal(route.load_between(frm, to, dimension=dim).load(), expected) |
| 700 | |
| 701 | |
| 702 | def test_load_between_equal_to_before_after_when_one_is_depot_different_dims( |
nothing calls this directly
no test coverage detected