3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

adding simplex

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-02-12 20:20:52 -08:00
parent a594597906
commit 51cb63b6c0
8 changed files with 42 additions and 13 deletions

View file

@ -595,7 +595,9 @@ namespace smt {
}
ctx.push_trail(undo_bound(*this, v, is_true));
lbool is_sat = m_simplex.make_feasible();
std::cout << is_sat << "\n";
if (is_sat == l_false) {
std::cout << "unsat\n";
}
}
for (unsigned i = 0; i < ineqs->size(); ++i) {
@ -632,6 +634,7 @@ namespace smt {
lbool is_sat = m_simplex.make_feasible();
if (l_false == is_sat) {
std::cout << "unsat inequality\n";
row r = m_simplex.get_infeasible_row();
row_iterator it = m_simplex.row_begin(r), end = m_simplex.row_end(r);
for (; it != end; ++it) {

View file

@ -173,6 +173,8 @@ namespace smt {
u_map<row_info> m_ineq_row_info; // Simplex: row information per variable
uint_set m_vars; // Simplex: 0-1 variables.
simplex m_simplex; // Simplex: tableau
unsigned_vector m_explain_lower; // Simplex: explanations for lower bounds
unsigned_vector m_explain_upper; // Simplex: explanations for upper bounds
unsigned_vector m_ineqs_trail;
unsigned_vector m_ineqs_lim;
literal_vector m_literals; // temporary vector