min.quadratic: Minimize Quadratic with Linear Constraints Minimizes x^T A x...

Description Usage Arguments Details Value Examples

View source: R/QuadraticProgramming.R

Description

Minimize Quadratic with Linear Constraints

Minimizes x^T A x + x^T B under equality constraint E x = F and inequality constraint G x >= H

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'quadratic'
min(
  A,
  B,
  E = NULL,
  F = NULL,
  G = NULL,
  H = NULL,
  tol = sqrt(.Machine$double.eps)
)

Arguments

A

A symmetric matrix describing the quadratic coefficients

B

A vector describeing the linear coefficients

E

A matrix for equality constraint

F

A vector for equality constraint

G

A matrix for inequality constraint

H

A vector for inequality constraint

tol

Tolerance. Number whose absolute value is less than tol is considered 0.

Details

Uses Karush-Kuhn-Tucker method internally.

Value

A list containing: x: the desired x, see main description value: the minimum value of x^T A x + x^T B lambda: (optional) the Lagrangian multipliers for the equality constraints lambda: (optional) the Lagrangian multipliers for the inequality constraints

Examples

1
2
3
4
5
A <- matrix(c(1, 0, 0, 2), nrow = 2, ncol = 2)
B <- c(-4, -4)
G <-matrix(c(-1, 1, -4, -1), nrow = 2, ncol = 2)
H <- c(-3, 0)
result <- min.quadratic(A, B, G = G, H = H)

Chen2357/rrinterp documentation built on Jan. 7, 2022, 1:01 p.m.