MIT-LAE / TASOPT.jl

Medium fidelity aircraft-propulsion system design and optimization.
https://mit-lae.github.io/TASOPT.jl/
MIT License
28 stars 15 forks source link

mission() has initeng = 0 #72

Open ngomezve opened 3 months ago

ngomezve commented 3 months ago

Why does initeng = 0 in mission? This tells tfoper to start every Newton iteration from scratch. If it were 1, it would take the result of the previous sizing iteration as the starting point.

ngomezve commented 2 weeks ago

I just did some benchmarking and it looks like changing the above to initeng = 1 can reduce the number of allocations of aircraft of all classes, and speedups in all cases except for hydrogen (unclear why).

Median t (ms) initeng = 0 Median t (ms) initeng = 1 Allocs initeng = 0 Allocs initeng = 1
Default 240.710 178.266 7109530 5155184
Regional 229.980 179.963 7126264 5187507
Wide 282.201 243.141 9132586 7022862
Hydrogen 1205 1253 29245689 26342920