Model builder for diagnosis and simulation of hybrid dynamic systems: Application to railway rolling stock. (January 2021)