quadmax(A,b [,eq:eqmat] [,gte:gtemat] [,ckbounds:F]), square REAL matrix A, REAL vector b with nrows(b) = nrows(A), REAL matrices eqmat and gtemat with ncols(eqmat) = ncols(gtemat) = nrows(A) + 1, |

quadmax(A,b) finds the x that maximizes x'Ax + b'x; if the problem is unbounded then quadmax() returns an error. A is a p by p REAL matrix and b is a p by 1 REAL vector. quadmax(A,b,eq:eqmat) does the same, except that eqmat is a q by p+1 REAL matrix that specifies q linear constraints on z. eqmat is the partitioned matrix [Q y], where Q is q by p and y is q by 1 and the solution is constrained to satisfy Qx = y. If the constrained problem is unbounded, then quadmax() returns an error. If the constraints cannot be met, then quadmax() returns NULL. quadmax(A,b,gte:gtemat) does the same except that gtemat is a g by p+1 REAL matrix specifying linear inequality constraints on the solution. gtemat is the partitioned matrix [G z], where G is g by p and z is g by 1 and the solution is constrained to satisfy Gx >= z elementwise. If the constrained problem is unbounded, then quadmax() returns an error. If constraints cannot be met, then quadmax() returns NULL. You can use both eq:eqmat and gte:gtemat to specify both equality and inequality constraints. For example, in a three variable mixture problem you might have the equality constraint that the sum of the x's is 1 and each element of x is at least .05. Then you can use quadmax(A,b,eq:eqmat,gte:gtemat) [ 1 0 0 .05 ] where eqmat = [1 1 1 1] and gtemat = [ 0 1 0 .05 ] [ 0 0 1 .05 ] quadmax(A,b [,eq:eqmat] [,gte:gtemat], ckbounds:F) does the same but there is no test for the solution being unbounded. This can substantially decrease the computational time when you know the problem is bounded. This is the case, for example, in a problem where the range of the x's is totally bounded by inequality constraints, or in a problem where x'Ax is known to have a unique maximum (A has all negative eigenvalues). However, ckbounds:F should not be used when you do not know there is a bounded solution. The algorithm used by quadmax() can be described as intelligent brute force and will probably be overwhelmed by too many constraints. When you are sure the problem has a bounded solution, be sure to use keyword phrase ckbounds:F.

Gary Oehlert 2003-01-15