mirror of
https://github.com/Z3Prover/z3
synced 2025-12-18 10:18:33 +00:00
add option to control epsilon #7791
#7791 reports on using model values during lex optimization that break soft constraints. This is an artifact of using optimization where optimal values can be arbitrarily close to a rational. In a way it is by design, but we give the user now an option to control the starting point for epsilon when converting infinitesimals into rationals.
This commit is contained in:
parent
d8bf0e047f
commit
c75b8ec752
7 changed files with 14 additions and 4 deletions
|
|
@ -3174,7 +3174,8 @@ namespace smt {
|
|||
|
||||
template<typename Ext>
|
||||
void theory_arith<Ext>::compute_epsilon() {
|
||||
m_epsilon = numeral(1);
|
||||
auto eps = ctx.get_fparams().m_arith_epsilon;
|
||||
m_epsilon = numeral(eps);
|
||||
theory_var num = get_num_vars();
|
||||
for (theory_var v = 0; v < num; v++) {
|
||||
bound * l = lower(v);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue