or-tools 0.16.3 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89bf514a3bb90453c41d32c13dc1eb00130d3fb78da594540517c47d4cc7cb91
4
- data.tar.gz: 2cb6aecf6356e93b334abf4a05fab50c08c115973414d5bb0be771685e3e09c2
3
+ metadata.gz: 7d08782975a4c387d502318dbd8c9335166a42ab76807b13ba78c7b249d6c879
4
+ data.tar.gz: 1653c6a0bfac136e9bdbe22d6bc10bc24d699926d79963cb41777f9e90eb880f
5
5
  SHA512:
6
- metadata.gz: 71dc044a44a5d792b07d6cf956f6f5e033fa23f0ab02149ffd75bfb0a08d26a58545af32089957dc0632018a0433cf7764fb12f9a90ca1ed58b5723d4b9c5dd1
7
- data.tar.gz: fed9575f36012944b25d8162367ed78a0beea5b53f76d232ce80a58ea1a18fca8d7ed2cc32b728f4573d3d2fe5d9c7a6de836fe6a9b409287507c9a68f4d6fd1
6
+ metadata.gz: 582adf83f9dfcdfe426364a22efc2bdd8733b5582a4aa3bb0b720910bd4a5d75a8466937b6b8bfed892c655017d246da3953081d56533a15aac8ae10b1ec96c5
7
+ data.tar.gz: e97b40eefc43fd253d2da0ad17f02a923649502d294904d49d4a431d1adc44c23222c8a59d61e36142400478bb6e128c90d00bee8419f0294c47f29aba4c4a93
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.17.1 (2026-02-19)
2
+
3
+ - Fixed error with Rice 4.11
4
+
5
+ ## 0.17.0 (2026-01-12)
6
+
7
+ - Updated OR-Tools to 9.15
8
+
1
9
  ## 0.16.3 (2026-01-05)
2
10
 
3
11
  - Fixed errors with Rice 4.9
