diff --git a/src/sage/numerical/interactive_simplex_method.py b/src/sage/numerical/interactive_simplex_method.py index 1be6d57e932..553052175ea 100644 --- a/src/sage/numerical/interactive_simplex_method.py +++ b/src/sage/numerical/interactive_simplex_method.py @@ -4025,7 +4025,7 @@ def dictionary(self): self.objective_value(), self.basic_variables(), self.nonbasic_variables(), - "z", + self.objective_variable(), style=self.style()) D._entering = self._entering D._leaving = self._leaving @@ -4174,6 +4174,26 @@ def objective_value(self): """ return self.y() * self.problem().b() + def objective_variable(self): + r""" + Return the objective variable of ``self``. + + EXAMPLES:: + + sage: A = ([1, 1], [3, 1]) + sage: b = (1000, 1500) + sage: c = (10, 5) + sage: P = InteractiveLPProblemStandardForm(A, b, c) + sage: D = P.revised_dictionary() + sage: D.objective_variable() + 'z' + sage: P = InteractiveLPProblemStandardForm(A, b, c, style='vanderbei') + sage: D = P.revised_dictionary() + sage: D.objective_variable() + 'zeta' + """ + return self._objective_variable + def problem(self): r""" Return the original problem.