scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersBackRef

The constraint has the general inequality form:

lb <= A.dot(x) <= ub

Here the vector of independent variables x is passed as ndarray of shape (n,) and the matrix A has shape (m, n).

It is possible to use equal bounds to represent an equality constraint or infinite bounds to represent a one-sided constraint.

Parameters

A : {array_like, sparse matrix}, shape (m, n)

Matrix defining the constraint.

lb, ub : array_like

Lower and upper bounds on the constraint. Each array must have the shape (m,) or be a scalar, in the latter case a bound will be the same for all components of the constraint. Use np.inf with an appropriate sign to specify a one-sided constraint. Set components of :None:None:`lb` and :None:None:`ub` equal to represent an equality constraint. Note that you can mix constraints of different types: interval, one-sided or equality, by setting different components of :None:None:`lb` and :None:None:`ub` as necessary.

keep_feasible : array_like of bool, optional

Whether to keep the constraint components feasible throughout iterations. A single value set this property for all components. Default is False. Has no effect for equality constraints.

Linear constraint on the variables.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.optimize._minimize.minimize

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/optimize/_constraints.py#119
type: <class 'type'>
Commit: