Hello everybody !! I am trying to fill some doctests in the numerical/ folder, and it looks like the -coverage flag does not like to see methods raising exceptions...
sage -coverage sage/numerical/backends/cplex_backend.pyx Missing documentation: * int add_variable(self, lower_bound=0.0, upper_bound=None, binary=False, continuous=False, integer=False, obj=0.0, name=None) except -1: """ Add a variable. This amounts to adding a new column to the matrix. By default, the variable is both positive and real. INPUT: - ``lower_bound`` - the lower bound of the variable (default: 0) - ``upper_bound`` - the upper bound of the variable (default: ``None``) - ``binary`` - ``True`` if the variable is binary (default: ``False``). - ``continuous`` - ``True`` if the variable is binary (default: ``True``). - ``integer`` - ``True`` if the variable is binary (default: ``False``). - ``obj`` - (optional) coefficient of this variable in the objective function (default: 0.0) - ``name`` - an optional name for the newly added variable (default: ``None``). OUTPUT: The index of the newly created variable EXAMPLE:: sage: from sage.numerical.backends.generic_backend import get_solver sage: p = get_solver(solver = "CPLEX") # optional - CPLEX sage: p.ncols() # optional - CPLEX 0 sage: p.add_variable() # optional - CPLEX 0 sage: p.ncols() # optional - CPLEX 1 sage: p.add_variable(binary=True) # optional - CPLEX 1 sage: p.add_variable(lower_bound=-2.0, integer=True) # optional - CPLEX 2 sage: p.add_variable(continuous=True, integer=True) # optional - CPLEX Traceback (most recent call last): * int solve(self) except -1: r""" Solves the problem. .. NOTE:: This method raises ``MIPSolverException`` exceptions when the solution can not be computed for any reason (none exists, or the LP solver was not able to find it, etc...) EXAMPLE:: sage: from sage.numerical.backends.generic_backend import get_solver sage: p = get_solver(solver = "CPLEX") # optional - CPLEX sage: p.add_linear_constraints(5, 0, None) # optional - CPLEX sage: p.add_col(range(5), range(5)) # optional - CPLEX sage: p.solve() # optional - CPLEX 0 sage: p.objective_coefficient(0,1) # optional - CPLEX sage: p.solve() # optional - CPLEX Traceback (most recent call last): Any idea why, or how to fix it ? :-) Nathann -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org