Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nlminb2

Nonlinear programming with nonlinear constraints.


Description

This function was contributed by Diethelm Wuertz.

Usage

nlminb2(
  start,
  objective,
  eqFun = NULL,
  leqFun = NULL,
  lower = -Inf,
  upper = Inf,
  gradient = NULL,
  hessian = NULL,
  control = list()
)

Arguments

start

numeric vector of start values.

objective

the function to be minimized f(x).

eqFun

functions specifying equal constraints of the form h_i(x) = 0. Default: NULL (no equal constraints).

leqFun

functions specifying less equal constraints of the form g_i(x) <= 0. Default: NULL (no less equal constraints).

lower

a numeric representing lower variable bounds. Repeated as needed. Default: -Inf.

upper

a numeric representing upper variable bounds. Repeated as needed. Default: Inf.

gradient

gradient of f(x). Default: NULL (no gradiant information).

hessian

hessian of f(x). Default: NULL (no hessian provided).

control

a list of control parameters. See nlminb() for details. The parameter "scale" is set here in contrast to nlminb() .

Value

list()

Author(s)

Diethelm Wuertz

Examples

## Equal constraint function
eval_g0_eq <- function( x, params = c(1,1,-1)) {
       return( params[1]*x^2 + params[2]*x + params[3] )
   }
eval_f0 <- function( x, ... ) {
       return( 1 )
   }

ROI

R Optimization Infrastructure

v1.0-0
GPL-3
Authors
Kurt Hornik [aut], David Meyer [aut], Florian Schwendinger [aut], Stefan Theussl [aut, cre], Diethelm Wuertz [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.