Skip to content

Documentation on SHGO inequality constraints appears contradictory #11428

@jjramsey

Description

@jjramsey

In the argument list for shgo (https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.shgo.html) describing constraints, it reads as follows:

g(x) <= 0 applied as g : R^n -> R^m

This would imply that g(x) should be non-positive in order to satisfy the constraint. However, the cattle-feed example in the documentation indicates that the functions for the inequality constraints should be non-negative, with g1(x) and g2(x) explicitly indicated as being >= 0.

To make things even more confusing, in the same cattle-feed example, the values of g1(x) and g2(x) at the minimizing value res.x are shown to be negative, implying that the constraints aren't satisfied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues related to the SciPy documentation. Also check https://github.com/scipy/scipy.orgscipy.optimize

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions