From b541f0e0b737e378ebd92f167aed38242ce6a8ed Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Fri, 20 Jun 2014 13:38:50 -0700 Subject: [PATCH] Last review tweaks. --- .../numerical/interactive_simplex_method.py | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/sage/numerical/interactive_simplex_method.py b/src/sage/numerical/interactive_simplex_method.py index b74324711db..2522ffc4fb1 100644 --- a/src/sage/numerical/interactive_simplex_method.py +++ b/src/sage/numerical/interactive_simplex_method.py @@ -145,10 +145,14 @@ for feasible dictionaries with a set entering variable or for dual feasible dictionaries -It is also possible to obtain :meth:`feasible sets ` and -:meth:`final dictionaries ` of problems, -work with :class:`revised dictionaries `, and use the dual -simplex method! +It is also possible to obtain :meth:`feasible sets ` +and :meth:`final dictionaries ` of +problems, work with :class:`revised dictionaries `, +and use the dual simplex method! + +.. NOTE:: + + Currently this does not have a display format for the terminal. """ @@ -209,7 +213,7 @@ def _assemble_arrayl(lines, stretch=None): OUTPUT: - - a :class:`LatexExpr`. + - a :class:`LatexExpr` EXAMPLES:: @@ -1921,14 +1925,15 @@ def run_simplex_method(self): \text{The optimal value: $6250$. An optimal solution: $\left(250,\,750\right)$.} \end{gather*} """ + result = [] + d = self.initial_dictionary() + result.append(latex(d)) + def step(entering, leaving): result.append(r"\text{{Entering: ${}$. Leaving: ${}$.}}" .format(latex(entering), latex(leaving))) result.append(d.ELLUL(entering, leaving)) - result = [] - d = self.initial_dictionary() - result.append(latex(d)) if d.is_feasible(): is_feasible = True else: