From b49d0e70000050fa22fc74e8cf94f33cb4b6238d Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 18 Jun 2010 01:46:33 -0400 Subject: [PATCH] Added the variables() method to the SimplexIteration class. --- src/LinearProgramming.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/LinearProgramming.py b/src/LinearProgramming.py index 2e8477d..4211058 100644 --- a/src/LinearProgramming.py +++ b/src/LinearProgramming.py @@ -382,6 +382,15 @@ class SimplexIteration(object): self._solution_vector = array(value) + @property + def variables(self): + vars = [] + for idx in range(1, len(self.solution_vector)+1): + vars.append("x" + str(idx)) + + return vars + + @property def basic_variables(self): # The current set of basic variables. Constructed from the -- 2.44.2