mirror of
https://github.com/Z3Prover/z3
synced 2026-03-17 18:43:45 +00:00
fix restore_x by recalulating new column values
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
a66448f1c5
commit
a930a8d5d4
1 changed files with 6 additions and 2 deletions
|
|
@ -446,8 +446,12 @@ public:
|
|||
cs.restore_x();
|
||||
if (backup_sz < current_sz) {
|
||||
// New columns were added after backup.
|
||||
// move_non_basic_columns_to_bounds snaps non-basic
|
||||
// columns to their bounds and finds a feasible solution.
|
||||
// Recalculate basic variable values from non-basic ones
|
||||
// to restore the Ax=0 tableau invariant, then snap
|
||||
// non-basic columns to their bounds and find a feasible solution.
|
||||
for (unsigned i = 0; i < A_r().row_count(); i++)
|
||||
if (r_basis()[i] >= backup_sz)
|
||||
set_column_value(r_basis()[i], get_basic_var_value_from_row(i));
|
||||
move_non_basic_columns_to_bounds();
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue