Skip to content

Commit

Permalink
Updated OR-Tools to 9.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Mar 21, 2024
1 parent 49dabd1 commit 4e6772e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- ruby: 3.2
os: ubuntu-22.04
- ruby: 3.1
os: ubuntu-20.04
os: ubuntu-22.04
- ruby: "3.0"
os: macos-latest
steps:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.12.0 (unreleased)

- Updated OR-Tools to 9.9
- Dropped binary installation for Ubuntu 20.04

## 0.11.1 (2023-12-04)

- Added binary installation for Arch Linux
Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ task :update do
require "open-uri"
require "tmpdir"

version = "9.8.3296"
distributions = ["arm64_macOS-14.1", "x86_64_macOS-14.1", "amd64_ubuntu-22.04", "amd64_ubuntu-20.04", "amd64_debian-11", "arm64_debian-11" "amd64_centos-7", "amd64_archlinux"]
version = "9.9.3963"
distributions = ["arm64_macOS-14.3.1", "x86_64_macOS-14.3.1", "amd64_ubuntu-22.04", "amd64_debian-11", "arm64_debian-11", "amd64_centos-7", "amd64_archlinux"]

short_version = version.split(".").first(2).join(".")
distributions.each do |dist|
Expand Down
2 changes: 2 additions & 0 deletions ext/or-tools/routing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ void init_routing(Rice::Module& m) {
return operations_research::DefaultRoutingModelParameters();
});

Rice::define_class_under<RoutingModel::ResourceGroup>(m, "ResourceGroup");

Rice::define_class_under<RoutingModel>(m, "RoutingModel")
.define_constructor(Rice::Constructor<RoutingModel, RoutingIndexManager, RoutingModelParameters>(), Rice::Arg("index_manager"), Rice::Arg("parameters") = operations_research::DefaultRoutingModelParameters())
.define_method("register_unary_transit_vector", &RoutingModel::RegisterUnaryTransitVector)
Expand Down
23 changes: 10 additions & 13 deletions ext/or-tools/vendor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
require "net/http"
require "tmpdir"

version = "9.8.3296"
version = "9.9.3963"

arch = RbConfig::CONFIG["host_cpu"]
arm = arch =~ /arm|aarch64/i

if RbConfig::CONFIG["host_os"] =~ /darwin/i
if arm
filename = "or-tools_arm64_macOS-14.1_cpp_v#{version}.tar.gz"
checksum = "253efad127c55b78967e3e3a3b4a573f9da0a2562c4f33f14fbf462ca58448f7"
filename = "or-tools_arm64_macOS-14.3.1_cpp_v#{version}.tar.gz"
checksum = "d9cbb3168d948208f68193b5d4df5f68cfc80fa61350b1a0efd0810f5accd600"
else
filename = "or-tools_x86_64_macOS-14.1_cpp_v#{version}.tar.gz"
checksum = "fe48b022799c807baba79a2b13c29bf9d9614827ba082fc688559d0cab879a86"
filename = "or-tools_x86_64_macOS-14.3.1_cpp_v#{version}.tar.gz"
checksum = "2fc0b9a9c26793de1626ff8e93f49458d600af85e991ec845d351d7f30ed786d"
end
else
# try /etc/os-release with fallback to /usr/lib/os-release
Expand All @@ -30,22 +30,19 @@

if os == "ubuntu" && os_version == "22.04" && !arm
filename = "or-tools_amd64_ubuntu-22.04_cpp_v#{version}.tar.gz"
checksum = "2a332e95897ac6fc2cfd0122bcbc07cfd286d0f579111529cc99ac3076f5421a"
elsif os == "ubuntu" && os_version == "20.04" && !arm
filename = "or-tools_amd64_ubuntu-20.04_cpp_v#{version}.tar.gz"
checksum = "95789f8d93dfb298efecd1c0b888f9a148c011e1a20505b00c38452d68b01644"
checksum = "a611133f4e9b75661c637347ebadff79539807cf8966eb9c176c2c560aad0a84"
elsif os == "debian" && os_version == "11" && !arm
filename = "or-tools_amd64_debian-11_cpp_v#{version}.tar.gz"
checksum = "e7dd81b13c53c739447254b8836ece55f8b92a107688cc9f3511705c9962fa2d"
checksum = "58c9f32d62031aa6679feb671758b3213fbc081ff46e7f850fef26aca2bd55ff"
elsif os == "debian" && os_version == "11" && arm
filename = "or-tools_arm64_debian-11_cpp_v#{version}.tar.gz"
checksum = "77a88d01eb612ffac0f6e030e30e58a3d171fe75d93a527ec55a06f9070332ab"
checksum = "f308a06d89dce060f74e6fec4936b43f4bdf4874d18c131798697756200f4e7a"
elsif os == "centos" && os_version == "7" && !arm
filename = "or-tools_amd64_centos-7_cpp_v#{version}.tar.gz"
checksum = "d9f193572d3a38b3062ae4cb89afc654e662eb734a9361b1575d649b9530cf60"
checksum = "01715a3f6cd2b1f09b816061ced613eb7dc91524cc7c2268ce3faf783a9085ea"
elsif os == "arch" && !arm
filename = "or-tools_amd64_archlinux_cpp_v#{version}.tar.gz"
checksum = "803e4b78e7d05b8027a2a391183c8c7855bb758f74d9ced872cfa68e0b9d7d64"
checksum = "490e67af9f0dbf79b0dd24fc8c80631cd41bb1f94fceb5345d371426abf25897"
else
platform =
if Gem.win_platform?
Expand Down
4 changes: 2 additions & 2 deletions test/constraint_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ def test_cryptoarithmetic
status = solver.solve(model, solution_printer)
assert_equal :optimal, status

assert_equal 179, solver.num_conflicts
assert_equal 828, solver.num_branches
assert_equal 200, solver.num_conflicts
assert_equal 1564, solver.num_branches
assert_equal 72, solution_printer.solution_count
end

Expand Down

0 comments on commit 4e6772e

Please sign in to comment.