From ec31ed65e3624affa79298d2bb8d414600b85e47 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 29 Mar 2016 20:51:52 -0700 Subject: [PATCH] InteractiveLPProblem.standard_form: Add doctest for objective_constant_term --- src/sage/numerical/interactive_simplex_method.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/sage/numerical/interactive_simplex_method.py b/src/sage/numerical/interactive_simplex_method.py index 37ed358ae45..0d65fed9b5d 100644 --- a/src/sage/numerical/interactive_simplex_method.py +++ b/src/sage/numerical/interactive_simplex_method.py @@ -1597,9 +1597,10 @@ def standard_form(self, transformation=False, **kwds): Domain: Vector space of dimension 2 over Rational Field Codomain: Vector space of dimension 2 over Rational Field - A more complicated transfromation map:: + A more complicated transformation map:: - sage: P = InteractiveLPProblem(A, b, c, variable_type=["<=", ""]) + sage: P = InteractiveLPProblem(A, b, c, variable_type=["<=", ""], + ....: objective_constant_term=42) sage: PSF, f = P.standard_form(True) sage: f Vector space morphism represented by the matrix: @@ -1618,6 +1619,10 @@ def standard_form(self, transformation=False, **kwds): TypeError: given input is not a solution for this problem sage: P.is_optimal(f(PSF.optimal_solution())) True + sage: PSF.optimal_value() + 5042 + sage: P.optimal_value() + 5042 """ A, b, c, x = self.Abcx() f = identity_matrix(self.n()).columns()