Minimization by quadratic approximation and trust regions

Please choose a function:
Rosenbrock's function n=2 (banana valley) x*=(1,1), f*=0
Woods quartic function n=4 x*=(1,1,1,1), f*=0
Beales function n=2 x*=(3,0.5) f*=0
Beales function n=2, scaled by x1->x1/100. Solution (300,0.5), f*=0
modified Rosenbrock function n=2, term 100 replaced by 10000, x*=(1,1), f*=0
Box's exponential fit n=3, x*=(1,10,1) f*=0
Fletchers helical function n=3, x*=(1,1,1) f*=0
Himmelblau's quartic function n=2, 4 minima, 4 saddle points, 1 maximum point, f*=0
Nonlinear least squares n=2, Exponential fit
Generalized Rosenbrock function 2 f*=1, x*=(1,....,1)
n=
n must be in [2,100]
Kowalik-Osborne nonlinear least squares n=4
Bard nonlinear least squares (rational fit) n=3
Brown-Dennis nonlinear least squares n=4
Hanging chain made unconstrained using Fletchers smooth exact penalty function
n=
n must be in [2,100] warning: larger dimension will need excessive time!
A function of your own:

Please type a piece of code for computing the function in the following textarea, following FORTRAN rules. No header must be given here, only the piece of code for computing fx from x.
Important : the variable names are x(j), j=1,...,n, the output must be fx.
You also can set a logical err to .true. and return if the input x does not allow to evaluate fx (for example x(1)=-1 and you need to evaluate log(x(1)).) You can make use of the variable n, the local variables x1,....,x4, (not necessarily equal to x(1) etc) f1,f2,f3,f4,f5,f6,h,sum and a vector z(1),...,z(100) the integers i,j,k (for loops e.g.) and logicals bool1, bool2, bool3.
Also usable are the constants pi, sqrt2=sqrt(2) and e1=exp(1).
You are not allowed to declare new variables yourself. Line formatting is required here, hence remember on the special role of column 1 to 6: blank. If not then : a C in column one for comments, only a nonblank in column 6 = continuation line, a numeric value in column 1 to 5 and blank in column 6 defines a label you can jump to .


an identification text (appears in the plots) no inserted blank,comma
ident=
The number of variables
n = Important: 2 <= n <= 100
and your initial guess xstart(1),...,xstart(n)

Please choose the algorithmic parameters:
The defaults i.e. the values shown below
your own choice: rhobeg: should be a guess for laregest error in xinitial divided by 10.
rhobeg =
rhomin: Terminate, if the trust region radius becomes less than this
i.e. the desired precision in x.
rhomin =
maxfun Bound for the number of function values used. important: maxfun in [1,1000000]
maxfun =
iprint: 1: print only final result, 2: print on any change of the trust region radius the best result so far
3: print if a new function value is computed.
iprint =
npt: Number of new function values to be generated each step: must be chosen in [2n+1,(n+1)(n+2)/2]
npt =

Please specify the initial guess for the predefined cases here:
standard initial value
your own choice of the initial value: xstart(1),...,xstart(n)

Do you want a contour plot of f?
This is done in the (x(i),x(k)) plane over the rectangle [x(i)-xdecr1,x(i)+xincr1]*[x(k)-xdecr2,x(k)+xincr2],
with the other components of x held at their current (optimal) values.
Of course i < > k !
no contour plot
contourplot request
i =
k =
xdecr1 =
xincr1 =
xdecr2 =
xincr2 =

Click on "evaluate", in order to submit your input.

Description of the testcases

Back to the theory page

 Back to the top!

06.06.2016