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 and #11607." enhancement closed major sage-5.0 linear programming fixed sd32 ncohen sage-5.0.beta1 John Perry Nathann Cohen N/A