Solver, Minimization, 2 Variables
Solver, Minimization, 2 Variables
(OP)
Hey there,
following problem:
A set of non linear equations, that can be solved by determining two variables.
So far i have some experience using the NEQNF Solver, that minimizes an objective function (or several functions) by varying one variable.
Now i have 7 objective functions (non linear) and i need to vary and determine two variables to solve minimize the functions. Is there an solver that you can suggest me to use for this problem?
I`m using fortrann 77.
Thanks for your help,
ikkebins
following problem:
A set of non linear equations, that can be solved by determining two variables.
So far i have some experience using the NEQNF Solver, that minimizes an objective function (or several functions) by varying one variable.
Now i have 7 objective functions (non linear) and i need to vary and determine two variables to solve minimize the functions. Is there an solver that you can suggest me to use for this problem?
I`m using fortrann 77.
Thanks for your help,
ikkebins
RE: Solver, Minimization, 2 Variables
RE: Solver, Minimization, 2 Variables
RE: Solver, Minimization, 2 Variables
For solving the nonlinear equation system of this form
f(x) = 0
we can use Newton method:
x1 = x0 - J-1(f, x0) * f(x0)
That means:
1) For the given starting point x0 we need to do:
1.a) Compute the Jacobian matrix J(f, x0) of the vector function f(x) in the point x0
1.b) Solve the linear equation system
J(f, x0) * d = - f(x0)
For this step we can use a linear equation solver from Lapack.
2) finaly compute the next approximation point
x1 = x0 + d
All steps should be repeated until the desired accuracy is reached, it means for given eps -> 0 or delta -> 0 until
||xn - xn-1|| < delta or ||f(xn)|| < eps
IMO it doesn't seem very complicated...
RE: Solver, Minimization, 2 Variables
http://faculty.ksu.edu.sa/Almutaz/Documents/Summer...
I took as example the 3x3 system of nonlinear equations from the document above and tried to solve it with simple Newton method.
For solving of linear equation systems I first used self written GEM method, but then - to make the code shorter for this posting - I took a method from LAPACk:
nlsolve.f95
CODE
Here are the results:
CODE