Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Implement and use LPRevisedDictionary.objective_variable()
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jun 27, 2015
1 parent 21c72d8 commit 1a2845f
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/sage/numerical/interactive_simplex_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1a2845f

Please sign in to comment.