bug-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-glpk] Re: slow model generation


From: Andrew Makhorin
Subject: [Bug-glpk] Re: slow model generation
Date: Wed, 19 Nov 2003 06:36:37 +0300

>I found glpk model generation to be quite slow.
>It's about 15 times slower compared to the
>ampl interpreter from cplex.  Is that well-known?

Yes, in many cases the MathProg translator is not as efficient as the
original AMPL processor. But try another example:

param n := 10000000;
display sum{i in 1..n} 1 / i;

(It seems that your machine is much more powerful than mine, so try
increasing n, say, up to 100 millions or even one billion until you have
heard the page swapping.)

>Are there obvious work-arounds (to reduce model
>generation time in general, not just this example)?

The MathProg translator has no optimization features (except caching
invariant results) and, moreover, there is no way for optimization,
because the model is evaluated directly over the parsing tree. The
only reason for such design was easiness of implementation. On the
other hand, the design of the AMPL processor is much more complicated.
In particular, it translates the model in a pseudo-code and then does
a lot of optimization.

>Is this related to any known performance bugs that
>will be fixed in the next release?

This is not a bug. Such performance of the MathProg translator was
expected from the very beginning.

Andrew Makhorin






reply via email to

[Prev in Thread] Current Thread [Next in Thread]