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

Function test_solve_same_seed

tests/test_solve.py:66–75  ·  view source on GitHub ↗

Smoke test that checks that that solving an instance with the same seed results in the same search trajectories.

(ok_small)

Source from the content-addressed store, hash-verified

64
65
66def test_solve_same_seed(ok_small):
67 """
68 Smoke test that checks that that solving an instance with the same seed
69 results in the same search trajectories.
70 """
71 res1 = solve(ok_small, stop=MaxIterations(10), seed=0)
72 res2 = solve(ok_small, stop=MaxIterations(10), seed=0)
73
74 assert_equal(res1.best, res2.best)
75 assert_equal(res1.stats.data, res2.stats.data)
76
77
78def test_solve_initial_solution(rc208):

Callers

nothing calls this directly

Calls 2

solveFunction · 0.90
MaxIterationsClass · 0.90

Tested by

no test coverage detected