I've been using the linear programming for class, and love it! Thanks! I noticed a few areas that would make it more user-friendly:
it would be great if p.get_variables() returned the values of all of the variables by default, instead of insisting that you ask for a specific variable
Maybe a p.show_solution() method could be added that would print out the optimal objective function value and the values of all variables, if the problem was solved.
the maximization=False parameter is a little awkward. Perhaps that parameter could be renamed to type="maximize" or type="minimize". Or perhaps we could also have a minimize=None parameter, and if maximize and minimize are both None, the default is maximize (for compatibility), but if either is set, that is the problem, and if both are set to True, then we throw an error.
I've been using the linear programming for class, and love it! Thanks! I noticed a few areas that would make it more user-friendly:
p.get_variables()
returned the values of all of the variables by default, instead of insisting that you ask for a specific variablep.show_solution()
method could be added that would print out the optimal objective function value and the values of all variables, if the problem was solved.maximization=False
parameter is a little awkward. Perhaps that parameter could be renamed totype="maximize"
ortype="minimize"
. Or perhaps we could also have aminimize=None
parameter, and if maximize and minimize are both None, the default is maximize (for compatibility), but if either is set, that is the problem, and if both are set to True, then we throw an error.CC: @nathanncohen @mforets
Component: linear programming
Issue created by migration from https://trac.sagemath.org/ticket/15356