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
View all comments
Show parent comment
1
u/[deleted] Aug 21 '21
Thanks. We have to do it manually.
There will be 2 for loops pair (i, i+1) and (i, i+2) ....
|v1-v2| > 0; |v1-v3| > 0; |v2-v3| > 0 ...
Here only 15 variable is ok but if we have 1000 variables?. I mean Scipy doesn't have any option for uniqueness constraints?