SettingsΒΆ

The settings names are defined with their default values at the beginning of the file decogo/solver/settings.py. The settings are grouped by usage:

  • Solver names and their settings

  • General settings

  • OA algorithm settings

  • CG algorithm settings

  • Refactory for decogo setting

  • DBCG algorithm settings

In order to add/modify/remove the settings, simply modify the declaration of dictionary _setting_names_default_val in solver/settings.py.

In order to overwrite the default settings, it is necessary to provide the settings file decogo.set which should be located in the working directory. The example of settings file definition:

strategy = OA
maxtime = 300

In the example above, we set the solver strategy to OA and set maximum running time 300 sec.

Here is the list of settings defined settings and their default values:

_setting_names_default_val = \
    {'lp_solver': 'gurobi',  # LP solver name
     'nlp_solver': 'ipopt',  # NLP solver name
     'minlp_solver': 'scip',  # MINLP solver

     'mip_solver': 'gurobi',  # MIP solver name 'gurobi', change MIP solver to
     # 'gurobi_persistent' for more solution points

     'scip_settings': [('limits/stallnodes', 1000), ('limits/gap', 0),
                       ('limits/restarts', 5)],
     'ipopt_settings': [('tol', 1e-1), ('dual_inf_tol', 1e1),
                        ('constr_viol_tol', 1e-1), ('compl_inf_tol', 1e0)],
     'gurobi_settings': [('NumericFocus', 1), ('Method', 1)],

     # general
     'strategy': 'CG',  # strategy for solver; can be 'OA' or 'CG' or
     # 'DBCG'
     'maxtime': 1e10,  # maximum running time for the solver in seconds
     'logger_level': 'info',  # 'debug' - detailed info about solution
     # process, 'info' - only important information

     # Decomposition
     # estimate the bounds for unbounded variables during the decomposition
     'decomp_estimate_var_bounds': False,

     # OA
     'oa_eps_active_constraint': 0.01,  # accuracy for active constraint
     'oa_eps_rel_obj_val': 0.001,  # relative accuracy for stopping the OA
     # algorithm, i.e. c(x_star) - c(x_oa) < eps
     'oa_max_iter': 20,  # max number of iterations for main OA algorithm
     'oa_eps_start': 0.01,  # accuracy of LP solution improvement during OA start
     'oa_line_search': True,  # switch on/off line search
     'oa_fix_and_refine': False,  # switch on/off fix-and-refine

     # CG
     'cg_min_inner_point_distance': 1e-5,  # minimum distance to inner points
     'cg_generate_columns_with_nlp': False,  # True - try to generate columns
     # with NLP solver, False - with MINLP solver
     'cg_max_iter': 15,  # maximum number of iteration during CG
     'cg_add_local_cut': True,  # indicates if to add a local cut when solving
     # CG subproblem
     'cg_sub_gradient_max_iter': 5,  # maximum number of subgradient iterations
     'cg_fast_fw_max_iter': 10,  # maximum number of iteration during FW CG
     'cg_check_convergence': False, # indicates whether in the end of
     # the algorithm subproblems are solved exactly for convergence check
     'cg_max_main_iter': 20,  # maximum iteration number for
     # the main iteration
     'cg_fast_fw': True,  # to use fast fw cg instead of approx cg in start
     'cg_fast_approx': True,  # to use approx subproblem solving in fast cg
     'cg_find_solution': True,  # switch on or off find solution heuristics
     'cg_find_sol_mip_pool': 100,  # to set num of solution pool in
     # solving mip proj prob
     'cg_find_sol_mip_pool_tau': 0.5,  # to set value of tau for local
     # search of projection point
     'cg_find_sol_mip_pool_max_round': 5,  # to set max iteration of
     # local search

     # Refactory version of CG (and DBCG in a future version)
     'user_defined_input_model': False,  # switch on/off user-defined input
     # model

     # DBCG
     'block_agg_option': 'successive',  # select the strategy of block
     # aggregation; can be 'successive' or 'random'
     # or 'viol_copy_constr'
     'max_num_atomic_block_in_agg_block': 2,  # maximum number of atomic blocks
     # that are aggregated in a single
     # aggregated block
     'min_num_atomic_block_in_agg_block': 1,  # minimum number of atomic blocks
     'num_hyper_block_per_iter': 1,   # maximum number of hyper blocks created
     # per iteration
     'max_size_hyper_block': 2,  # maximum number of atomic blocks that are
     # combined in a single hyper block
     'hyper_block_mip_pool': 1,  # to set num of solution pool in
     # solving mip proj prob for hyper/agg sub-problems
     'creat_hyper_block_test': False,  # to test fast cg for fixed hyper blocks
     'standard_cg': False,  # to run standard cg at end of fast cg iterations
     'max_iter_fast_cg_init': 15,  # maximum iteration number for
     # fast cg for atomic blocks
     'max_iter_fast_cg_hyper': 5,  # maximum iteration number for
     # fast cg for hyper blocks
     'max_iter_fast_cg_active': 3,  # maximum iteration number for
     # fast cg for active blocks
     'max_iter_standard_cg': 5,  # maximum iteration number for