Skip to content
Snippets Groups Projects
Commit f24aed7a authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

convert type to int before using as index

parent 2bbb5f4c
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ class AreaOverlappingFactor():
The calculation formula can be found in Eq. (A1) of :
[Ref] Feng J, Shen WZ, Solving the wind farm layout optimization
problem using Random search algorithm, Reneable Energy 78 (2015)
problem using Random search algorithm, Renewable Energy 78 (2015)
182-192
Note that however there are typos in Equation (A1), '2' before alpha
and beta should be 1.
......
......@@ -129,7 +129,7 @@ class WindTurbines():
P = np.array([self.power_funcs[t](ws) for t, ws in zip(type_i, ws_i)])
return CT, P
else:
return self.ct_funcs[t[0]](ws_i), self.power_funcs[t[0]](ws_i)
return self.ct_funcs[int(t[0])](ws_i), self.power_funcs[int(t[0])](ws_i)
def set_gradient_funcs(self, power_grad_funcs, ct_grad_funcs):
def add_grad(f_lst, df_lst):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment