mirror of
https://github.com/Z3Prover/z3
synced 2026-07-17 12:35:44 +00:00
Add lp.gomory_cut_orthogonality (default false), lp.gomory_recent_cuts (default 5) and lp.gomory_parallelism_threshold (default 0.9). When efficacy selection (select or augment) is active and orthogonality is enabled, a non-priority candidate cut is skipped when its parallelism |a.b|/(||a|| ||b||) with an already-selected cut this round, or with one of the last gomory_recent_cuts cuts added in previous rounds (kept in int_solver::m_recent_cuts), exceeds gomory_parallelism_threshold. Adds lar_term::find_coeff and gomory::cut_parallelism. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
41 lines
1 KiB
C++
41 lines
1 KiB
C++
/*++
|
|
Copyright (c) 2017 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
<name>
|
|
|
|
Abstract:
|
|
|
|
<abstract>
|
|
|
|
Author:
|
|
Nikolaj Bjorner (nbjorner)
|
|
Lev Nachmanson (levnach)
|
|
|
|
Revision History:
|
|
--*/
|
|
#pragma once
|
|
#include "math/lp/lar_term.h"
|
|
#include "math/lp/lia_move.h"
|
|
#include "math/lp/explanation.h"
|
|
#include "math/lp/static_matrix.h"
|
|
|
|
namespace lp {
|
|
class int_solver;
|
|
class lar_solver;
|
|
class gomory {
|
|
class int_solver& lia;
|
|
class lar_solver& lra;
|
|
unsigned_vector gomory_select_int_infeasible_vars(unsigned num_cuts);
|
|
unsigned_vector gomory_select_random_rows(unsigned num_rows);
|
|
bool is_gomory_cut_target(lpvar j);
|
|
bool cut_has_enough_efficacy(const lar_term& t, const mpq& k);
|
|
double cut_efficacy(const lar_term& t, const mpq& k);
|
|
double cut_parallelism(const lar_term& a, const lar_term& b);
|
|
u_dependency* add_deps(u_dependency*, const row_strip<mpq>&, lpvar);
|
|
public:
|
|
lia_move get_gomory_cuts(unsigned num_cuts);
|
|
gomory(int_solver& lia);
|
|
};
|
|
}
|