def accepts(problem): return (type(problem.objective) == Minimize and problem.objective.is_quadratic() and problem.is_dcp() and not convex_attributes(problem.variables()) and all( type(c) in [Zero, NonPos, Equality, Inequality] for c in problem.constraints) and are_args_affine(problem.constraints) and problem.is_dpp())
def accepts(self, problem): return (type(problem.objective) == Minimize and problem.objective.is_quadratic() and problem.is_dcp() and not convex_attributes(problem.variables()) and all( type(c) == Zero or type(c) == NonPos for c in problem.constraints) and are_args_affine(problem.constraints))
def accepts(problem): """ Problems with quadratic, piecewise affine objectives, piecewise-linear constraints inequality constraints, and affine equality constraints are accepted by the reduction. """ return (problem.objective.expr.is_qpwa() and not set( ['PSD', 'NSD']).intersection(convex_attributes(problem.variables())) and all((type(c) in (Inequality, NonPos) and c.expr.is_pwl()) or (type(c) in (Equality, Zero) and are_args_affine([c])) for c in problem.constraints))
def accepts(self, problem): """ Problems with quadratic, piecewise affine objectives, piecewise-linear constraints inequality constraints, and affine equality constraints are accepted. """ return (((type(problem.objective) == Minimize and problem.objective.expr.is_qpwa()) or problem.objective.expr.is_affine()) and not set(['PSD', 'NSD']).intersection( convex_attributes(problem.variables())) and all( (type(c) == NonPos and c.args[0].is_pwl()) or (type(c) == Zero and are_args_affine([c])) for c in problem.constraints))
def accepts(self, problem): return (type(problem.objective) == Minimize and problem.objective.expr.is_affine() and not convex_attributes(problem.variables()) and are_args_affine(problem.constraints))
def accepts(self, problem): return (type(problem.objective) == Minimize and is_stuffed_qp_objective(problem.objective) and all( type(c) == Zero or type(c) == NonPos for c in problem.constraints) and are_args_affine(problem.constraints))