1 /*===========================================================================*/ 2 /* */ 3 /* This file is part of the SYMPHONY MILP Solver Framework. */ 4 /* */ 5 /* SYMPHONY was jointly developed by Ted Ralphs (ted@lehigh.edu) and */ 6 /* Laci Ladanyi (ladanyi@us.ibm.com). */ 7 /* */ 8 /* (c) Copyright 2000-2019 Ted Ralphs. All Rights Reserved. */ 9 /* */ 10 /* This software is licensed under the Eclipse Public License. Please see */ 11 /* accompanying file for terms. */ 12 /* */ 13 /*===========================================================================*/ 14 15 #ifndef _LP_PARAMS_H 16 #define _LP_PARAMS_H 17 18 #include "sym_constants.h" 19 #include "sym_timemeas.h" 20 21 /*---------------------------------------------------------------------------*\ 22 | The list of parameters associated with processing a node in the branch and | 23 | cut tree. See the README file for an explanation of the parameters | 24 \*---------------------------------------------------------------------------*/ 25 26 typedef struct CUT_TIME_OUT{ 27 double first_cut_time_out; 28 double all_cuts_time_out; 29 }cut_time_out; 30 31 typedef struct CGL_PARAMS{ 32 /* Cut generation in LP */ 33 int generate_cgl_cuts; 34 int max_depth_for_cgl_cuts; 35 int generate_cgl_gomory_cuts; 36 int generate_cgl_redsplit_cuts; 37 int generate_cgl_knapsack_cuts; 38 int generate_cgl_oddhole_cuts; 39 int generate_cgl_probing_cuts; 40 int generate_cgl_mir_cuts; 41 int generate_cgl_twomir_cuts; 42 int generate_cgl_clique_cuts; 43 int generate_cgl_flowcover_cuts; 44 int generate_cgl_rounding_cuts; 45 int generate_cgl_lift_and_project_cuts; 46 int generate_cgl_landp_cuts; 47 48 int generate_cgl_gomory_cuts_freq; 49 int generate_cgl_redsplit_cuts_freq; 50 int generate_cgl_knapsack_cuts_freq; 51 int generate_cgl_oddhole_cuts_freq; 52 int generate_cgl_probing_cuts_freq; 53 int generate_cgl_mir_cuts_freq; 54 int generate_cgl_twomir_cuts_freq; 55 int generate_cgl_clique_cuts_freq; 56 int generate_cgl_flowcover_cuts_freq; 57 int generate_cgl_rounding_cuts_freq; 58 int generate_cgl_lift_and_project_cuts_freq; 59 int generate_cgl_landp_cuts_freq; 60 61 int gomory_generated_in_root; 62 int redsplit_generated_in_root; 63 int knapsack_generated_in_root; 64 int oddhole_generated_in_root; 65 int probing_generated_in_root; 66 int mir_generated_in_root; 67 int twomir_generated_in_root; 68 int clique_generated_in_root; 69 int flowcover_generated_in_root; 70 int rounding_generated_in_root; 71 int lift_and_project_generated_in_root; 72 int landp_generated_in_root; 73 74 int probing_is_expensive; 75 int probing_root_max_look; 76 77 int gomory_max_depth; 78 int probing_max_depth; 79 int flowcover_max_depth; 80 int twomir_max_depth; 81 int clique_max_depth; 82 int oddhole_max_depth; 83 int knapsack_max_depth; 84 85 int use_chain_strategy; 86 int chain_status; 87 int max_chain_backtrack; 88 int max_chain_trial_num; 89 int chain_trial_freq; 90 int chain_check_index; 91 double chain_weighted_gap; 92 double chain_br_weighted_gap; 93 }cgl_params; 94 95 typedef struct LP_PARAMS{ 96 int verbosity; 97 double granularity; 98 int use_cg; 99 int set_obj_upper_lim; 100 int do_primal_heuristic; 101 int find_first_feasible; 102 double time_limit; 103 int debug_lp; 104 105 int lp_data_mip_is_copied; 106 /* TRUE: save the base model after root solve and then load it each time we 107 * start a new chain (dive). FALSE: load the model from scratch. Basis 108 * information is loaded separately in both cases for a warm start. Cant be 109 * set by user. 110 */ 111 int should_reuse_lp; 112 113 /* these two are passed directly to the lp solver */ 114 int scaling; 115 int fastmip; 116 117 /* 118 * should we do initial_solve() or dual_simplex() when we start a new 119 * chain. both have pros and cons and asm4 is not sure what to do. 120 */ 121 int should_warmstart_chain; 122 123 124 int try_to_recover_from_error; 125 /* ZERO_ONE_PROBLEM / INTEGER_PROBLEM / MIXED_INTEGER_PROBLEM */ 126 int problem_type; 127 int keep_description_of_pruned; 128 129 int not_fixed_storage_size; 130 131 int cut_pool_check_freq; 132 133 int load_balance_level; 134 int load_balance_iterations; 135 int load_balance_compare_candidates; 136 137 double fractional_diving_ratio; 138 int fractional_diving_num; 139 140 /* parameters constraining the growth of the matrix */ 141 double max_non_dual_feas_to_add_frac; 142 int max_non_dual_feas_to_add_min; 143 int max_non_dual_feas_to_add_max; 144 double max_not_fixable_to_add_frac; 145 int max_not_fixable_to_add_min; 146 int max_not_fixable_to_add_max; 147 148 int mat_col_compress_num; 149 double mat_col_compress_ratio; 150 int mat_row_compress_num; 151 double mat_row_compress_ratio; 152 153 /* parameters governing tailing off checking */ 154 int tailoff_gap_backsteps; 155 double tailoff_gap_frac; 156 int tailoff_obj_backsteps; 157 double tailoff_obj_frac; 158 double tailoff_absolute; 159 int tailoff_max_no_iterative_impr_iters_root; 160 161 int ineff_cnt_to_delete; 162 int eff_cnt_before_cutpool; 163 int ineffective_constraints; 164 int base_constraints_always_effective; 165 166 int branch_on_cuts; /* TRUE / FALSE */ 167 int discard_slack_cuts; 168 169 cut_time_out first_lp; 170 cut_time_out later_lp; 171 172 int max_cut_num_per_iter; 173 int max_cut_num_per_iter_root; 174 int min_root_cut_rounds; 175 int max_cut_length; 176 int tried_long_cuts; 177 178 int best_violation_length[CGL_NUM_GENERATORS]; 179 double best_violation[CGL_NUM_GENERATORS]; 180 181 /* Reduced cost and logical fixing parameters */ 182 int do_reduced_cost_fixing; 183 double gap_as_ub_frac; 184 double gap_as_last_gap_frac; 185 int do_logical_fixing; 186 int fixed_to_ub_before_logical_fixing; /* OK */ 187 double fixed_to_ub_frac_before_logical_fixing; /* OK */ 188 189 /* CGL parameters */ 190 cgl_params cgl; 191 192 /* Parameters affecting branching */ 193 int max_presolve_iter; 194 195 /*Defaults for the user supplied routines*/ 196 int is_feasible_default; 197 int send_feasible_solution_default; 198 int display_solution_default; 199 int shall_we_branch_default; 200 int select_candidates_default; 201 int strong_branching_cand_num_min; 202 int strong_branching_cand_num_max; 203 double strong_branching_red_ratio; 204 double strong_branching_high_low_weight; 205 int use_hot_starts; 206 int strong_br_all_candidates_level; 207 int strong_br_min_level; 208 int limit_strong_branching_time; 209 int user_set_strong_branching_cand_num; 210 int user_set_max_presolve_iter; 211 int should_use_rel_br; 212 int rel_br_override_default; 213 int rel_br_override_max_solves; 214 int rel_br_chain_backtrack; 215 double rel_br_min_imp; 216 double rel_br_max_imp; 217 218 int rel_br_threshold; /* how many times to do strong branching 219 on each variable before using pseudo 220 cost estimates */ 221 int rel_br_cand_threshold; /* how many candidates to solve 222 using strong branching without 223 any improvement in score before 224 stopping */ 225 int rel_br_max_solves; /* stop after these many LP-solve calls 226 regardless of improvement */ 227 228 int use_branching_prep; 229 int compare_candidates_default; 230 int select_child_default; 231 int pack_lp_solution_default; 232 int use_sos_branching; 233 int sos_branching_max_level; 234 235 /* Multi-criteria parameters */ 236 int multi_criteria; 237 int mc_find_supported_solutions; 238 int mc_add_optimality_cuts; 239 double mc_rho; /* For augmented Chebyshev norm */ 240 double mc_gamma; /* Weight on first objective */ 241 double mc_tau; /* Weight on second objective */ 242 243 int sensitivity_analysis; 244 245 246 int disable_obj; 247 int no_impr_in_obj; 248 249 /* feasibility pump parameters */ 250 int fp_enabled; 251 int fp_frequency; 252 int fp_max_cycles; 253 int fp_poor_sol_lim_fac; 254 double fp_time_limit; 255 double fp_display_interval; 256 double fp_flip_fraction; 257 double fp_max_initial_time; 258 double fp_min_gap; 259 double fp_fix_ratio; 260 261 /* rounding */ 262 int rounding_enabled; 263 int rounding_frequency; 264 double rounding_min_gap; 265 266 /* shifting */ 267 int shifting_enabled; 268 int shifting_frequency; 269 double shifting_min_gap; 270 271 /* local search */ 272 int ls_enabled; 273 int ls_frequency; 274 double ls_min_gap; 275 double ls_fix_ratio; 276 277 /* restricted search */ 278 int fr_enabled; 279 int fr_frequency; 280 int fr_first_feas_enabled; 281 double fr_max_int_fixed_ratio; 282 double fr_min_int_fixed_ratio; 283 double fr_max_c_fixed_ratio; 284 double fr_min_c_fixed_ratio; 285 double fr_incr_ratio; 286 double fr_min_gap; 287 int fr_max_nodes; 288 int fr_dive_level; 289 290 /* rins search */ 291 int rs_enabled; 292 double rs_min_int_fixed_ratio; 293 double rs_min_c_fixed_ratio; 294 double rs_min_gap; 295 int rs_max_nodes; 296 int rs_dive_level; 297 298 /* restricted/rinse search mode */ 299 int rs_mode_enabled; 300 int rs_lp_iter_limit; 301 302 /* local branching */ 303 int lb_enabled; 304 int lb_frequency; 305 double lb_min_gap; 306 int lb_search_k; 307 int lb_first_feas_enabled; 308 int lb_dive_level; 309 310 /* diving search */ 311 int ds_enabled; 312 int ds_frequency; 313 int ds_fractional_enabled; 314 int ds_fractional_fix_enabled; 315 int ds_vlength_enabled; 316 int ds_vlength_fix_enabled; 317 int ds_euc_enabled; 318 int ds_euc_fix_enabled; 319 int ds_guided_enabled; 320 int ds_guided_fix_enabled; 321 int ds_crossover_enabled; 322 int ds_crossover_fix_enabled; 323 int ds_root_enabled; 324 int ds_coeff_enabled; 325 int ds_pc_enabled; 326 int ds_rank_enabled; 327 int ds_rank_fix_enabled; 328 double ds_incr_ratio; 329 int ds_solve_ip; 330 double ds_solve_ip_col_ratio; 331 double ds_solve_ip_min_gap; 332 double ds_min_gap; 333 334 /* to avoid nested for loops, check if userind's are in order */ 335 int is_userind_in_order; 336 }lp_params; 337 338 #endif 339