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

Function test_get_neighbours

tests/search/test_SearchSpace.py:97–108  ·  view source on GitHub ↗

Tests getting the SearchSpace's full granular neighbourhood, and client-specific neighbourhoods.

(ok_small)

Source from the content-addressed store, hash-verified

95
96
97def test_get_neighbours(ok_small):
98 """
99 Tests getting the SearchSpace's full granular neighbourhood, and
100 client-specific neighbourhoods.
101 """
102 neighbours = [[], [2, 3], [3, 4], [1, 2], [2, 3]]
103
104 search_space = SearchSpace(ok_small, neighbours)
105 assert_equal(search_space.neighbours, neighbours)
106
107 for idx in range(ok_small.num_locations):
108 assert_equal(neighbours[idx], search_space.neighbours_of(idx))
109
110
111def test_promising(ok_small):

Callers

nothing calls this directly

Calls 1

SearchSpaceClass · 0.85

Tested by

no test coverage detected