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

Function test_X_instance

tests/test_minimise_fleet.py:66–76  ·  view source on GitHub ↗

Tests that the fleet minimisation procedure attains the lower bound on this particular X instance.

()

Source from the content-addressed store, hash-verified

64
65
66def test_X_instance():
67 """
68 Tests that the fleet minimisation procedure attains the lower bound on this
69 particular X instance.
70 """
71 data = read("data/X-n101-50-k13.vrp", round_func="round")
72 assert_equal(data.num_vehicles, 100)
73
74 vehicle_type = minimise_fleet(data, MaxIterations(10))
75 data = data.replace(vehicle_types=[vehicle_type])
76 assert_equal(data.num_vehicles, 13)
77
78
79def test_lower_bound_multi_trip_instance(ok_small_multiple_trips):

Callers

nothing calls this directly

Calls 4

readFunction · 0.90
minimise_fleetFunction · 0.90
MaxIterationsClass · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected