From 70ff65d7dcb896ca5c0c36d39da1e36d8a239b46 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 12 Jun 2010 12:47:44 -0400 Subject: [PATCH] Added a setter for the type property. Added a print_tableau method. --- src/LinearProgramming.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/LinearProgramming.py b/src/LinearProgramming.py index 2e949d2..d779dc0 100644 --- a/src/LinearProgramming.py +++ b/src/LinearProgramming.py @@ -59,7 +59,7 @@ class LinearProgram(object): """ return self._type - + @type.setter def type(self, type): if type == MINIMIZE: self._type = MINIMIZE @@ -216,6 +216,15 @@ class LinearProgram(object): + def print_tableau(self): + """ + Tell lp_solve to print its simplex tableau. Only works after + a successful call to solve(). + """ + lpsolve('set_outputfile', self._lp, '') + lpsolve('print_tableau', self._lp) + + def __init__(self): """ Initialize the object, setting all of the properties -- 2.43.2