You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 9, 2019. It is now read-only.
I'm getting this error when running exampleOptimizationAEP.py:
python exampleOptimizationAEP.py 10
/home/pete/anaconda3/envs/py27/lib/python2.7/site-packages/florisse/OptimizationGroups.py:110: DeprecationWarning: fd_options is deprecated. Use deriv_options instead.
self.fd_options['force_fd'] = force_fd
/home/pete/anaconda3/envs/py27/lib/python2.7/site-packages/openmdao/util/options.py:292: UserWarning: Also, the 'force_fd' option has been removed. To force finite difference now, set the 'type' option to 'fd'.
warnings.warn(msg)
/home/pete/anaconda3/envs/py27/lib/python2.7/site-packages/florisse/OptimizationGroups.py:111: DeprecationWarning: fd_options is deprecated. Use deriv_options instead.
self.fd_options['form'] = 'forward'
Traceback (most recent call last):
File "exampleOptimizationAEP.py", line 90, in <module>
minSpacing=minSpacing, differentiable=True, use_rotor_components=False))
File "/home/pete/anaconda3/envs/py27/lib/python2.7/site-packages/florisse/OptimizationGroups.py", line 121, in __init__
self.add('spacing_comp', SpacingComp(nTurbines=nTurbines), promotes=['*'])
File "/home/pete/anaconda3/envs/py27/lib/python2.7/site-packages/florisse/GeneralWindFarmComponents.py", line 345, in __init__
self.add_output('wtSeparationSquared', val=np.zeros((nTurbines-1.)*nTurbines/2.),
TypeError: 'float' object cannot be interpreted as an index
The text was updated successfully, but these errors were encountered:
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
:The text was updated successfully, but these errors were encountered: