diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7613d20..f409260 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,6 +78,10 @@ jobs: with: platforms: all + - name: Set version + run: | + sed -i 's/^version = 0\.1\.0$/version =${{ github.ref_name }}/' setup.cfg + - name: Build wheels if: matrix.platform != 'macos-arm' uses: pypa/cibuildwheel@v2.19.2 diff --git a/src/bind/input/input.cpp b/src/bind/input/input.cpp index b61cda7..bf3ca7b 100644 --- a/src/bind/input/input.cpp +++ b/src/bind/input/input.cpp @@ -53,8 +53,7 @@ void init_input(py::module_ &m) { .def("has_homogeneous_profiles", &vroom::Input::has_homogeneous_profiles) .def("has_homogeneous_costs", &vroom::Input::has_homogeneous_costs) .def("_solve", &vroom::Input::solve, "Solve problem.", - py::arg("nb_searches"), - py::arg("depth"), + py::arg("exploration_level"), py::arg("nb_threads") = 1, py::arg("timeout") = vroom::Timeout(), py::arg("h_param") = std::vector()) diff --git a/src/vroom/input/input.py b/src/vroom/input/input.py index c36582d..3e25551 100644 --- a/src/vroom/input/input.py +++ b/src/vroom/input/input.py @@ -335,18 +335,11 @@ def solve( timeout: Stop the solving process after a given amount of time. """ - assert timeout is None or isinstance(timeout, timedelta), ( + assert timeout is None or isinstance(timeout, (None, timedelta)), ( f"unknown timeout type: {timeout}") - assert exploration_level <= 5 - nb_searches = 4 * (exploration_level + 1) - if exploration_level >= 4: - nb_searches += 4 - if exploration_level == 5: - nb_searches += 4 solution = Solution( self._solve( - nb_searches=nb_searches, - depth=int(exploration_level), + exploration_level=int(exploration_level), nb_threads=int(nb_threads), timeout=timeout, h_param=list(h_param), diff --git a/vroom b/vroom index 31bace4..82327fe 160000 --- a/vroom +++ b/vroom @@ -1 +1 @@ -Subproject commit 31bace492abfd97155faf91c20b4300dfbfcdcec +Subproject commit 82327fe93a37d3e117580261d61a4c59675e6fdd