@@ -98,8 +98,8 @@ void init_constraint(Rice::Module& m) {
98
98
  auto a = Array(literal);
99
99
  std::vector<BoolVar> vec;
100
100
  vec.reserve(a.size());
101
- for (const Object v : a) {
102
- if (v.is_a(rb_cSatIntVar)) {
101
+ for (const auto& v : a) {
102
+ if (Object(v).is_a(rb_cSatIntVar)) {
103
103
  vec.push_back(Rice::detail::From_Ruby<IntVar>().convert(v.value()).ToBoolVar());
104
104
  } else {
105
105
  vec.push_back(Rice::detail::From_Ruby<BoolVar>().convert(v.value()));
@@ -1,4 +1,5 @@
1
1
  #include <memory>
2
+ #include <optional>
2
3
  #include <string>
3
4
 
4
5
  #include <ortools/linear_solver/linear_solver.h>
@@ -114,11 +115,11 @@ void init_linear(Rice::Module& m) {
114
115
  [](MPSolverParameters& self) {
115
116
  int presolve = self.GetIntegerParam(MPSolverParameters::IntegerParam::PRESOLVE);
116
117
  if (presolve == MPSolverParameters::PresolveValues::PRESOLVE_ON) {
117
- return Rice::True;
118
+ return std::optional<bool>{true};
118
119
  } else if (presolve == MPSolverParameters::PresolveValues::PRESOLVE_OFF) {
119
- return Rice::False;
120
+ return std::optional<bool>{false};
120
121
  } else {
121
- return Rice::Nil;
122
+ return std::optional<bool>{};
122
123
  }
123
124
  })
124
125
  .define_method(
@@ -137,11 +138,11 @@ void init_linear(Rice::Module& m) {
137
138
  [](MPSolverParameters& self) {
138
139
  int incrementality = self.GetIntegerParam(MPSolverParameters::IntegerParam::INCREMENTALITY);
139
140
  if (incrementality == MPSolverParameters::IncrementalityValues::INCREMENTALITY_ON) {
140
- return Rice::True;
141
+ return std::optional<bool>{true};
141
142
  } else if (incrementality == MPSolverParameters::IncrementalityValues::INCREMENTALITY_OFF) {
142
- return Rice::False;
143
+ return std::optional<bool>{false};
143
144
  } else {
144
- return Rice::Nil;
145
+ return std::optional<bool>{};
145
146
  }
146
147
  })
147
148
  .define_method(
@@ -160,11 +161,11 @@ void init_linear(Rice::Module& m) {
160
161
  [](MPSolverParameters& self) {
161
162
  int scaling = self.GetIntegerParam(MPSolverParameters::IntegerParam::SCALING);
162
163
  if (scaling == MPSolverParameters::ScalingValues::SCALING_ON) {
163
- return Rice::True;
164
+ return std::optional<bool>{true};
164
165
  } else if (scaling == MPSolverParameters::ScalingValues::SCALING_OFF) {
165
- return Rice::False;
166
+ return std::optional<bool>{false};
166
167
  } else {
167
- return Rice::Nil;
168
+ return std::optional<bool>{};
168
169
  }
169
170
  });
170
171
 
@@ -295,7 +295,7 @@ void init_routing(Rice::Module& m) {
295
295
  "cumulative",
296
296
  [](operations_research::Solver& self, Array rb_intervals, std::vector<int64_t> demands, int64_t capacity, const std::string& name) {
297
297
  std::vector<operations_research::IntervalVar*> intervals;
298
- for (const Object v : rb_intervals) {
298
+ for (const auto& v : rb_intervals) {
299
299
  intervals.push_back(Rice::detail::From_Ruby<operations_research::IntervalVar*>().convert(v.value()));
300
300
  }
301
301
  return self.MakeCumulative(intervals, demands, capacity, name);
@@ -3,18 +3,18 @@ require "fileutils"
3
3
  require "net/http"
4
4
  require "tmpdir"
5
5
 
6
- version = "9.14.6206"
6
+ version = "9.15.6755"
7
7
 
8
8
  arch = RbConfig::CONFIG["host_cpu"]
9
9
  arm = arch.match?(/arm|aarch64/i)
10
10
 
11
11
  if RbConfig::CONFIG["host_os"].match?(/darwin/i)
12
12
  if arm
13
- filename = "or-tools_arm64_macOS-15.5_cpp_v#{version}.tar.gz"
14
- checksum = "7dd3fc35acc74a85f44e39099dcc2caa698d7a99e659e8d8456ce25bafe4a63b"
13
+ filename = "or-tools_arm64_macOS-26.2_cpp_v#{version}.tar.gz"
14
+ checksum = "de0400a45939a66ee13cd8360c230e830fc5e03a6ed5a8a8b60f58a39e4a67bc"
15
15
  else
16
- filename = "or-tools_x86_64_macOS-15.5_cpp_v#{version}.tar.gz"
17
- checksum = "de7ed91b0fe90094fb5f5ebd19869b69a8d52b9752e456752208a22a05b14f7f"
16
+ filename = "or-tools_x86_64_macOS-26.2_cpp_v#{version}.tar.gz"
17
+ checksum = "d2d36482727520ccaff979eba16f53e6b2cabf40b6fd1126e4d3b34fad2fe851"
18
18
  end
19
19
  else
20
20
  # try /etc/os-release with fallback to /usr/lib/os-release
@@ -29,22 +29,22 @@ else
29
29
 
30
30
  if os == "ubuntu" && os_version == "24.04" && !arm
31
31
  filename = "or-tools_amd64_ubuntu-24.04_cpp_v#{version}.tar.gz"
32
- checksum = "be3855a32a7390c3957d43ebd3faec1610acdc28f06ef33cb50f1f72a9aa6621"
32
+ checksum = "6f389320672cee00b78aacefb2bde33fef0bb988c3b2735573b9fffd1047fbda"
33
33
  elsif os == "ubuntu" && os_version == "22.04" && !arm
34
34
  filename = "or-tools_amd64_ubuntu-22.04_cpp_v#{version}.tar.gz"
35
- checksum = "127a82bbbf304d26721bb9b41ecce2d66f21c757204ab5aa2cc37eaa6ffb7eb6"
35
+ checksum = "0b30114d7c05f0596286bf3ef8d02adcf5f45be3b39273490e6bb74a2a9bd1ea"
36
36
  elsif os == "ubuntu" && os_version == "20.04" && !arm
37
37
  filename = "or-tools_amd64_ubuntu-20.04_cpp_v#{version}.tar.gz"
38
- checksum = "7705a7c11e0db4ec1d7841e184acd204787174c6cbdb2fbd81169823ed148c6c"
38
+ checksum = "cfe5068b0fe4bafff916ab1b75670b341e80571c8cfd8b647dfe3e97a233e836"
39
39
  elsif os == "debian" && os_version == "12" && !arm
40
40
  filename = "or-tools_amd64_debian-12_cpp_v#{version}.tar.gz"
41
- checksum = "285e8ec3a3399e45cdb4f67f48d4b65dbfa9c013b29036d409c72f96f0f34ab9"
41
+ checksum = "b2c9870c8778eeb26c98742402da17da039c058fca7eca87be5c90832b04153c"
42
42
  elsif os == "debian" && os_version == "11" && !arm
43
43
  filename = "or-tools_amd64_debian-11_cpp_v#{version}.tar.gz"
44
- checksum = "646b53e8d355290c4627d6bad0d36baeff38dc43605d317ac02cb811688d4dd2"
44
+ checksum = "c6c4341ff8f9aae3e77f161ca8ea3bb0d22f35ff696596fd11ec51c5da6bd4f7"
45
45
  elsif os == "arch" && !arm
46
46
  filename = "or-tools_amd64_archlinux_cpp_v#{version}.tar.gz"
47
- checksum = "6be039a13c3be7a3dbcdc413d455b43bba4590ce38859062898835effefb5ca4"
47
+ checksum = "5505079f7b2a6d9379ba6ae446a3a639226d455ef1cfa32d2d23ffc4566e3a4b"
48
48
  else
49
49
  platform =
50
50
  if Gem.win_platform?
@@ -141,6 +141,7 @@ Dir.mktmpdir do |extract_path|
141
141
  license_files = Dir.glob("**/*{LICENSE,LICENCE,NOTICE,COPYING,license,licence,notice,copying}*", base: extract_path)
142
142
  raise "License not found" unless license_files.any?
143
143
  license_files.each do |file|
144
+ next if File.directory?(File.join(extract_path, file))
144
145
  FileUtils.mkdir_p(File.join(path, File.dirname(file)))
145
146
  FileUtils.mv(File.join(extract_path, file), File.join(path, file))
146
147
  end
@@ -1,3 +1,3 @@
1
1
  module ORTools
2
- VERSION = "0.16.3"
2
+ VERSION = "0.17.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: or-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.3
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane