ruby-cbc 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby-cbc/conflict_solver.rb +3 -4
- data/lib/ruby-cbc/model.rb +1 -1
- data/lib/ruby-cbc/version.rb +1 -1
- 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: 3d05d2dddacdfb1243b0ccbe0db95ef785002175
|
4
|
+
data.tar.gz: b9ea06e2a20a3b60a8a28c7a7ccfac5f7af73e3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d876f561b81578e8d1b69108e5c4e024eb2c52b66b34eeaade45b4f941d357145a2889e3ad71919bd0a979d7ee3f7a28d92223c263e67777a9a2cce842a8561
|
7
|
+
data.tar.gz: eb4aed1071260b46aacd4ec4c228a56a1dfb24e8e691c3d4e7ad941348e3521200d747413a75de80fca2bbef3e2a0456f81c66bc23637a9b84dcbe8ca82811e8
|
@@ -10,12 +10,12 @@ module Cbc
|
|
10
10
|
def find_conflict
|
11
11
|
continuous = is_continuous_conflict?
|
12
12
|
conflict_set = []
|
13
|
-
all_constraints = @model.constraints
|
13
|
+
all_constraints = @model.constraints
|
14
14
|
nb_constraints = all_constraints.count
|
15
15
|
loop do
|
16
16
|
m = Model.new
|
17
17
|
m.vars = @model.vars
|
18
|
-
m.
|
18
|
+
m.constraints = conflict_set
|
19
19
|
return conflict_set if infeasible?(m, continuous: continuous)
|
20
20
|
|
21
21
|
constraint_idx = first_failing(conflict_set, all_constraints, nb_constraints, continuous: continuous)
|
@@ -43,10 +43,9 @@ module Cbc
|
|
43
43
|
loop do
|
44
44
|
m = Model.new
|
45
45
|
m.vars = @model.vars
|
46
|
-
m.enforce(conflict_set)
|
47
46
|
|
48
47
|
half_constraints = (max_nb_constraints + min_nb_constraints) / 2
|
49
|
-
m.
|
48
|
+
m.constraints = conflict_set + constraints.take(half_constraints)
|
50
49
|
if infeasible?(m, continuous: continuous)
|
51
50
|
max_nb_constraints = half_constraints
|
52
51
|
else
|
data/lib/ruby-cbc/model.rb
CHANGED
data/lib/ruby-cbc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-cbc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Verger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|