Open petebachant opened 7 years ago
I haven't encountered the problem myself, but the command np.zeros takes integers as input. The current definition
val=np.zeros((nTurbines-1.)*nTurbines/2.)
sends the float (nTurbines-1.)*nTurbines/2. to np.zeros. Which should be a round number for any integer number nTurbines, but is forced as a float due the latter part of the equation (nTurbines/2.). You can do something like
import math
val=np.zeros(int(math.round((nTurbines-1.)*nTurbines/2.)))
to round it off back to an integer. This is, ofcourse, assuming that this is only a float-integer problem.
I'm getting this error when running
exampleOptimizationAEP.py
: