MindtPySolver
(class from pyomo.contrib.mindtpy.MindtPy
)
- class pyomo.contrib.mindtpy.MindtPy.MindtPySolver[source]
Bases:
object
Decomposition solver for Mixed-Integer Nonlinear Programming (MINLP) problems.
The MindtPy (Mixed-Integer Nonlinear Decomposition Toolbox in Pyomo) solver applies a variety of decomposition-based approaches to solve Mixed-Integer Nonlinear Programming (MINLP) problems. These approaches include:
Outer approximation (OA)
Global outer approximation (GOA)
Regularized outer approximation (ROA)
LP/NLP based branch-and-bound (LP/NLP)
Global LP/NLP based branch-and-bound (GLP/NLP)
Regularized LP/NLP based branch-and-bound (RLP/NLP)
Feasibility pump (FP)
- __init__()
Methods
__init__
()available
([exception_flag])Check if solver is available.
license_is_valid
()solve
(model, **kwds)Solve the model.
version
()Return a 3-tuple describing the solver version.
Attributes
CONFIG
Member Documentation
- solve(model, **kwds)[source]
Solve the model.
- Parameters:
model (Block) – a Pyomo model or block to be solved
- Keyword Arguments:
iteration_limit (NonNegativeInt, default=50) – Number of maximum iterations in the decomposition methods.
stalling_limit (PositiveInt, default=15) – Stalling limit for primal bound progress in the decomposition methods.
time_limit (PositiveInt, default=600) – Seconds allowed until terminated. Note that the time limit cancurrently only be enforced between subsolver invocations. You mayneed to set subsolver time limits as well.
strategy (In['OA', 'ECP', 'GOA', 'FP'], default='OA') – MINLP Decomposition strategy to be applied to the method. Currently available Outer Approximation (OA), Extended Cutting Plane (ECP), Global Outer Approximation (GOA) and Feasibility Pump (FP).
add_regularization (In['level_L1', 'level_L2', 'level_L_infinity', 'grad_lag', 'hess_lag', 'hess_only_lag', 'sqp_lag'], optional) – Solving a regularization problem before solve the fixed subproblemthe objective function of the regularization problem.
call_after_main_solve (default=<pyomo.contrib.gdpopt.util._DoNothing object at 0x7f3061be9f50>) – Callback hook after a solution of the main problem.
call_before_subproblem_solve (default=<pyomo.contrib.gdpopt.util._DoNothing object at 0x7f3061c38390>) – Callback hook before a solution of the nonlinear subproblem.
call_after_subproblem_solve (default=<pyomo.contrib.gdpopt.util._DoNothing object at 0x7f3061c38410>) – Callback hook after a solution of the nonlinear subproblem.
call_after_subproblem_feasible (default=<pyomo.contrib.gdpopt.util._DoNothing object at 0x7f3061c38290>) – Callback hook after a feasible solution of the nonlinear subproblem.
tee (bool, default=False) – Stream output to terminal.
logger (a_logger, default='pyomo.contrib.mindtpy') – The logger object or name to use for reporting.
logging_level (NonNegativeInt, default=20) – The logging level for MindtPy.CRITICAL = 50, ERROR = 40, WARNING = 30, INFO = 20, DEBUG = 10, NOTSET = 0
integer_to_binary (bool, default=False) – Convert integer variables to binaries (for no-good cuts).
add_no_good_cuts (bool, default=False) – Add no-good cuts (no-good cuts) to binary variables to disallow same integer solution again.Note that integer_to_binary flag needs to be used to apply it to actual integers and not just binaries.
use_tabu_list (bool, default=False) – Use tabu list and incumbent callback to disallow same integer solution again.
single_tree (bool, default=False) – Use single tree implementation in solving the MIP main problem.
solution_pool (bool, default=False) – Use solution pool in solving the MIP main problem.
num_solution_iteration (PositiveInt, default=5) – The number of MIP solutions (from the solution pool) used to generate the fixed NLP subproblem in each iteration.
cycling_check (bool, default=True) – Check if OA algorithm is stalled in a cycle and terminate.
feasibility_norm (In['L1', 'L2', 'L_infinity'], default='L_infinity') – Different forms of objective function in feasibility subproblem.
differentiate_mode (In['reverse_symbolic', 'sympy'], default='reverse_symbolic') – Differentiate mode to calculate jacobian.
use_mcpp (bool, default=False) – Use package MC++ to set a bound for variable ‘objective_value’, which is introduced when the original problem’s objective function is nonlinear.
calculate_dual_at_solution (bool, default=False) – Calculate duals of the NLP subproblem.
use_fbbt (bool, default=False) – Use fbbt to tighten the feasible region of the problem.
use_dual_bound (bool, default=True) – Add dual bound constraint to enforce the objective satisfies best- found dual bound.
partition_obj_nonlinear_terms (bool, default=True) – Partition objective with the sum of nonlinear terms using epigraph reformulation.
quadratic_strategy (In[0, 1, 2], default=0) – How to treat the quadratic terms in MINLP.0 : treat as nonlinear terms1 : only use quadratic terms in objective function directly in main problem2 : use quadratic terms in objective function and constraints in main problem
move_objective (bool, default=False) – Whether to replace the objective function to constraint using epigraph constraint.
add_cuts_at_incumbent (bool, default=False) – Whether to add lazy cuts to the main problem at the incumbent solution found in the branch & bound tree
nlp_solver (In['ipopt', 'appsi_ipopt', 'gams', 'baron', 'cyipopt'], default='ipopt') – Which NLP subsolver is going to be used for solving the nonlinearsubproblems.
nlp_solver_args (dict, optional) – Which NLP subsolver options to be passed to the solver while solving the nonlinear subproblems.
mip_solver (In['gurobi', 'cplex', 'cbc', 'glpk', 'gams', 'gurobi_persistent', 'cplex_persistent', 'appsi_cplex', 'appsi_gurobi', 'appsi_highs'], default='glpk') – Which MIP subsolver is going to be used for solving the mixed-integer main problems.
mip_solver_args (dict, optional) – Which MIP subsolver options to be passed to the solver while solving the mixed-integer main problems.
mip_solver_mipgap (PositiveFloat, default=0.0001) – Mipgap passed to MIP solver.
threads (NonNegativeInt, default=0) – Threads used by MIP solver and NLP solver.
regularization_mip_threads (NonNegativeInt, default=0) – Threads used by MIP solver to solve regularization main problem.
solver_tee (bool, default=False) – Stream the output of MIP solver and NLP solver to terminal.
mip_solver_tee (bool, default=False) – Stream the output of MIP solver to terminal.
nlp_solver_tee (bool, default=False) – Stream the output of nlp solver to terminal.
mip_regularization_solver (In['gurobi', 'cplex', 'cbc', 'glpk', 'gams', 'gurobi_persistent', 'cplex_persistent', 'appsi_cplex', 'appsi_gurobi', 'appsi_highs'], optional) – Which MIP subsolver is going to be used for solving the regularization problem.
absolute_bound_tolerance (PositiveFloat, default=0.0001) – Absolute tolerance for bound feasibility checks.
relative_bound_tolerance (PositiveFloat, default=0.001) – Relative tolerance for bound feasibility checks. \(|Primal Bound - Dual Bound| / (1e-10 + |Primal Bound|) <= relative tolerance\)
small_dual_tolerance (default=1e-08) – When generating cuts, small duals multiplied by expressions can cause problems. Exclude all duals smaller in absolute value than the following.
integer_tolerance (default=1e-05) – Tolerance on integral values.
constraint_tolerance (default=1e-06) – Tolerance on constraint satisfaction.
variable_tolerance (default=1e-08) – Tolerance on variable bounds.
zero_tolerance (default=1e-08) – Tolerance on variable equal to zero.
fp_cutoffdecr (PositiveFloat, default=0.1) – Additional relative decrement of cutoff value for the original objective function.
fp_iteration_limit (PositiveInt, default=20) – Number of maximum iterations in the feasibility pump methods.
fp_projcuts (bool, default=True) – Whether to add cut derived from regularization of MIP solution onto NLP feasible set.
fp_transfercuts (bool, default=True) – Whether to transfer cuts from the Feasibility Pump MIP to main MIP in selected strategy (all except from the round in which the FP MIP became infeasible).
fp_projzerotol (PositiveFloat, default=0.0001) – Tolerance on when to consider optimal value of regularization problem as zero, which may trigger the solution of a Sub-NLP.
fp_mipgap (PositiveFloat, default=0.01) – Optimality tolerance (relative gap) to use for solving MIP regularization problem.
fp_discrete_only (bool, default=True) – Only calculate the distance among discrete variables in regularization problems.
fp_main_norm (In['L1', 'L2', 'L_infinity'], default='L1') – Different forms of objective function MIP regularization problem.
fp_norm_constraint (bool, default=True) – Whether to add the norm constraint to FP-NLP
fp_norm_constraint_coef (PositiveFloat, default=1) – The coefficient in the norm constraint, correspond to the Beta in the paper.
obj_bound (PositiveFloat, default=1000000000000000.0) – Bound applied to the linearization of the objective function if main MIP is unbounded.
continuous_var_bound (PositiveFloat, default=10000000000.0) – Default bound added to unbounded continuous variables in nonlinear constraint if single tree is activated.
integer_var_bound (PositiveFloat, default=1000000000.0) – Default bound added to unbounded integral variables in nonlinear constraint if single tree is activated.
initial_bound_coef (PositiveFloat, default=0.1) – The coefficient used to approximate the initial primal/dual bound.
level_coef (PositiveFloat, default=0.5) – The coefficient in the regularization main problemrepresents how much the linear approximation of the MINLP problem is trusted.
solution_limit (PositiveInt, default=10) – The solution limit for the regularization problem since it does not need to be solved to optimality.
sqp_lag_scaling_coef (In['fixed', 'variable_dependent'], default='fixed') – The coefficient used to scale the L2 norm in sqp_lag.