F_constraint: Function Constraints

View source: R/constraints.R

F_constraintR Documentation

Function Constraints

Description

Function (or generally speaking nonlinear) constraints are typically of the form

f(x) \leq 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.

Usage

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).

Value

an object of class "F_constraint" which inherits from "constraint".

Author(s)

Stefan Theussl


ROI documentation built on April 21, 2023, 1:11 a.m.

Related to F_constraint in ROI...