knitroCpp: KNITRO C++ Wrapper

Description Usage Arguments Value See Also

Description

This function is the standard C++ wrapper for KNITRO. It defines the object KTR_new and defines a callback function that is used to evaluate the objective function, the constraints, and gradients. The only deviation from the standard C++ wrapper is to use UserParam to pass the original R functions on to the C++ callback function.

Usage

1
2
3
knitroCpp(fcts, startValues, num_equality_constraints,
  num_inequality_constraints, nnzJ, RjacIndexCons, RjacIndexVars, ub, lb,
  optionsFile)

Arguments

fcts

is an R list of functions that includes the objFun, objGrad, c, and jac.

startValues

is a vector of start values

num_equality_constraints

is an integer with the number of equality constraints in c

num_inequality_constraints

is an integer with the number of inequality constraints in c

nnzJ

is an integer with the number of non-zero objects in the Jacobian

RjacIndexCons

is a vector of length nnzJ. Each element contains the index of a particular constraint (i.e. the index of a row in the jacobian).

RjacIndexVars

is a vector of length nnzJ. Each element contains the index of a particular variable (i.e. the index of a column in the jacobian).

ub

a vector of upper bounds for each element in x0

lb

a vector lower bounds for each element in x0

optionsFile

the location of the options file

Value

A list with the vector that minimizes the objective function, the final function value, and KNITRO's exit status

See Also

http://www.artelys.com/tools/knitro_doc/2_userGuide/gettingStarted/startCallableLibrary.html


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