MCPcopy Create free account
hub / github.com/PyVRP/PyVRP / test_excess_load

Function test_excess_load

tests/search/test_Route.py:212–224  ·  view source on GitHub ↗

Tests that the route calculations excess load correctly.

(ok_small)

Source from the content-addressed store, hash-verified

210
211
212def 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])

Callers

nothing calls this directly

Calls 2

make_search_routeFunction · 0.90
loadMethod · 0.45

Tested by

no test coverage detected