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
@misi9170 noticed an issue that following the update to het definitions serial refine optimization is not working when passed an FI object conditioned for heterogenous conditions.
(floris) pfleming-37929s:examples pfleming$ python test_het_opt.py
Floris wind direction array does not intersect 0.0 and 180.0.
Exploitation of symmetry has been disabled.
[Serial Refine] Processing pass=0, turbine_depth=0 (0.0%)
Traceback (most recent call last):
File "/Users/pfleming/Projects/FLORIS/floris/examples/test_het_opt.py", line 34, in <module>
df_opt = yaw_opt.optimize()
File "/Users/pfleming/Projects/FLORIS/floris/floris/tools/optimization/yaw_optimization/yaw_optimizer_sr.py", line 250, in optimize
farm_powers = self._process_evaluation_grid()
File "/Users/pfleming/Projects/FLORIS/floris/floris/tools/optimization/yaw_optimization/yaw_optimizer_sr.py", line 220, in _process_evaluation_grid
farm_powers = self._calc_powers_with_memory(evaluation_grid)
File "/Users/pfleming/Projects/FLORIS/floris/floris/tools/optimization/yaw_optimization/yaw_optimizer_sr.py", line 144, in _calc_powers_with_memory
farm_powers[~idx, :] = self._calculate_farm_power(
File "/Users/pfleming/Projects/FLORIS/floris/floris/tools/optimization/yaw_optimization/yaw_optimization_base.py", line 370, in _calculate_farm_power
fi_subset.reinitialize(wind_directions=wd_array)
File "/Users/pfleming/Projects/FLORIS/floris/floris/tools/floris_interface.py", line 250, in reinitialize
self.floris = Floris.from_dict(floris_dict)
File "/Users/pfleming/Projects/FLORIS/floris/floris/type_dec.py", line 160, in from_dict
return cls(**kwargs)
File "<attrs generated init floris.simulation.floris.Floris>", line 6, in __init__
File "/Users/pfleming/Projects/FLORIS/floris/floris/type_dec.py", line 160, in from_dict
return cls(**kwargs)
File "<attrs generated init floris.simulation.flow_field.FlowField>", line 30, in __init__
File "/Users/pfleming/Projects/FLORIS/floris/floris/simulation/flow_field.py", line 114, in __attrs_post_init__
self.generate_heterogeneous_wind_map()
File "/Users/pfleming/Projects/FLORIS/floris/floris/simulation/flow_field.py", line 300, in generate_heterogeneous_wind_map
self.het_map = in_region
File "/Users/pfleming/opt/anaconda3/envs/floris/lib/python3.10/site-packages/attr/_make.py", line 1055, in __setattr__
nval = hook(self, a, val)
File "/Users/pfleming/opt/anaconda3/envs/floris/lib/python3.10/site-packages/attr/setters.py", line 23, in wrapped_pipe
rv = setter(instance, attrib, rv)
File "/Users/pfleming/opt/anaconda3/envs/floris/lib/python3.10/site-packages/attr/setters.py", line 52, in validate
v(instance, attrib, new_value)
File "/Users/pfleming/Projects/FLORIS/floris/floris/simulation/flow_field.py", line 107, in het_map_validator
raise ValueError(
ValueError: The het_map's wind direction dimension not equal to number of wind directions.
(floris) pfleming-37929s:examples pfleming$
I think @misi9170 has a solution in mind but wanted to flag the issue here, also flagging @bayc and @rafmudaf if they have a preferred solution
The text was updated successfully, but these errors were encountered:
@misi9170 noticed an issue that following the update to het definitions serial refine optimization is not working when passed an FI object conditioned for heterogenous conditions.
I created this code snippet to show the issue:
Which yields:
I think @misi9170 has a solution in mind but wanted to flag the issue here, also flagging @bayc and @rafmudaf if they have a preferred solution
The text was updated successfully, but these errors were encountered: