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
bm = delete(bm, idxs, axis=1)
return bm.tolist()
+
+ def objective_function_value(self):
+ c = array(self.objective_coefficients)
+ sv = array(self.solution_vector)
+ return dot(sv, c)
+
+
def reduced_cost(self, idx):
# Find the reduced cost ofthe variable whose column has index
# idx.