rulp 0.0.37 → 0.0.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rulp/rulp.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c078192763db654f9e49fa5c540bd80a4c005eb
|
4
|
+
data.tar.gz: 5295481820dcb872fc1f2da08e31b08bb09066bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 548508e1000eda048dab20ad923af15c51d0a31f9e4a7e48154b7a34fb5e6ee12b3e5d108e32066906fca308e1fd35aff6763115867803dbf453e7e60f417f0c
|
7
|
+
data.tar.gz: 5c9d6584ae4e0a9a0f8b13c9a8372e2ee88db7b186645950edf0502e43ae0fd9247b83cac8956948e1814ab07a60bb308f4e8d936080839cd23738dbf1d51b40
|
data/lib/rulp/rulp.rb
CHANGED
@@ -86,12 +86,16 @@ module Rulp
|
|
86
86
|
attr_accessor :result, :trace, :lp_file
|
87
87
|
|
88
88
|
def initialize(objective, objective_expression)
|
89
|
-
@objective = objective
|
90
89
|
@variables = Set.new
|
91
|
-
@
|
92
|
-
@variables.merge(@objective_expression.variables)
|
90
|
+
@objective = objective
|
93
91
|
@lp_file = nil
|
94
92
|
@constraints = []
|
93
|
+
self.objective = objective_expression
|
94
|
+
end
|
95
|
+
|
96
|
+
def objective=(objective_expression)
|
97
|
+
@objective_expression = objective_expression.kind_of?(LV) ? 1 * objective_expression : objective_expression
|
98
|
+
@variables.merge(@objective_expression.variables)
|
95
99
|
end
|
96
100
|
|
97
101
|
def [](*constraints)
|
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.38
|
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-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple Ruby LP description DSL
|
14
14
|
email: wc@pico.net.nz
|