Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Constrained least-squares solver #1044

Open
Labels
ideaProposition of an idea and opening an issue to discuss it
@loiseaujc

Description

Motivation

Many problems in science and engineering can be formulated as a constrained least-squares problem

$$ \begin{aligned} \mathrm{minimize} & \quad | \mathbf{Ax} - \mathbf{b} |^2 \\ \mathrm{subject~to} & \quad \mathbf{Cx} = \mathbf{d}. \end{aligned} $$

This is the case for instance for simple linear optimal control without any bound constraints on the actuation or output signals.

stdlib already provides the unconstrained lstsq solver based on gelsd. LAPACK however also exposes the gglse routines solving precisely the constrained version.

Prior Art

As far as I know, neither Python nor Julia provide an equality constrained least-squares solver out of the box. There are certainly some dedicated packages for that task but the implementations ain't part of numpy/scipy (Python) or LinearAlgebra (Julia).

Additional Information

The calling syntax could be something along the lines of:

x = constrained_lstsq(A, b, C, d[, overwrite_matrices, err])

In contrast to gelsd for unconstrained least-squares, the gglse for equality-constrained least-squares does not provide estimates of the condition number nor of the rank of the matrices. A subroutine version might also be exposed for advanced usage.

Ping: @perazz, @jalvesz, @jvdp1

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaProposition of an idea and opening an issue to discuss it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /