knitro: Call the KNITRO C++ interface

Description Usage Arguments Value

Description

This function passes user defined R functions on to the C++ interface

Usage

1
2
3
knitro(objFun, objGrad = NULL, c_equality = NULL, c_inequality = NULL,
  jac = NULL, jacIndexCons = NULL, jacIndexVars = NULL, x0 = NA,
  lb = NULL, ub = NULL, optionsFile = "options.opt")

Arguments

objFun

is a scalar valued R function that returns the objective function

objGrad

is a vector-valued R function with the gradient

c_equality

is a vector-valued R function with equality constraints

c_inequality

is a vector-valued R function with inequality constraints

jac

is a vector with the content of the Jacobian (sparse)

jacIndexCons

refers to each element of jac and contains the number of the constraint it refers to. Indexing is C++ compatible, i.e. the first constraint has index 0

jacIndexVars

refers to each element of jac and contains the number of the variable it refers to. Indexing is C++ compatible, i.e. the first variable has index 0

x0

is a vector with starting values

lb

is a vector of lower bounds

ub

is a vector of upper bounds

optionsFile

is the path and filename of the options file. If it does not exist, the function will create it

Value

a list with the final estimates, the function value, and KNITRO's exit status


jtilly/knitroR documentation built on May 20, 2019, 3:13 a.m.