Dima & Nathann What he's facing is an annoyance. Would it be feasible (ha ha) to rewrite the creation of constraints so that variables are automatically created in the LP if they're not there? That is, rather than looking for a workaround for the user, should we see this as an opportunity for enhancement?
john perry On Tuesday, March 26, 2013 12:54:48 AM UTC-5, tvn wrote: > > 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
