X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fcensus-tools.git;a=blobdiff_plain;f=src%2FLinearProgramming.py;h=d779dc00aaad47cf1c05a56bf4b7d475b83d4223;hp=2e949d252bd65e18e175a9068d73c9cbc97a32e1;hb=70ff65d7dcb896ca5c0c36d39da1e36d8a239b46;hpb=889eb060f21cd1fa55eb1217bb384d3e0d32c773 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