pymoo
pymoo copied to clipboard
Equality constraints not working
Hello, I am trying to add equality constraints.
I do this by adding a H key into out within _evalaute. But whenever I try to run this, I get the exception:
"Exception: ('Problem Error: H can not be set, expected shape (100, 0) but provided (100, 1)', ValueError('cannot reshape array of size 100 into shape (100,0)')"
Any help with this would be much appreciated 😄
The new version has a check if what you set as an output fits the problem description.
Have you defined the problem in such a way that n_eq_constr=1?
(Please note that most algorithms are not that efficient when optimization equality constraints. But I wanted to add this new feature for researchers to work on new methods and also to keep the G problem suite consistent)