MCPcopy Index your code
hub / github.com/PyVRP/PyVRP / test_solve_initial_solution

Function test_solve_initial_solution

tests/test_solve.py:78–86  ·  view source on GitHub ↗

Tests that solving an instance with an initial solution works as expected by checking that the best solution found is the same as the initial solution.

(rc208)

Source from the content-addressed store, hash-verified

76
77
78def test_solve_initial_solution(rc208):
79 """
80 Tests that solving an instance with an initial solution works as
81 expected by checking that the best solution found is the same as the
82 initial solution.
83 """
84 bks = read_solution("data/RC208.sol", rc208)
85 res = solve(rc208, stop=MaxIterations(0), initial_solution=bks)
86 assert_equal(res.best, bks)
87
88
89def test_solve_custom_params(rc208):

Callers

nothing calls this directly

Calls 3

read_solutionFunction · 0.90
solveFunction · 0.90
MaxIterationsClass · 0.90

Tested by

no test coverage detected