diff --git a/src/api/api_context.cpp b/src/api/api_context.cpp index 66a1384f5..2c245534d 100644 --- a/src/api/api_context.cpp +++ b/src/api/api_context.cpp @@ -101,6 +101,7 @@ namespace api { m_dt_plugin = static_cast(m().get_plugin(m_dt_fid)); install_tactics(*this); + std::cout << "alloc\n"; } @@ -113,6 +114,7 @@ namespace api { } if (m_params.owns_manager()) m_manager.detach(); + std::cout << "dealloc " << memory::get_allocation_size() << "\n"; } context::set_interruptable::set_interruptable(context & ctx, event_handler & i): diff --git a/src/math/simplex/model_based_opt.cpp b/src/math/simplex/model_based_opt.cpp index 5321d2d0c..8b8f82a31 100644 --- a/src/math/simplex/model_based_opt.cpp +++ b/src/math/simplex/model_based_opt.cpp @@ -486,20 +486,22 @@ namespace opt { } model_based_opt::row& model_based_opt::row::normalize() { +#if 0 if (m_type == t_mod) return *this; - rational D(abs(m_coeff)); + rational D(denominator(abs(m_coeff))); if (D == 0) D = 1; for (auto const& [id, coeff] : m_vars) if (coeff != 0) - D = lcm(D, abs(coeff)); + D = lcm(D, denominator(abs(coeff))); if (D == 1) return *this; SASSERT(D > 0); for (auto & [id, coeff] : m_vars) coeff *= D; m_coeff *= D; +#endif return *this; }