bounds2lineqSys: Linear Systems of Inequalities

Description Usage Arguments Value Author(s) Examples

View source: R/lineqGPutils.R

Description

Build the linear system of inequalities given specific bounds.

Usage

1
2
3
4
5
6
7
8
bounds2lineqSys(
  d = nrow(A),
  l = 0,
  u = 1,
  A = diag(d),
  lineqSysType = "twosides",
  rmInf = TRUE
)

Arguments

d

the number of linear inequality constraints.

l

the value (or vector) with the lower bound.

u

the value (or vector) with the upper bound.

A

a matrix containing the structure of the linear equations.

lineqSysType

a character string corresponding to the type of the linear system. Options: twosides, oneside.
- twosides : Linear system given by

l ≤ A x ≤ u.

- oneside : Extended linear system given by

M x + g ≥ 0 with M = [A, -A]^T and g = [-l, u]^T.

rmInf

If TRUE, inactive constraints are removed (e.g. -Inf ≤ x ≤ Inf).

Value

A list with the linear system of inequalities: list(A,l,u) (twosides) or list(M,g) (oneside).

Author(s)

A. F. Lopez-Lopera.

Examples

1
2
3
4
5
6
7
n <- 5
A <- diag(n)
l <- rep(0, n)
u <- c(Inf, rep(1, n-1))
bounds2lineqSys(n, l, u, A, lineqSysType = "twosides")
bounds2lineqSys(n, l, u, A, lineqSysType = "oneside", rmInf = FALSE)
bounds2lineqSys(n, l, u, A, lineqSysType = "oneside", rmInf = TRUE)

lineqGPR documentation built on Jan. 11, 2020, 9:23 a.m.