WOLFRAM SYSTEM MODELER
Solve a linear equality constrained least squares problem
This information is part of the Modelica Standard Library maintained by the Modelica Association.
x = Matrices.equalityLeastSquares(A,a,B,b);
This function returns the solution x of the linear equality-constrained least squares problem:
min|A*x - a|^2 over x, subject to B*x = b
It is required that the dimensions of A and B fulfill the following relationship:
size(B,1) ≤ size(A,2) ≤ size(A,1) + size(B,1)
Note, the solution is computed with the LAPACK function "dgglse" using the generalized RQ factorization under the assumptions that B has full row rank (= size(B,1)) and the matrix [A;B] has full column rank (= size(A,2)). In this case, the problem has a unique solution.
Description: Minimize |A*x - a|^2
Type: Real[size(A, 1)]
Type: Real[:,size(A, 2)]
Description: subject to B*x=b
Type: Real[size(B, 1)]
Type: Real[size(A, 2)]
Description: solution vector