parameters: (self, problem)
return_statement: return True
docstring: Can NAG solve the problem?
docstring_summary: Can NAG solve the problem?
docstring_tokens: Can NAG solve the problem?
function: def accepts(self, problem) -> bool:
          """Can NAG solve the problem?
          """
          if not problem.objective.args[0].is_affine():
              return False
          for constr in problem.constraints:
              if type(constr) not in self.SUPPORTED_CONSTRAINTS:
                  return False
              for arg in constr.args:
                  if not arg.is_affine():
                      return False
          return True
function_tokens: def accepts ( self , problem ) -> bool : if not problem . objective . args [ 0 ] . is_affine ( ) : return False for constr in problem . constraints : if type ( constr ) not in self . SUPPORTED_CONSTRAINTS : return False for arg in constr . args : if not arg . is_affine ( ) : return False return True