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 +4 -4
- data/CHANGELOG.md +11 -0
- data/ext/or-tools/extconf.rb +1 -1
- data/ext/or-tools/routing.cpp +2 -2
- data/ext/or-tools/vendor.rb +18 -16
- data/lib/or_tools/sudoku.rb +1 -1
- data/lib/or_tools/sum_array.rb +1 -1
- data/lib/or_tools/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4863311462c6b8ec192b18548667397398e2b7f183c01922fdfe3d464157a9fc
|
4
|
+
data.tar.gz: 2e0ad658ab77b7c18aa449fad095d0dfa6c098b8bae80fd7d1ea1dbcae4b292f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/ext/or-tools/extconf.rb
CHANGED
@@ -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"]
|
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
|
|
data/ext/or-tools/routing.cpp
CHANGED
@@ -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)
|
data/ext/or-tools/vendor.rb
CHANGED
@@ -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.
|
6
|
+
version = "9.11.4210"
|
8
7
|
|
9
8
|
arch = RbConfig::CONFIG["host_cpu"]
|
10
|
-
arm = arch
|
9
|
+
arm = arch.match?(/arm|aarch64/i)
|
11
10
|
|
12
|
-
if RbConfig::CONFIG["host_os"]
|
11
|
+
if RbConfig::CONFIG["host_os"].match?(/darwin/i)
|
13
12
|
if arm
|
14
|
-
filename = "or-tools_arm64_macOS-14.
|
15
|
-
checksum = "
|
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.
|
18
|
-
checksum = "
|
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 =
|
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 = "
|
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 = "
|
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 = "
|
40
|
-
elsif os == "
|
41
|
-
filename = "or-
|
42
|
-
checksum = "
|
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 = "
|
47
|
+
checksum = "ac892a949d871294b7e26b0730440ab8629b4021bf3c1641bc7c8fb09b45081f"
|
46
48
|
else
|
47
49
|
platform =
|
48
50
|
if Gem.win_platform?
|
data/lib/or_tools/sudoku.rb
CHANGED
@@ -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).
|
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
|
|
data/lib/or_tools/sum_array.rb
CHANGED
data/lib/or_tools/version.rb
CHANGED
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.
|
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
|
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.
|
95
|
+
rubygems_version: 3.5.16
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Operations research tools for Ruby
|