rulp 0.0.27 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/helpers/file_helpers.rb +6 -0
- data/lib/rulp/lv.rb +1 -1
- data/lib/solvers/scip.rb +1 -1
- data/lib/solvers/solver.rb +0 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09720b9d7a5928c65f128a799c5bfd65a1f7faa1
|
4
|
+
data.tar.gz: f0a7e222e69add27ce719461ebbc95bac26f8061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b850be5ea33feb7209b15a5b77af3dc53cd7a286936502178d747c3a906ef7aebf3a1c35949ec3cda9c9f9bc6b2461779b32c39e97cf732c7d5d547aad2165d7
|
7
|
+
data.tar.gz: a5314cb33474f9116733237c94887bb9d8d2aef3536e4f6a398d57ac1b39d3995d508e8840cd61c5c47aac670bad40d4d2378e8b3e8e636d235eb34deb245364
|
data/lib/rulp/lv.rb
CHANGED
data/lib/solvers/scip.rb
CHANGED
@@ -40,7 +40,7 @@ class Scip < Solver
|
|
40
40
|
|
41
41
|
def store_results(variables)
|
42
42
|
results = IO.read(@outfile)
|
43
|
-
start = results.sub(/.*?primal solution
|
43
|
+
start = results.sub(/.*?primal solution.*?=+/m, "")
|
44
44
|
stripped = start.sub(/Statistics.+/m, "").strip
|
45
45
|
rows = stripped.split("\n")
|
46
46
|
|
data/lib/solvers/solver.rb
CHANGED
@@ -7,7 +7,6 @@ class Solver
|
|
7
7
|
@filename = filename
|
8
8
|
@outfile = get_output_filename
|
9
9
|
raise StandardError.new("Couldn't find solver #{executable}!") if `which #{executable}`.length == 0
|
10
|
-
@solver_exists = true
|
11
10
|
end
|
12
11
|
|
13
12
|
def get_output_filename
|
@@ -34,10 +33,6 @@ class Solver
|
|
34
33
|
FileUtils.rm(@outfile)
|
35
34
|
end
|
36
35
|
|
37
|
-
def solver_exists?
|
38
|
-
@solver_exists || false
|
39
|
-
end
|
40
|
-
|
41
36
|
def self.exists?
|
42
37
|
return `which #{self.executable}`.length != 0
|
43
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rulp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wouter Coppieters
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple Ruby LP description DSL
|
14
14
|
email: wc@pico.net.nz
|
@@ -24,6 +24,7 @@ files:
|
|
24
24
|
- lib/extensions/kernel_extensions.rb
|
25
25
|
- lib/extensions/object_extensions.rb
|
26
26
|
- lib/extensions/os_extensions.rb
|
27
|
+
- lib/helpers/file_helpers.rb
|
27
28
|
- lib/helpers/log.rb
|
28
29
|
- lib/rulp.rb
|
29
30
|
- lib/rulp/constraint.rb
|