optimbase.terminate:
Evaluation of Termation Status
Description
This function determines whether the optimization must continue or terminate.
If the verbosetermination
element of the optimization object is
enabled, messages are printed detailing the termination intermediate steps.
The optimbase.terminate
function takes into account the number of
iterations, the number of evaluations of the cost function, the tolerance on x
and the tolerance on f. See the section "Termination" in
vignette('optimbase',package='optimbase')
for more details.
Usage
optimbase.terminate(this = NULL, previousfopt = NULL, currentfopt = NULL, previousxopt = NULL, currentxopt = NULL)
Arguments
this
An optimization object.
previousfopt
The previous value of the objective function.
currentfopt
The current value of the objective function.
previousxopt
The previous value of the parameter estimate matrix.
currentxopt
The current value of the parameter estimate matrix.
Value
Return a list with the following elements:
- this
- The updated optimization object.
- terminate
- TRUE if the algorithm terminates, FALSE if the algorithm
must continue.
- status
- The termination status could be 'maxiter', 'maxfuneval',
'tolf' or 'tolx' if
terminate
is set to TRUE, 'continue'
otherwise.