Q_constraint function

Quadratic Constraints

Quadratic Constraints

Quadratic constraints are typically of the form [REMOVE_ME]12xQix+Lixrhsi[REMOVEME2] \frac{1}{2}x^{\top}Q_ix + L_i x \leq rhs_i [REMOVE_ME_2]

where QiQ_i is the iith of mm (sparse) matrices (all of dimension n×nn \times n) giving the coefficients of the quadratic part of the equation. The m×nm \times n (sparse) matrix LL

holds the coefficients of the linear part of the equation and LiL_i

refers to the iith row. The right hand side of the constraints is represented by the vector rhsrhs.

Q_constraint(Q, L, dir, rhs, names = NULL) ## S3 method for class 'Q_constraint' variable.names(object, ...) as.Q_constraint(x) is.Q_constraint(x) ## S3 method for class 'Q_constraint' length(x) ## S3 method for class 'Q_constraint' terms(x, ...)

Arguments

  • Q: a list of (sparse) matrices representing the quadratic part of each constraint.

  • L: a numeric vector of length nn (a single constraint) or a matrix of dimension m×nm \times n, where nn is the number of objective variables and mm is the number of constraints. Matrices can be of class "simple_triplet_matrix" to allow a sparse representation 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.

  • names: an optional character vector giving the names of xx

    (row/column names of QQ, column names of AA).

  • object: an R object.

  • ...: further arguments passed to or from other methods (currently ignored).

  • x: an R object.

Returns

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

Description

Quadratic constraints are typically of the form

12xQix+Lixrhsi \frac{1}{2}x^{\top}Q_ix + L_i x \leq rhs_i

where QiQ_i is the iith of mm (sparse) matrices (all of dimension n×nn \times n) giving the coefficients of the quadratic part of the equation. The m×nm \times n (sparse) matrix LL

holds the coefficients of the linear part of the equation and LiL_i

refers to the iith row. The right hand side of the constraints is represented by the vector rhsrhs.

Author(s)

Stefan Theussl

  • Maintainer: Stefan Theussl
  • License: GPL-3
  • Last published: 2023-04-20