mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 13:29:11 +00:00 
			
		
		
		
	add parameter lp_settings.m_gomory_simplify
This commit is contained in:
		
							parent
							
								
									5796e8899f
								
							
						
					
					
						commit
						0728b81e9e
					
				
					 5 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -328,7 +328,7 @@ public:
 | 
			
		|||
        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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;        
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -187,6 +187,7 @@ private:
 | 
			
		|||
    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; }
 | 
			
		||||
| 
						 | 
				
			
			@ -214,6 +215,7 @@ public:
 | 
			
		|||
    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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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'),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue