Skip to content

Commit

Permalink
update vroom + version
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathf committed Dec 3, 2024
1 parent b6c24e8 commit ec593b0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down
3 changes: 1 addition & 2 deletions src/bind/input/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<vroom::HeuristicParameters>())
Expand Down
11 changes: 2 additions & 9 deletions src/vroom/input/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit ec593b0

Please sign in to comment.