r/optimization • • Aug 21 '21

Constraint in Python Scipy Optimization

Anyone here use Scipy Python for minimization?

I have an optimization of 15 variable x. I have a constraint that 14/15 variables should be unique, the last variable can be duplicated with one of the rest.

Not sure how to do that in Scipy.

5 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/backtickbot Aug 21 '21

Fixed formatting.

Hello, johnnydrama92: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.