or-tools 0.12.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 273af433c5368d01624ad7f30fbdd4237f5bd5dd46fed80c7b80fb6c89ee2217
4
- data.tar.gz: 5785db26977918a8aed26f8ad6645fe6f6a229f52f50299e6e7c47fdb0a7615e
3
+ metadata.gz: 4863311462c6b8ec192b18548667397398e2b7f183c01922fdfe3d464157a9fc
4
+ data.tar.gz: 2e0ad658ab77b7c18aa449fad095d0dfa6c098b8bae80fd7d1ea1dbcae4b292f
5
5
  SHA512:
6
- metadata.gz: aebdb5eae0f8a8366b60ad800297b19af53f784f83b43160808b9d664222c17c5e62c93bab5adc86120e633ef6242c4f664c02dd081b739e7906d3a9be451588
7
- data.tar.gz: 984505c748882940aade647074e13748d01d948e392f7fb9138f013bcbbd5da7572de9fbe6cd8a1d3e206964533733913fc797eb1c023996500f133d4dc38b87
6
+ metadata.gz: 6135045892abd2f572bd40603d36024e3984f7dfec10b1c40cc49dbc21c381d4b81c3e2cbe795f51fe52ecc88b579fa15b99cb8455872459649865be14031d4b
7
+ data.tar.gz: e0df2a74200821b3d55f78cdf764d2720724449931298a2bb902c395587cd0b7117094b629e226273c65f5492b4846f2d7a26f753eb1d126088905a8ecad6354
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 0.13.1 (2024-10-05)
2
+
3
+ - Added binary installation for Debian 12
4
+
5
+ ## 0.13.0 (2024-09-17)
6
+
7
+ - Updated OR-Tools to 9.11
8
+ - Restored binary installation for Ubuntu 20.04
9
+ - Dropped binary installation for CentOS 7
10
+ - Removed dependency on `csv` gem
11
+
1
12
  ## 0.12.0 (2024-06-02)
2
13
 
3
14
  - Updated OR-Tools to 9.10
@@ -19,7 +19,7 @@ else
19
19
 
20
20
  # make rpath relative
21
21
  # use double dollar sign and single quotes to escape properly
22
- rpath_prefix = RbConfig::CONFIG["host_os"] =~ /darwin/ ? "@loader_path" : "$$ORIGIN"
22
+ rpath_prefix = RbConfig::CONFIG["host_os"].match?(/darwin/) ? "@loader_path" : "$$ORIGIN"
23
23
  rpath = "'#{rpath_prefix}/../../tmp/or-tools/lib'"
24
24
  end
25
25
 
@@ -309,7 +309,7 @@ void init_routing(Rice::Module& m) {
309
309
  return Rice::detail::From_Ruby<int64_t>().convert(callback.call("call", from_index));
310
310
  }
311
311
  );
312
- })
312
+ }, Rice::Arg("callback").keepAlive())
313
313
  .define_method("register_transit_matrix", &RoutingModel::RegisterTransitMatrix)
314
314
  .define_method(
315
315
  "register_transit_callback",
@@ -319,7 +319,7 @@ void init_routing(Rice::Module& m) {
319
319
  return Rice::detail::From_Ruby<int64_t>().convert(callback.call("call", from_index, to_index));
320
320
  }
321
321
  );
322
- })
322
+ }, Rice::Arg("callback").keepAlive())
323
323
  .define_method("add_dimension", &RoutingModel::AddDimension)
324
324
  .define_method("add_dimension_with_vehicle_transits", &RoutingModel::AddDimensionWithVehicleTransits)
325
325
  .define_method("add_dimension_with_vehicle_capacity", &RoutingModel::AddDimensionWithVehicleCapacity)
@@ -1,21 +1,20 @@
1
- require "csv"
2
1
  require "digest"
3
2
  require "fileutils"
4
3
  require "net/http"
5
4
  require "tmpdir"
6
5
 
7
- version = "9.10.4067"
6
+ version = "9.11.4210"
8
7
 
9
8
  arch = RbConfig::CONFIG["host_cpu"]
10
- arm = arch =~ /arm|aarch64/i
9
+ arm = arch.match?(/arm|aarch64/i)
11
10
 
12
- if RbConfig::CONFIG["host_os"] =~ /darwin/i
11
+ if RbConfig::CONFIG["host_os"].match?(/darwin/i)
13
12
  if arm
14
- filename = "or-tools_arm64_macOS-14.4.1_cpp_v#{version}.tar.gz"
15
- checksum = "5618bdaa2291ff27afa88e2352ad55cd0c4c6052184efb0f697de7b89d6b5ce2"
13
+ filename = "or-tools_arm64_macOS-14.6.1_cpp_v#{version}.tar.gz"
14
+ checksum = "a106668eb1975c1672874ef24b4f8e2e56669467a63349e5ea8ef5419814c31b"
16
15
  else
