I didn't know that SAGE could handle MILP (awesome!), I'm just playing around with it now and was wondering if there was a way to remove a constrain from a particular problem or indeed modify it without reseting the whole problem.
For example: Say I wanted to solve the problem described in the online tutorial, I would input: sage: p = MixedIntegerLinearProgram(maximization=False) sage: w = p.new_variable(integer=True) sage: p.add_constraint(w[0] + w[1] + w[2] - 14*w[3] == 0) sage: p.add_constraint(w[1] + 2*w[2] - 8*w[3] == 0) sage: p.add_constraint(2*w[2] - 3*w[3] == 0) sage: p.add_constraint(w[0] - w[1] - w[2] >= 0)sage: p.add_constraint(w[3] >= 1) sage: _ = [ p.set_min(w[i], None) for i in range(1,4) ] sage: p.set_objective(w[3]) sage: p.show() If I wanted to change the last constraint to be w[0]-w[1]-w[2]>=1 can I do this without resetting the whole p? (Sorry to hijack the original question). Thanks, Vince On 16 March 2012 10:45, Nathann Cohen <nathann.co...@gmail.com> wrote: > Sage has a class name 'Mixed integer linear programming' for modeling >> MIPs and class for LP Solver backends like Co-in, CPLEX, GLPK and Gurobi. >> At the moment I haven't know any sage class only for vehicle routing >> problem. >> > > Yep ! There's a short tutorial about its use there : > http://steinertriples.fr/ncohen/tut/LP/ > > And we also have a TSP function implemented :-) > > > http://www.sagemath.org/doc/reference/sage/graphs/generic_graph.html#sage.graphs.generic_graph.GenericGraph.traveling_salesman_problem > > Nathann > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- Dr Vincent Knight Cardiff School of Mathematics Senghennydd Road, Cardiff CF24 4AG (+44) 29 2087 5548 www.vincent-knight.com @drvinceknight <http://twitter.com/#!/drvinceknight> Skype: drvinceknight -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org