Skip to content

Commit

Permalink
add parameter lp_settings.m_gomory_simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
levnach committed Dec 28, 2023
1 parent 5796e88 commit 0728b81
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/math/lp/gomory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ struct create_cut {
if (m_t.is_empty())
return report_conflict_from_gomory_cut();
TRACE("gomory_cut", print_linear_combination_of_column_indices_only(m_t.coeffs_as_vector(), tout << "gomory cut: "); tout << " >= " << m_k << std::endl;);
if (some_int_columns)
if (lia.lra.settings().m_gomory_simplify && some_int_columns)
simplify_inequality();

m_dep = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion src/math/lp/int_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ namespace lp {
if (r == lia_move::undef) lra.move_non_basic_columns_to_bounds();
if (r == lia_move::undef && should_hnf_cut()) r = hnf_cut();

if (r == lia_move::undef && should_gomory_cut()) r = gomory(*this).get_gomory_cuts(1);
if (r == lia_move::undef && should_gomory_cut()) r = gomory(*this).get_gomory_cuts(2);

if (r == lia_move::undef) r = int_branch(*this)();
if (settings().get_cancel_flag()) r = lia_move::undef;
Expand Down
1 change: 1 addition & 0 deletions src/math/lp/lp_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ void lp::lp_settings::updt_params(params_ref const& _p) {
report_frequency = p.arith_rep_freq();
m_simplex_strategy = static_cast<lp::simplex_strategy_enum>(p.arith_simplex_strategy());
m_nlsat_delay = p.arith_nl_delay();
m_gomory_simplify = p.arith_gomory_simplify();
}
2 changes: 2 additions & 0 deletions src/math/lp/lp_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ struct lp_settings {
random_gen m_rand;

public:
bool m_gomory_simplify = false;
void updt_params(params_ref const& p);
bool enable_hnf() const { return m_enable_hnf; }
unsigned nlsat_delay() const { return m_nlsat_delay; }
Expand Down Expand Up @@ -214,6 +215,7 @@ struct lp_settings {
bool backup_costs = true;
unsigned column_number_threshold_for_using_lu_in_lar_solver = 4000;
unsigned m_int_gomory_cut_period = 4;
bool m_gomory_simpliy = false;
unsigned m_int_find_cube_period = 4;
private:
unsigned m_hnf_cut_period = 4;
Expand Down
1 change: 1 addition & 0 deletions src/smt/params/smt_params_helper.pyg
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def_module_params(module_name='smt',
('arith.nl.optimize_bounds', BOOL, True, 'enable bounds optimization'),
('arith.nl.cross_nested', BOOL, True, 'enable cross-nested consistency checking'),
('arith.propagate_eqs', BOOL, True, 'propagate (cheap) equalities'),
('arith.gomory_simplify', BOOL, False, 'simplify gomory term'),
('arith.propagation_mode', UINT, 1, '0 - no propagation, 1 - propagate existing literals, 2 - refine finite bounds'),
('arith.branch_cut_ratio', UINT, 2, 'branch/cut ratio for linear integer arithmetic'),
('arith.int_eq_branch', BOOL, False, 'branching using derived integer equations'),
Expand Down

0 comments on commit 0728b81

Please sign in to comment.