mirror of
https://github.com/Z3Prover/z3
synced 2026-03-22 20:39:11 +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();
|
cs.restore_x();
|
||||||
if (backup_sz < current_sz) {
|
if (backup_sz < current_sz) {
|
||||||
// New columns were added after backup.
|
// New columns were added after backup.
|
||||||
// move_non_basic_columns_to_bounds snaps non-basic
|
// Recalculate basic variable values from non-basic ones
|
||||||
// columns to their bounds and finds a feasible solution.
|
// 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();
|
move_non_basic_columns_to_bounds();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue