def solve(self, sense=None):
result = self.solve_unchecked(sense)<EOL>if not result:<EOL><INDENT>raise SolverError('<STR_LIT>'.format(result.status))<EOL><DEDENT>return result<EOL>
Solve problem and return result.

        Raises :class:`SolverError` if the solution is not optimal.