handj() is a Fortran subroutine that minimizes a given
function using the algorithm
& Jeeves (1961).
handj_ext is a programme that uses
with an externally computed function.
Have available a programme or script that can also be invoked from the command line and that evaluates the function to be minimized. The programme or script should read the function parameters from a single-line text file in the directory from which it is run, and should write the resulting function value into a single-line text file in the same directory.
handj_ext from the command line. You will be asked
octave -q handj_ext.m > /dev/null, where the
-qjust tells Octave not to print the usual messages when it starts)
You will then be asked for
handj()subroutine will then be called repeatedly until Δ < δ. Note that a single Δ applies to all of the function's parameters, so the function should be defined so that all of its parameters are of the same order of magnitude.
During the search, some progress messages will be displayed. Pressing any key on the keyboard will terminate the search.
Once the search has finished, the final parameter values will be printed.
A log will be dumped to the file
handj_ext.log. For each
function evaluation the log will contain the sequence number;
the function value; a code that indicates what mode the algorithm was
in when it called the function; and the values of the parameters.
The mode codes are the following:
The programme will then offer to graphically display the evolution of two of the parameters. You will be asked which parameters to plot. Type control-Z if you do not want a graphical display.