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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4563e100a0516ca73b42566732631f0a90dfef9
4
- data.tar.gz: c0cbc3dffa055001e34385ec717ffc19068377bc
3
+ metadata.gz: 09720b9d7a5928c65f128a799c5bfd65a1f7faa1
4
+ data.tar.gz: f0a7e222e69add27ce719461ebbc95bac26f8061
5
5
  SHA512:
6
- metadata.gz: 9f37df906cb07c75ca940be3f9573931820efab1621a7117d78eee90c2d2500763af6345e25ad884c1f72f585a4f5aba73220b4516aeaccd7b63a0085110e190
7
- data.tar.gz: b4a5f51f6940c073ba8d7038bc5788a6baf88532749b0e28bcdce1c7ddd252aa612393f3b31d442896b50a4efabaa7c9449cdd8ca56d70086793ec35108f345e
6
+ metadata.gz: b850be5ea33feb7209b15a5b77af3dc53cd7a286936502178d747c3a906ef7aebf3a1c35949ec3cda9c9f9bc6b2461779b32c39e97cf732c7d5d547aad2165d7
7
+ data.tar.gz: a5314cb33474f9116733237c94887bb9d8d2aef3536e4f6a398d57ac1b39d3995d508e8840cd61c5c47aac670bad40d4d2378e8b3e8e636d235eb34deb245364
@@ -0,0 +1,6 @@
1
+ module FileHelpers
2
+ def get_unique_filename(label: nil)
3
+ unique
4
+ while
5
+ end
6
+ end
data/lib/rulp/lv.rb CHANGED
@@ -86,7 +86,7 @@ class LV
86
86
  end
87
87
 
88
88
  def inspect
89
- "#{name}#{args.join("-")}(#{suffix})[#{value || 'undefined'}]"
89
+ "#{name}#{args.join("-")}(#{suffix})[#{value.nil? ? 'undefined' : value }]"
90
90
  end
91
91
 
92
92
  alias_method :selected?, :value?
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:.*?=+/m, "")
43
+ start = results.sub(/.*?primal solution.*?=+/m, "")
44
44
  stripped = start.sub(/Statistics.+/m, "").strip
45
45
  rows = stripped.split("\n")
46
46
 
@@ -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.27
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-04-19 00:00:00.000000000 Z
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