or-tools 0.11.1 → 0.12.0
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/ext/or-tools/constraint.cpp +15 -2
- data/ext/or-tools/routing.cpp +2 -0
- data/ext/or-tools/vendor.rb +13 -16
- data/lib/or_tools/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 273af433c5368d01624ad7f30fbdd4237f5bd5dd46fed80c7b80fb6c89ee2217
|
4
|
+
data.tar.gz: 5785db26977918a8aed26f8ad6645fe6f6a229f52f50299e6e7c47fdb0a7615e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aebdb5eae0f8a8366b60ad800297b19af53f784f83b43160808b9d664222c17c5e62c93bab5adc86120e633ef6242c4f664c02dd081b739e7906d3a9be451588
|
7
|
+
data.tar.gz: 984505c748882940aade647074e13748d01d948e392f7fb9138f013bcbbd5da7572de9fbe6cd8a1d3e206964533733913fc797eb1c023996500f133d4dc38b87
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 0.12.0 (2024-06-02)
|
2
|
+
|
3
|
+
- Updated OR-Tools to 9.10
|
4
|
+
- Added `export_to_file` method to `CpModel`
|
5
|
+
- Added `random_seed` and `random_seed=` methods to `SatParameters`
|
6
|
+
- Added binary installation for Ubuntu 24.04
|
7
|
+
- Dropped binary installation for Ubuntu 20.04 and Debian 11 ARM
|
8
|
+
- Dropped support for Ruby < 3.1
|
9
|
+
|
1
10
|
## 0.11.1 (2023-12-04)
|
2
11
|
|
3
12
|
- Added binary installation for Arch Linux
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[OR-Tools](https://github.com/google/or-tools) - operations research tools - for Ruby
|
4
4
|
|
5
|
-
[](https://github.com/ankane/or-tools-ruby/actions)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
data/ext/or-tools/constraint.cpp
CHANGED
@@ -160,6 +160,14 @@ void init_constraint(Rice::Module& m) {
|
|
160
160
|
.define_method("cp_model_presolve=",
|
161
161
|
[](SatParameters& self, bool value) {
|
162
162
|
self.set_cp_model_presolve(value);
|
163
|
+
})
|
164
|
+
.define_method("random_seed",
|
165
|
+
[](SatParameters& self) {
|
166
|
+
return self.random_seed();
|
167
|
+
})
|
168
|
+
.define_method("random_seed=",
|
169
|
+
[](SatParameters& self, int32_t value) {
|
170
|
+
self.set_random_seed(value);
|
163
171
|
});
|
164
172
|
|
165
173
|
Rice::define_class_under<CpModelBuilder>(m, "CpModel")
|
@@ -350,6 +358,11 @@ void init_constraint(Rice::Module& m) {
|
|
350
358
|
[](CpModelBuilder& self) {
|
351
359
|
self.ClearAssumptions();
|
352
360
|
})
|
361
|
+
.define_method(
|
362
|
+
"export_to_file",
|
363
|
+
[](CpModelBuilder& self, const std::string& filename) {
|
364
|
+
return self.ExportToFile(filename);
|
365
|
+
})
|
353
366
|
.define_method(
|
354
367
|
"to_s",
|
355
368
|
[](CpModelBuilder& self) {
|
@@ -432,12 +445,12 @@ void init_constraint(Rice::Module& m) {
|
|
432
445
|
})
|
433
446
|
.define_method(
|
434
447
|
"_solution_integer_value",
|
435
|
-
[](Object self, CpSolverResponse& response, IntVar
|
448
|
+
[](Object self, const CpSolverResponse& response, IntVar x) {
|
436
449
|
return SolutionIntegerValue(response, x);
|
437
450
|
})
|
438
451
|
.define_method(
|
439
452
|
"_solution_boolean_value",
|
440
|
-
[](Object self, CpSolverResponse& response, BoolVar
|
453
|
+
[](Object self, const CpSolverResponse& response, BoolVar x) {
|
441
454
|
return SolutionBooleanValue(response, x);
|
442
455
|
});
|
443
456
|
}
|
data/ext/or-tools/routing.cpp
CHANGED
@@ -296,6 +296,8 @@ void init_routing(Rice::Module& m) {
|
|
296
296
|
return operations_research::DefaultRoutingModelParameters();
|
297
297
|
});
|
298
298
|
|
299
|
+
Rice::define_class_under<RoutingModel::ResourceGroup>(m, "ResourceGroup");
|
300
|
+
|
299
301
|
Rice::define_class_under<RoutingModel>(m, "RoutingModel")
|
300
302
|
.define_constructor(Rice::Constructor<RoutingModel, RoutingIndexManager, RoutingModelParameters>(), Rice::Arg("index_manager"), Rice::Arg("parameters") = operations_research::DefaultRoutingModelParameters())
|
301
303
|
.define_method("register_unary_transit_vector", &RoutingModel::RegisterUnaryTransitVector)
|
data/ext/or-tools/vendor.rb
CHANGED
@@ -4,18 +4,18 @@ require "fileutils"
|
|
4
4
|
require "net/http"
|
5
5
|
require "tmpdir"
|
6
6
|
|
7
|
-
version = "9.
|
7
|
+
version = "9.10.4067"
|
8
8
|
|
9
9
|
arch = RbConfig::CONFIG["host_cpu"]
|
10
10
|
arm = arch =~ /arm|aarch64/i
|
11
11
|
|
12
12
|
if RbConfig::CONFIG["host_os"] =~ /darwin/i
|
13
13
|
if arm
|
14
|
-
filename = "or-tools_arm64_macOS-14.1_cpp_v#{version}.tar.gz"
|
15
|
-
checksum = "
|
14
|
+
filename = "or-tools_arm64_macOS-14.4.1_cpp_v#{version}.tar.gz"
|
15
|
+
checksum = "5618bdaa2291ff27afa88e2352ad55cd0c4c6052184efb0f697de7b89d6b5ce2"
|
16
16
|
else
|
17
|
-
filename = "or-tools_x86_64_macOS-14.1_cpp_v#{version}.tar.gz"
|
18
|
-
checksum = "
|
17
|
+
filename = "or-tools_x86_64_macOS-14.4.1_cpp_v#{version}.tar.gz"
|
18
|
+
checksum = "22156a51946d8b53d3288489785d869c9aa7fc04b7aee257a89d55b080742fe1"
|
19
19
|
end
|
20
20
|
else
|
21
21
|
# try /etc/os-release with fallback to /usr/lib/os-release
|
@@ -28,24 +28,21 @@ else
|
|
28
28
|
os = os_info["ID"]
|
29
29
|
os_version = os_info["VERSION_ID"]
|
30
30
|
|
31
|
-
if os == "ubuntu" && os_version == "
|
31
|
+
if os == "ubuntu" && os_version == "24.04" && !arm
|
32
|
+
filename = "or-tools_amd64_ubuntu-24.04_cpp_v#{version}.tar.gz"
|
33
|
+
checksum = "42718f8e77383ceeefb25ca12ac0c9e91dd9afb8e0848b1141314be499f86d79"
|
34
|
+
elsif os == "ubuntu" && os_version == "22.04" && !arm
|
32
35
|
filename = "or-tools_amd64_ubuntu-22.04_cpp_v#{version}.tar.gz"
|
33
|
-
checksum = "
|
34
|
-
elsif os == "ubuntu" && os_version == "20.04" && !arm
|
35
|
-
filename = "or-tools_amd64_ubuntu-20.04_cpp_v#{version}.tar.gz"
|
36
|
-
checksum = "95789f8d93dfb298efecd1c0b888f9a148c011e1a20505b00c38452d68b01644"
|
36
|
+
checksum = "ffa50a970557e4527dcb3e77d45467a15770b6e93ed3cf61c4b602a2566ce6cb"
|
37
37
|
elsif os == "debian" && os_version == "11" && !arm
|
38
38
|
filename = "or-tools_amd64_debian-11_cpp_v#{version}.tar.gz"
|
39
|
-
checksum = "
|
40
|
-
elsif os == "debian" && os_version == "11" && arm
|
41
|
-
filename = "or-tools_arm64_debian-11_cpp_v#{version}.tar.gz"
|
42
|
-
checksum = "77a88d01eb612ffac0f6e030e30e58a3d171fe75d93a527ec55a06f9070332ab"
|
39
|
+
checksum = "48e1f1f2ce1bc55d2e8b0b5ba0556eef2d0724655ad06aedc13c5dd9d7daab9f"
|
43
40
|
elsif os == "centos" && os_version == "7" && !arm
|
44
41
|
filename = "or-tools_amd64_centos-7_cpp_v#{version}.tar.gz"
|
45
|
-
checksum = "
|
42
|
+
checksum = "537549145d259a1c1b10b0114bb3f417ca344b33643d51d5f3ee0dbaef9d1592"
|
46
43
|
elsif os == "arch" && !arm
|
47
44
|
filename = "or-tools_amd64_archlinux_cpp_v#{version}.tar.gz"
|
48
|
-
checksum = "
|
45
|
+
checksum = "b29c4211648d7b075f1f684732d4a43eb03798923755496d83c082c4d83ff435"
|
49
46
|
else
|
50
47
|
platform =
|
51
48
|
if Gem.win_platform?
|
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.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rice
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '4.
|
19
|
+
version: '4.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '4.
|
26
|
+
version: '4.3'
|
27
27
|
description:
|
28
28
|
email: andrew@ankane.org
|
29
29
|
executables: []
|
@@ -85,14 +85,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
85
85
|
requirements:
|
86
86
|
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '3'
|
88
|
+
version: '3.1'
|
89
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
91
|
- - ">="
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
|
-
rubygems_version: 3.
|
95
|
+
rubygems_version: 3.5.9
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Operations research tools for Ruby
|