mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
add tracing for 2157
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
519e83bce4
commit
75b1e8fe27
5 changed files with 17 additions and 2 deletions
|
@ -278,6 +278,7 @@ void lar_core_solver::solve() {
|
|||
CASSERT("A_off", !m_r_solver.A_mult_x_is_off());
|
||||
lp_assert((!settings().use_tableau()) || r_basis_is_OK());
|
||||
if (need_to_presolve_with_double_solver()) {
|
||||
TRACE("lar_solver", tout << "presolving\n";);
|
||||
prefix_d();
|
||||
lar_solution_signature solution_signature;
|
||||
vector<unsigned> changes_of_basis = find_solution_signature_with_doubles(solution_signature);
|
||||
|
@ -293,6 +294,7 @@ void lar_core_solver::solve() {
|
|||
lp_assert(!settings().use_tableau() || r_basis_is_OK());
|
||||
} else {
|
||||
if (!settings().use_tableau()) {
|
||||
TRACE("lar_solver", tout << "no tablau\n";);
|
||||
bool snapped = m_r_solver.snap_non_basic_x_to_bound();
|
||||
lp_assert(m_r_solver.non_basic_columns_are_set_correctly());
|
||||
if (snapped)
|
||||
|
@ -300,8 +302,10 @@ void lar_core_solver::solve() {
|
|||
}
|
||||
if (m_r_solver.m_look_for_feasible_solution_only)
|
||||
m_r_solver.find_feasible_solution();
|
||||
else
|
||||
else {
|
||||
TRACE("lar_solver", tout << "solve\n";);
|
||||
m_r_solver.solve();
|
||||
}
|
||||
lp_assert(!settings().use_tableau() || r_basis_is_OK());
|
||||
}
|
||||
if (m_r_solver.get_status() == lp_status::INFEASIBLE) {
|
||||
|
|
|
@ -863,6 +863,7 @@ template <typename T, typename X> void lp_primal_core_solver<T, X>::print_column
|
|||
|
||||
// returns the number of iterations
|
||||
template <typename T, typename X> unsigned lp_primal_core_solver<T, X>::solve() {
|
||||
TRACE("lar_solver", tout << "solve " << this->get_status() << "\n";);
|
||||
if (numeric_traits<T>::precise() && this->m_settings.use_tableau())
|
||||
return solve_with_tableau();
|
||||
|
||||
|
@ -882,6 +883,7 @@ template <typename T, typename X> unsigned lp_primal_core_solver<T, X>::solve()
|
|||
}
|
||||
one_iteration();
|
||||
|
||||
TRACE("lar_solver", tout << "one iteration: " << this->get_status() << "\n";);
|
||||
lp_assert(!this->m_using_infeas_costs || this->costs_on_nbasis_are_zeros());
|
||||
switch (this->get_status()) {
|
||||
case lp_status::OPTIMAL: // double check that we are at optimum
|
||||
|
|
|
@ -35,6 +35,7 @@ template <typename T, typename X> void lp_primal_core_solver<T, X>::advance_on_e
|
|||
X t;
|
||||
int leaving = find_leaving_and_t_tableau(entering, t);
|
||||
if (leaving == -1) {
|
||||
TRACE("lar_solver", tout << "nothing leaving " << entering << "\n";);
|
||||
this->set_status(lp_status::UNBOUNDED);
|
||||
return;
|
||||
}
|
||||
|
@ -117,6 +118,7 @@ unsigned lp_primal_core_solver<T, X>::solve_with_tableau() {
|
|||
}
|
||||
else
|
||||
one_iteration_tableau();
|
||||
TRACE("lar_solver", tout << "one iteration tableau " << this->get_status() << "\n";);
|
||||
switch (this->get_status()) {
|
||||
case lp_status::OPTIMAL: // double check that we are at optimum
|
||||
case lp_status::INFEASIBLE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue