Dear SUAVE team,
I hope you are well. I am currently in the process of electrifying the Embraer E190 AR from the regional jet tutorial, for which I am using the eVTOL and solar UAV tutorials as reference.
I have chosen the 'Battery_Propeller' network in combination with the standard 'Lithium_Ion.py' energy storage option. Unfortunately, my script ('E190_electric_single.py') raises the following error in the 'Battery_Propeller.py' file:
AttributeError: 'Conditions' object has no attribute 'battery_discharge_flag'
I have been tracking the error back to the various mission segments, however, I was not able to discern its origin. Please find attached the full error message:
Traceback (most recent call last):
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Core\Data.py", line 67, in __getattribute__
return dictgetitem(self,k)
KeyError: 'battery_discharge_flag'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Nils Barner/Desktop/PhD Phase/SUAVE Standard (local)/SUAVE-2.5.0/trunk/SUAVE/Embraer E190 Battery Powered/E190_electric_single.py", line 1100, in <module>
main()
File "C:/Users/Nils Barner/Desktop/PhD Phase/SUAVE Standard (local)/SUAVE-2.5.0/trunk/SUAVE/Embraer E190 Battery Powered/E190_electric_single.py", line 78, in main
results = mission.evaluate()
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Mission\Segments\Segment.py", line 180, in evaluate
self.process(self)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Process.py", line 96, in __call__
return self.evaluate(*args,**kwarg)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Process.py", line 67, in evaluate
result = step(*args,**kwarg)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Methods\Missions\Segments\Common\Sub_Segments.py", line 137, in sequential_sub_segments
sub_segment.evaluate()
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Mission\Segments\Segment.py", line 180, in evaluate
self.process(self)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Process.py", line 96, in __call__
return self.evaluate(*args,**kwarg)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Process.py", line 65, in evaluate
result = step.evaluate(*args,**kwarg)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Process.py", line 67, in evaluate
result = step(*args,**kwarg)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Methods\Missions\Segments\converge_root.py", line 56, in converge_root
full_output = 1)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\optimize\minpack.py", line 147, in fsolve
res = _root_hybr(func, x0, args, jac=fprime, **options)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\optimize\minpack.py", line 213, in _root_hybr
shape, dtype = _check_func('fsolve', 'func', func, x0, args, n, (n,))
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\optimize\minpack.py", line 26, in _check_func
res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Methods\Missions\Segments\converge_root.py", line 99, in iterate
segment.process.iterate(segment)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Process.py", line 96, in __call__
return self.evaluate(*args,**kwarg)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Process.py", line 65, in evaluate
result = step.evaluate(*args,**kwarg)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Process.py", line 67, in evaluate
result = step(*args,**kwarg)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Methods\Missions\Segments\Common\Energy.py", line 90, in update_thrust
results = energy_model.evaluate_thrust(segment.state)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Analyses\Energy\Energy.py", line 65, in evaluate_thrust
results = network.evaluate_thrust(state)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Components\Energy\Networks\Network.py", line 133, in evaluate_thrust
results_p = net.evaluate_thrust(state)
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Components\Energy\Networks\Battery_Propeller.py", line 139, in evaluate_thrust
battery.discharge_flag = conditions.propulsion.battery_discharge_flag
File "C:\Users\Nils Barner\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.0-py3.6.egg\SUAVE\Core\Data.py", line 69, in __getattribute__
return objgetattrib(self,k)
AttributeError: 'Conditions' object has no attribute 'battery_discharge_flag'
Many thanks in advance for your time and please let me know if further details would be of any help.
Best wishes,
Nils