optimbase.function: Call Cost Function

Description Usage Arguments Value Author(s)

View source: R/optimbase.function.R

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

1
  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 vignette('omptimbase',package='optimbase') for more details).

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)


optimbase documentation built on Jan. 27, 2022, 1:14 a.m.