Tests that the route calculations excess load correctly.
(ok_small)
| 210 | |
| 211 | |
| 212 | def test_excess_load(ok_small): |
| 213 | """ |
| 214 | Tests that the route calculations excess load correctly. |
| 215 | """ |
| 216 | route = make_search_route(ok_small, [1, 2, 3, 4]) |
| 217 | |
| 218 | # The instance has four clients, which have a total delivery demand of 18. |
| 219 | # The only vehicle type in the instance has a capacity of 10, so this route |
| 220 | # has excess load. |
| 221 | assert_(route.has_excess_load()) |
| 222 | assert_equal(route.excess_load(), [8]) |
| 223 | assert_equal(route.load(), [18]) |
| 224 | assert_equal(route.capacity(), [10]) |
| 225 | |
| 226 | |
| 227 | @pytest.mark.parametrize("fixed_cost", [0, 9]) |
nothing calls this directly
no test coverage detected