I am trying to play around with MixedIntegerLinearProgram but now sure how to add constraints properly to it. My input is a list of relations , e.g. csts = [l <= 15, u >= 10, l <= u] and I want to add these to the solver.
All the examples I've seen requires constructing these constraints explicity (e.g. p = MixedIntegerLinearProgram(), l = p['l'], u = p['u'], p.set_objective(l-u), p.add_constraint(l <= 15), p.add_constraint(u>=10)) . I could analyze the input list of constraint to determine is coeficients and variables etc and then recreate new variables and relations but that seem too cumbersome. Is there an easier method to feed a given list of relations as above directly to p.add_constraint() ? -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.