forum.alglib.net
http://forum.alglib.net/

General Question - Root finding with BFGS
http://forum.alglib.net/viewtopic.php?f=2&t=2150
Page 1 of 1

Author:  Belisarith [ Thu Oct 09, 2014 5:57 pm ]
Post subject:  General Question - Root finding with BFGS

Hello there,

I've got some general questions.
I was searching the internet for an implementation of the broyden algorithm in VBA and found ALGLIB.
My question is: Can I use ALGLIB to find the roots of a set of non-linear equations?
An additional question is:
I am a chemical engineer and have developed an excel tool for a particular simulation problem.
In order to solve the heat and material balance of my problem I introduced a set of tear variables where the error has to be iteratively minimized. At the moment I am doing this by a series of goal seeks which are repeated until the error of each variable is below the speciefied tolerance. However, this is utterly unefficient. Therefore, I would like to use the broyden algorithm. The function would be the set of errors and the variables would be the tear variables. In principle the broyden algorithm should then find the roots, i.e. putting the errors to zero.

Do you think that kind of problem is suitable to track with ALGLIB? Can you point me to some examples?
Sorry, for the "non-mathematic" description of my problem, but I come from a rather practical back-ground, but have lots of experience when coding with VBA.
If you think that its worth a try, I will try to implement ALGLIB to solve my problem. I just wanted to make sure its not complete nonsense, before investing a lot of work.

Best regards,
Bel.

Author:  Sergey.Bochkanov [ Fri Oct 10, 2014 10:55 am ]
Post subject:  Re: General Question - Root finding with BFGS

I recommend you to use Levenberg-Marquardt algorithm provided by ALGLIB, restate your problem as nonlinear minimization problem, i.e. instead of finding roots you will search for minimizer of sum of squared equations. After minimization you will have to check that it found global minimum, i.e. that equations are approximately zero (it is possible to stop in local minimum of merit function).

ALGLIB also has specialized solver NLEQ, but in fact it is same Levenberg-Marquardt, just will lesser set of optimizations and features. Say, with LM solver it is possible to specify box constraints on variables (helps to stabilize algorithm).

As for Broyden algorithm, in fact it's the only benefit is that it avoids costly computation of Jacobian. It has no special properties which make its convergence better than that of LM.

So, my recommendation is to try using ALGLIB's Levenberg-Marquadt optimizer, it is expected to be able to solve your problem.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/