Function (or generally speaking nonlinear) constraints are typically of the form [REMOVE_ME]f(x)≤b[REMOVEME2] where f() is a well-defined R function taking the objective variables x
(typically a numeric vector) as arguments. b is called the right hand side of the constraints.
F_constraint(F, dir, rhs, J =NULL, names =NULL)## S3 method for class 'F_constraint'variable.names(object,...)is.F_constraint(x)as.F_constraint(x,...)## S3 method for class '`NULL`'as.F_constraint(x,...)## S3 method for class 'NO_constraint'as.F_constraint(x,...)## S3 method for class 'constraint'as.F_constraint(x,...)## S3 method for class 'F_constraint'terms(x,...)
Arguments
F: a function or a list of functions of length m. Each function takes n parameters as input and must return a scalar. Thus, n is the number of objective variables and m is the number of constraints.
dir: a character vector with the directions of the constraints. Each element must be one of "<=", ">=" or "==".
rhs: a numeric vector with the right hand side of the constraints.
J: an optional function holding the Jacobian of F.
names: an optional character vector giving the names of x.
object: an R object.
x: object to be tested.
``: further arguments passed to or from other methods (currently ignored).
Returns
an object of class "F_constraint" which inherits from "constraint".
Description
Function (or generally speaking nonlinear) constraints are typically of the form
f(x)≤b
where f() is a well-defined R function taking the objective variables x
(typically a numeric vector) as arguments. b is called the right hand side of the constraints.