ravensat 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ravensat/solver.rb +4 -2
- data/lib/ravensat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78a4fe449b52b526589311a1d8bd4203e121e0d490ff86a870f08833328bda05
|
4
|
+
data.tar.gz: f7dfe20367b98c416ed30cdbf4061b1662268181007f188942d6f393d0aff687
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7a341443b901bb3d3717a380af641956d7d9552d217e88250c6146f5fa9f1c0dd81fef9db5f5f38b37dca40f092030c6c99ef967ba534816e7a160b3525074e
|
7
|
+
data.tar.gz: 4d994c5983f2d66d988140aec41385533039dac96e62c6952416604efa2ecf9ede311241a6e4c5eb322da8396128f44ff6b5fcf3f8a55e36ea4ce5d8a0ea6be2
|
data/lib/ravensat/solver.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'tempfile'
|
2
|
+
require 'open3'
|
2
3
|
|
3
4
|
module Ravensat
|
4
5
|
class Solver
|
@@ -7,7 +8,7 @@ module Ravensat
|
|
7
8
|
@name = default_solver_name
|
8
9
|
end
|
9
10
|
|
10
|
-
def solve( cnf )
|
11
|
+
def solve( cnf , solver_log: false)
|
11
12
|
encoder = DimacsEncoder.new
|
12
13
|
@input_file = Tempfile.open(["ravensat",".cnf"])
|
13
14
|
@output_file = Tempfile.open(["ravensat",".mdl"])
|
@@ -19,7 +20,8 @@ module Ravensat
|
|
19
20
|
when "arcteryx"
|
20
21
|
Arcteryx.solve(@input_file.to_path, @output_file.to_path)
|
21
22
|
else
|
22
|
-
|
23
|
+
result, err, status = Open3.capture3("#{@name} #{@input_file.to_path} #{@output_file.to_path}")
|
24
|
+
puts result if solver_log
|
23
25
|
end
|
24
26
|
|
25
27
|
decoder = DimacsDecoder.new
|
data/lib/ravensat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ravensat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rikuto matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|