R/RcppExports.R

# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' KNITRO C++ Wrapper
#' 
#' This function is the standard C++ wrapper for KNITRO. It defines the object 
#' \code{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 \code{UserParam} to pass the original R functions on to the C++
#' callback function. 
#' 
#' @param fcts is an R list of functions that includes the \code{objFun}, \code{objGrad}, \code{c}, and \code{jac}.
#' @param startValues is a vector of start values
#' @param num_equality_constraints is an integer with the number of equality constraints in \code{c}
#' @param num_inequality_constraints is an integer with the number of inequality constraints in \code{c}
#' @param nnzJ is an integer with the number of non-zero objects in the Jacobian
#' @param RjacIndexCons is a vector of length \code{nnzJ}. Each element contains the index of a 
#' particular constraint (i.e. the index of a row in the jacobian).
#' @param RjacIndexVars is a vector of length \code{nnzJ}. Each element contains the index of a 
#' particular variable (i.e. the index of a column in the jacobian).
#' @param ub a vector of upper bounds for each element in x0
#' @param lb a vector lower bounds for each element in x0
#' @param optionsFile the location of the options file 
#' @return A list with the vector that minimizes the objective function, the final function value, and KNITRO's exit status
#' @seealso http://www.artelys.com/tools/knitro_doc/2_userGuide/gettingStarted/startCallableLibrary.html
knitroCpp <- function(fcts, startValues, num_equality_constraints, num_inequality_constraints, nnzJ, RjacIndexCons, RjacIndexVars, ub, lb, optionsFile) {
    .Call('knitroR_knitroCpp', PACKAGE = 'knitroR', fcts, startValues, num_equality_constraints, num_inequality_constraints, nnzJ, RjacIndexCons, RjacIndexVars, ub, lb, optionsFile)
}
jtilly/knitroR documentation built on May 20, 2019, 3:13 a.m.