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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fe48515db2ce222168fac2854fcab5b2057c84336195e129e6c532ab519082e
4
- data.tar.gz: bc265a79298a55684d1bb1c83a196e0530b4670515c22d4388f65bdf7b872c67
3
+ metadata.gz: 78a4fe449b52b526589311a1d8bd4203e121e0d490ff86a870f08833328bda05
4
+ data.tar.gz: f7dfe20367b98c416ed30cdbf4061b1662268181007f188942d6f393d0aff687
5
5
  SHA512:
6
- metadata.gz: 7d715763470fe222f0ba71c998e27a43f8e40c04ae50cadceae48b324a962eaa75ceef92f02154cc74f9e04edbae47de1f36eb6e3c655019c0f3fedd72aae448
7
- data.tar.gz: d2178778880fa55127ef5bd0b2b5d76fa5431452d20f06b0672374a99f9a718a881c01c1c055b11579c86e063decc607416c0f3450213f460dac756e28cc201c
6
+ metadata.gz: c7a341443b901bb3d3717a380af641956d7d9552d217e88250c6146f5fa9f1c0dd81fef9db5f5f38b37dca40f092030c6c99ef967ba534816e7a160b3525074e
7
+ data.tar.gz: 4d994c5983f2d66d988140aec41385533039dac96e62c6952416604efa2ecf9ede311241a6e4c5eb322da8396128f44ff6b5fcf3f8a55e36ea4ce5d8a0ea6be2
@@ -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
- system("#{@name} #{@input_file.to_path} #{@output_file.to_path}")
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ravensat
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
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.1
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-22 00:00:00.000000000 Z
11
+ date: 2022-07-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: