optimbase.function {optimbase} | R Documentation |
Call Cost Function
Description
This function calls the cost function defined in the fun
element of
the current object and returns the required results. If an additionnal
argument for the cost function is defined in current object, it is passed to
the function as the last argument. See
vignette('optimbase',package='optimbase')
for more details.
Usage
optimbase.function(this = NULL, x = NULL, index = NULL)
Arguments
this |
An optimization object. |
x |
The point estimate where the cost function should be evaluated, i.e. a column vector. |
index |
An integer between 1 and 6 (see
|
Value
Return a list with the following elements:
- this
The updated optimization object.
- f
The value of the cost function.
- g
The gradient of the cost function.
- c
The nonlinear, positive, inequality constraints.
- gc
The gradient of the nonlinear, positive, inequality constraints.
- index
An integer:
if index > 0, everything went fine,
if index == 0, interrupts the optimization,
if index < 0, one of the function could not be evaluated.
Author(s)
Author of Scilab optimbase module: Michael Baudin (INRIA - Digiteo)
Author of R adaptation: Sebastien Bihorel (sb.pmlab@gmail.com)