翼型の重みの最適値を取得するためにxfoilを実行するために実行されている次のコードがあります。
def four_dim_opt(x0, weight_limits, cl, file_path, xfoil_path):
opt_out = fmin_l_bfgs_b(run_xfoil_wcl, x0, args = (cl, file_path, xfoil_path), bounds = weight_limits, epsilon = 0.01, approx_grad = True)
return opt_out
ここで、run_xfoil_wclは、抗力値(float)の係数を返す関数です。
私が取得し続けるエラーは次のとおりです。
Traceback (most recent call last):
File "<pyshell#13>", line 1, in <module>
four_dim_opt(x0, weight_limits, 1.2, file_path, xfoil_path)
File "H:/appliedlab4 - Copy(2).py", line 157, in four_dim_opt
opt_out = fmin_l_bfgs_b(run_xfoil_wcl, x0, args = (cl, file_path, xfoil_path), bounds = weight_limits, epsilon = 0.01, approx_grad = True)
File "C:\Python27\lib\site-packages\scipy\optimize\lbfgsb.py", line 166, in fmin_l_bfgs_b
l,u = bounds[i]
ValueError: too many values to unpack