17
- filename = "or-tools_x86_64_macOS-14.4.1_cpp_v#{version}.tar.gz"
18
- checksum = "22156a51946d8b53d3288489785d869c9aa7fc04b7aee257a89d55b080742fe1"
16
+ filename = "or-tools_x86_64_macOS-14.6.1_cpp_v#{version}.tar.gz"
17
+ checksum = "cc87a7f8c68ec4fed6c6de6565b0b625f2f0047185a8a4449ef4b5a305b60e55"
19
18
  end
20
19
  else
21
20
  # try /etc/os-release with fallback to /usr/lib/os-release
@@ -23,26 +22,29 @@ else
23
22
  os_filename = File.exist?("/etc/os-release") ? "/etc/os-release" : "/usr/lib/os-release"
24
23
 
25
24
  # for safety, parse rather than source
26
- os_info = CSV.read(os_filename, col_sep: "=").to_h rescue {}
25
+ os_info = File.readlines(os_filename, chomp: true).to_h { |v| v.split("=", 2) }.transform_values { |v| v.delete_prefix('"').delete_suffix('"') } rescue {}
27
26
 
28
27
  os = os_info["ID"]
29
28
  os_version = os_info["VERSION_ID"]
30
29
 
31
30
  if os == "ubuntu" && os_version == "24.04" && !arm
32
31
  filename = "or-tools_amd64_ubuntu-24.04_cpp_v#{version}.tar.gz"
33
- checksum = "42718f8e77383ceeefb25ca12ac0c9e91dd9afb8e0848b1141314be499f86d79"
32
+ checksum = "71761d93171b111fca736647a6cd00cb9e606474df597a8b48f3f5f2c73d4c0f"
34
33
  elsif os == "ubuntu" && os_version == "22.04" && !arm
35
34
  filename = "or-tools_amd64_ubuntu-22.04_cpp_v#{version}.tar.gz"
36
- checksum = "ffa50a970557e4527dcb3e77d45467a15770b6e93ed3cf61c4b602a2566ce6cb"
35
+ checksum = "f613574d4eae01afd966c8bde199990cbd9fad46035e675d71f17f5c7477eed4"
36
+ elsif os == "ubuntu" && os_version == "20.04" && !arm
37
+ filename = "or-tools_amd64_ubuntu-20.04_cpp_v#{version}.tar.gz"
38
+ checksum = "190b85f4510cab55fcb50b9850a0e2f94b2bdf5e266580650efbc5aaab760683"
37
39
  elsif os == "debian" && os_version == "11" && !arm
38
40
  filename = "or-tools_amd64_debian-11_cpp_v#{version}.tar.gz"
39
- checksum = "48e1f1f2ce1bc55d2e8b0b5ba0556eef2d0724655ad06aedc13c5dd9d7daab9f"
40
- elsif os == "centos" && os_version == "7" && !arm
41
- filename = "or-tools_amd64_centos-7_cpp_v#{version}.tar.gz"
42
- checksum = "537549145d259a1c1b10b0114bb3f417ca344b33643d51d5f3ee0dbaef9d1592"
41
+ checksum = "a8354696f365aa13a2375da5f8f6cfd8785430681addcd887bfd194851dd4710"
42
+ elsif os == "debian" && os_version == "12" && !arm
43
+ filename = "or-tools_amd64_debian-12_cpp_v#{version}.tar.gz"
44
+ checksum = "9fda332f2f9d3b5647d85dd65de145ea3e2a1543714bf588f82da8ec57721cbf"
43
45
  elsif os == "arch" && !arm
44
46
  filename = "or-tools_amd64_archlinux_cpp_v#{version}.tar.gz"
45
- checksum = "b29c4211648d7b075f1f684732d4a43eb03798923755496d83c082c4d83ff435"
47
+ checksum = "ac892a949d871294b7e26b0730440ab8629b4021bf3c1641bc7c8fb09b45081f"
46
48
  else
47
49
  platform =
48
50
  if Gem.win_platform?
@@ -4,7 +4,7 @@ module ORTools
4
4
 
5
5
  def initialize(initial_grid, x: false, magic_square: false, anti_knight: false, anti_king: false, non_consecutive: false)
6
6
  raise ArgumentError, "Grid must be 9x9" unless initial_grid.size == 9 && initial_grid.all? { |r| r.size == 9 }
7
- raise ArgumentError, "Grid must contain values between 0 and 9" unless initial_grid.flatten(1).all? { |v| (0..9).include?(v) }
7
+ raise ArgumentError, "Grid must contain values between 0 and 9" unless initial_grid.flatten(1).all? { |v| (0..9).cover?(v) }
8
8
 
9
9
  model = ORTools::CpModel.new
10
10
 
@@ -7,7 +7,7 @@ module ORTools
7
7
  end
8
8
 
9
9
  def add_self_to_coeff_map_or_stack(coeffs, multiplier, stack)
10
- @array.reverse.each do |arg|
10
+ @array.reverse_each do |arg|
11
11
  stack << [multiplier, arg]
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module ORTools
2
- VERSION = "0.12.0"
2
+ VERSION = "0.13.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: or-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-03 00:00:00.000000000 Z
11
+ date: 2024-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rice
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 3.5.9
95
+ rubygems_version: 3.5.16
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Operations research tools for Ruby