id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
11606,simplify constraints in linear programs,john_perry,ncohen,"MixedIntegerLinearProgram doesn't notice when it is given constraints that already exist in the program, or that are constant multiples. A simple example:
{{{
sage: lp = MixedIntegerLinearProgram()
sage: for each in xrange(10):
....: lp.add_constraint(lp[0]-lp[1],min=1)
....:
sage: lp.show()
Maximization:
Constraints:
1.0 <= x_0 -x_1
1.0 <= x_0 -x_1
1.0 <= x_0 -x_1
1.0 <= x_0 -x_1
1.0 <= x_0 -x_1
1.0 <= x_0 -x_1
1.0 <= x_0 -x_1
1.0 <= x_0 -x_1
1.0 <= x_0 -x_1
1.0 <= x_0 -x_1
Variables:
x_0 is a continuous variable (min=0.0, max=+oo)
x_1 is a continuous variable (min=0.0, max=+oo)
}}}
Notice that the same constraint appears 10 different times.
Apply:
- [attachment:trac_11606_add_only_new_constraints_to_lp_using_sets.patch]
This patch depends on #11588.",enhancement,needs_info,major,sage-4.8,linear programming,,sd32,ncohen,,john_perry,,N/A,,,,,