constraints: Constraints - Accessor and Mutator Functions

Description Usage Arguments Value Author(s) Examples

View source: R/constraints.R

Description

The constraints of a given optimization problem (OP) can be accessed or mutated via the method 'constraints'.

Usage

1
2
3
4
5
6
constraints(x)

## S3 method for class 'OP'
constraints(x)

constraints(x) <- value

Arguments

x

an object used to select the method.

value

an R object.

Value

the extracted constraints object.

Author(s)

Stefan Theussl

Examples

1
2
3
4
5
6
## minimize: x + 2 y
## subject to: x + y >= 1
## x, y >= 0
x <- OP(1:2)
constraints(x) <- L_constraint(c(1, 1), ">=", 1)
constraints(x)

ROI documentation built on Aug. 29, 2020, 3:01 p.m.

Related to constraints in ROI...