Sorry for bombing this list with my MIP problems. Here is another thing, again in Sage 5.3:
The following (senseless) test code P = MixedIntegerLinearProgram() x = P.new_variable(binary=True) for i in [0..29]: c = sum(x[j]*(j-i) for j in [0..29]) takes about 1.6 seconds, even though there are only about 900 additions and multiplications involved. Checking with %prun what goes wrong, I find more than 50000 copies, deep copies and such which are responsible for this long running time. Of course MIP variables are different from polynomial variables, but still it might be worth to compare with the analogous and hence equally silly code: R = PolynomialRing(QQ,"x",30) for i in [0..29]: c = sum(R.gen(j)*(j-i) for j in [0..29]) This takes just 0.023 seconds, and no kind of operation is executed more than 930 times. Am I doing something wrong, or is the arithmetic with MIP variables extremely inefficient? I came across this when I found out that the bottleneck in a big problem was not solving the integer linear program, but rather creating it! All the best, Peter Mueller -- You received this message because you are subscribed to the Google Groups "sage-support" group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.