Closed JustinNeumann closed 2 years ago
The code was missing a parenthesis. I updated the code and ran it locally on Windows. It came up with a different error with this line:
m.Equation(m.sum([y[idx1][idx2] * u for idx2, u in enumerate(ui[idx1])] == z[idx1]))
Traceback (most recent call last):
File "C:\Users\johnh\Desktop\test.py", line 99, in <module>
m.Equation(m.sum([y[idx1][idx2] * u for idx2, u in enumerate(ui[idx1])] == z[idx1]))
File "C:\Users\johnh\Python39\lib\site-packages\gekko\gekko.py", line 1540, in sum
raise TypeError("x must be a python list of GEKKO parameters, variables, or expressions")
TypeError: x must be a python list of GEKKO parameters, variables, or expressions
Is this the error that you received when you try to run the code? There is also an active gekko community on StackOverflow. This question may reach a larger audience if posted there.
Ok, I will try to post on StackOverflow asap. Best, Justin🙋♂️
Thanks for posting on Stack Overflow. We'll take the discussion there.
Dear maintainer,
I have the pleasure to use your library recently, and am facing an issue when scaling up my optimisation model. Here is a minimal example which results in the stated error. You can adjust the number of entities to be processed at the top of the code snippet.
I appreciate the help! Thank you a lot :-)