Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

F_constraint

Function Constraints


Description

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

f(x) ≤q 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

R Optimization Infrastructure

v1.0-0
GPL-3
Authors
Kurt Hornik [aut], David Meyer [aut], Florian Schwendinger [aut], Stefan Theussl [aut, cre], Diethelm Wuertz [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.