quad.optim {RGeostats}R Documentation

Quadratic optimization under equality and/or inequality constraints

Description

This function performs the optimization of the quadratic form 1/2*x'Hx+g under linear equality constraints Ae*x = be and inequality constraints Ai*x >= bi.

Usage

quad.optim(h, g, ae = NA, be = NA, ai = NA, bi = NA, xinit = NA)

Arguments

h

A symetric positive definite numerical matrix

g

A numerical vector.

ae

A numerical matrix.

be

A numerical vector.

ai

A numerical matrix.

bi

A numerical vector.

xinit

An initial guess. It has to satisfied all the constraints.

Details

If dimension of h is n x n, g has to be a n vector, ae (resp. ai) has to be a ne x n (resp ni x n) matrix where ne (resp. ni) is the number of equality (resp. inequality) constraints, be (resp. bi) has to be a vector of size ne (resp. ni). xinit is of size n.

Value

The value of the solution.

Examples


H=matrix(rnorm(9),3)
H=H
g = rnorm(3)
quad.optim(H,g,t(c(1,1,1)),0,t(c(1,0,0)),0)

[Package RGeostats version 11.1.1 Index]