3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 02:45:51 +00:00

add option branch_flip to lp_settings

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-02-22 21:30:09 -08:00
parent b9bfa950f6
commit ab92c20106
5 changed files with 11 additions and 10 deletions

View file

@ -34,6 +34,7 @@ namespace lp {
return j != -1 ? j : find_inf_int_nbasis_column();
}
lia_move int_branch::create_branch_on_column(int j) {
TRACE("check_main_int", tout << "branching" << std::endl;);
lp_assert(lia.m_t.is_empty());
@ -44,7 +45,7 @@ namespace lp {
lia.m_k = mpq(0);
}
else {
lia.m_upper = left_branch_is_more_narrow_than_right(j);
lia.m_upper = lra.settings().branch_flip()? lia.random() % 2 : left_branch_is_more_narrow_than_right(j);
lia.m_k = lia.m_upper? floor(lia.get_value(j)) : ceil(lia.get_value(j));
}