add_oa_cuts
(function from pyomo.contrib.mindtpy.cut_generation
)
- pyomo.contrib.mindtpy.cut_generation.add_oa_cuts(target_model, dual_values, jacobians, objective_sense, mip_constraint_polynomial_degree, mip_iter, config, timing, cb_opt=None, linearize_active=True, linearize_violated=True)[source]
Adds OA cuts.
Generates and adds OA cuts (linearizes nonlinear constraints). For nonconvex problems, turn on ‘config.add_slack’. Slack variables will always be used for nonlinear equality constraints.
- Parameters:
target_model (Pyomo model) – The relaxed linear model.
dual_values (list) – The value of the duals for each constraint.
jacobians (ComponentMap) – Map nonlinear_constraint –> Map(variable –> jacobian of constraint w.r.t. variable).
objective_sense (Int) – Objective sense of model.
mip_constraint_polynomial_degree (Set) – The polynomial degrees of constraints that are regarded as linear.
mip_iter (Int) – MIP iteration counter.
config (ConfigBlock) – The specific configurations for MindtPy.
cb_opt (SolverFactory, optional) – Gurobi_persistent solver, by default None.
linearize_active (bool, optional) – Whether to linearize the active nonlinear constraints, by default True.
linearize_violated (bool, optional) – Whether to linearize the violated nonlinear constraints, by default True.