File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -102,18 +102,17 @@ def generate(self, X=None):
102
102
if len (Cl ) == 0 :
103
103
Cl = [cp .sum (Y ) >= 1 ]
104
104
105
+ m = cp .Model (Cl )
106
+ s = cp .SolverLookup .get ("ortools" , m )
107
+
105
108
if not self .partial and len (B ) > self .blimit :
106
109
107
- m = cp .Model (Cl )
108
- flag = m .solve (num_workers = 8 ) # no time limit to ensure convergence
110
+ flag = s .solve (num_workers = 8 ) # no time limit to ensure convergence
109
111
110
112
if flag and not all ([c .value () for c in B ]):
111
113
return lY
112
114
else :
113
115
self .partial = True
114
-
115
- m = cp .Model (Cl )
116
- s = cp .SolverLookup .get ("ortools" , m )
117
116
118
117
# We want at least one constraint to be violated to assure that each answer of the user
119
118
# will lead to new information
You can’t perform that action at this time.
0 commit comments