@@ -41,13 +41,17 @@ namespace lp {
41
41
mpq m_k; // the right side of the cut
42
42
hnf_cutter m_hnf_cutter;
43
43
unsigned m_hnf_cut_period;
44
+ unsigned m_dioph_eq_period;
44
45
int_gcd_test m_gcd;
45
46
46
47
bool column_is_int_inf (unsigned j) const {
47
48
return lra.column_is_int (j) && (!lia.value_is_int (j));
48
49
}
49
50
50
- imp (int_solver& lia): lia(lia), lra(lia.lra), lrac(lia.lrac), m_hnf_cutter(lia), m_gcd(lia) {}
51
+ imp (int_solver& lia): lia(lia), lra(lia.lra), lrac(lia.lrac), m_hnf_cutter(lia), m_gcd(lia) {
52
+ m_hnf_cut_period = settings ().hnf_cut_period ();
53
+ m_dioph_eq_period = settings ().m_dioph_eq_period ;
54
+ }
51
55
52
56
bool has_lower (unsigned j) const {
53
57
switch (lrac.m_column_types ()[j]) {
@@ -170,11 +174,14 @@ namespace lp {
170
174
171
175
if (r == lia_move::conflict) {
172
176
de.explain (*this ->m_ex );
177
+ m_dioph_eq_period = settings ().m_dioph_eq_period ;
173
178
return lia_move::conflict;
174
179
} else if (r == lia_move::branch) {
180
+ m_dioph_eq_period = settings ().m_dioph_eq_period ;
175
181
return lia_move::branch;
176
182
}
177
183
184
+ m_dioph_eq_period *= 2 ; // the overflow is fine, maybe to try again
178
185
return lia_move::undef;
179
186
}
180
187
@@ -190,7 +197,7 @@ namespace lp {
190
197
}
191
198
192
199
bool should_solve_dioph_eq () {
193
- return lia.settings ().dio_eqs () && m_number_of_calls % settings (). m_dioph_eq_period == 0 ;
200
+ return lia.settings ().dio_eqs () && m_number_of_calls % m_dioph_eq_period == 0 ;
194
201
}
195
202
196
203
bool should_hnf_cut () {
0 commit comments