sd.walk() can kill the host process with a native stack overflow (Windows exit 0xC00000FD, SIGSEGV on Linux) with no Python exception raised. I was able to trace the stack overflow to set_ach_speed, which recurses on itself (fastsim-core/src/simdrive/mod.rs:735) with no depth cap, and its only exit is the cyc_met check, a hard pwr_tractive <= pwr_prop_fwd_max with no tolerance. We could add a recursion/iteration cap on the correction (mirroring ach_speed_max_iter), or perhaps revise the criteria for stopping the recursion.
Reproduce:
import fastsim as fs
veh = fs.Vehicle.from_file("vehicles/2016 TOYOTA Corolla 4cyl 2WD.yaml")
veh.set_save_interval(1)
cyc = fs.Cycle.from_file("cycles/<any trip id from manifest>.yaml")
fs.SimDrive(veh, cyc).walk() # process dies natively
set_ach_speed
sd.walk()can kill the host process with a native stack overflow (Windows exit 0xC00000FD, SIGSEGV on Linux) with no Python exception raised. I was able to trace the stack overflow toset_ach_speed, which recurses on itself (fastsim-core/src/simdrive/mod.rs:735) with no depth cap, and its only exit is thecyc_metcheck, a hardpwr_tractive <= pwr_prop_fwd_maxwith no tolerance. We could add a recursion/iteration cap on the correction (mirroringach_speed_max_iter), or perhaps revise the criteria for stopping the recursion.Reproduce:
set_ach_speed