From kde-core-devel Fri Nov 19 13:01:06 1999 From: Leon Widdershoven Date: Fri, 19 Nov 1999 13:01:06 +0000 To: kde-core-devel Subject: Re: Need help for KSpread Maths X-MARC-Message: https://marc.info/?l=kde-core-devel&m=94301652329983 Don Sanders wrote: [SNIP] > "Hooke-Jeeves is slow, It is "wasteful". It is also robust > as all get-out. I prefer my program to run for 5 minutes > and converge to the minimum 100% of the time, than for it to > run for 30 seconds and converge to the minimum 75% of the time. > But that's just _my opinion_. Yours may differ." > > (I doubt it will take five minutes for normal problems, this was written in > 1994 and assumes the function f to have a vector values domain, the hooke.c > example runs in a fraction of a second here). > Is it in any way possible to predict the time necessary for computations? Because I would say that 5 minutes solving time is not a problem, but in that case a progress bar would be nice. If it is not possible to predict the number of iterations necessary (I don't know if the size of the steps to convergence can be a measure) then there could be at least some signal going out of the routine saying "I already did 5 million steps!" or something like that. Which can be put in the status bar to let the user see its computing. BTW: I do *not* mean to say that I do not agree with your opinion you'd rather wait 5 minutes for a solution that 30 seconds for perhaps nothing. Computation time, in general, is neglegible compared to the time users need to find & type the formula. And nothing is as frustrating as knowing there is a solution but the damned program can't find it:) [SNIP] > > > (Maybe getting a bit offtopic for kde-core?) > > > > Maybe, but at least it's geeky and may be useful for a KDE app ;-) It's also interesting; it shows the broad field of knowledge necessary (and available!) for creating an office suit/desktop environment. > > A quick search in www.microsoft.com for "solver" shows some intriguing > > stuff! > > > > For example, it seems the solver in Office 2000 is modular and > > replaceable (you can replace it with a VB module, just what all numerics > > expert recommend[1] ;-) > > > > Anyway, MS is even kind enough to say what algorithm they use! I may not always like MS (neither did the judge: http://usvms.gpo.gov/findfact.html) but I think it's very good they open up at least this information. > > http://support.microsoft.com/support/kb/articles/Q82/8/90.ASP > > > > > > -------------- > > SUMMARY > > > > Microsoft Excel Solver uses the Generalized Reduced Gradient (GRG2) > > Algorithm for optimizing nonlinear problems. This algorithm was developed by Leon Lasdon, of the > > University of Texas at Austin, and Allan Waren, of Cleveland State University. > > > > Linear and integer problems use the simplex method with bounds on the > > variables and the branch and bound method, implemented by John Watson and > > Dan Fylstra, of Frontline Systems, Inc. > > -------------- > > > > I must confess I had never heard of this algorithm before. > > > > > > [1] I can imagine the screaming: "Why can't I do it in FORTRAN!!!!" Well, the NAG library is very, very good (and expensive, unfortunately). And also available in C:) And well, why can't I do it in fortran? Because I don't speak fortran too well:(