Skip to content

Use of a constraint beside the bounds for the variables #6

Description

@emmaparker96

Besides the lower and upper bounds for the variables, I also have a constraint, that the sum of the variables must be limited to a certain value.

In scipy I would define it as follows:

x0=[2.5,2.5]
cons = {'type':'eq', 'fun':lambda x0: 5 - sum(x0)}

How can this be realized with the package?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions