Replies: 1 comment 2 replies
-
It says that you got the dimensions wrong. It looks like you have a population size of 40 with one constraint, so make sure you set |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When my problem was a list I had no problem definig g1 as:
g0= (x[1] + 1) + 1*np.sin(x[0]) + 1*np.cos(x[1]) + 1*np.cos(x[0]) + 1*np.cos(6*np.sqrt(x[1]**2 + x[0]**2)) + 1*np.sin(1*np.sqrt(x[1]**2 + x[0]**2))
g1=-g0
So since my individual is now a list of list I thorugh of:
but then I get the error:
Exception: ('Problem Error: G can not be set, expected shape (40, 1) but provided (40, 1, 38)', ValueError('cannot reshape array of size 1520 into shape (40,1)'))
my individual in this case was of len 38
Beta Was this translation helpful? Give feedback.
All reactions