计算机科学 ›› 2026, Vol. 53 ›› Issue (2): 107-116.doi: 10.11896/jsjkx.250200061
薛朝阳1, 钱晓超2, 刘飞1
XUE Zhaoyang1, QIAN Xiaochao2, LIU Fei1
摘要: 并行仿真是提高仿真性能的关键技术,然而当前基于FMI(Functional Mock-up Interface)的并行联合仿真存在诸多挑战,如FMU(Functional Mock-up Unit)和执行线程耦合、输入输出同步、FMI API互斥等问题。针对这些问题,提出了一种基于线程池任务调度的局部同步FMI联合仿真方法。首先,给出了该方法的框架,该框架由仿真方案、主算法、调度器和缓冲区组成,以提供并行仿真的模块化表示。然后,重点描述了FMI并行联合仿真主算法,其将单个FMU的单次仿真任务分为仿真执行和任务调度两阶段,由调度器调度执行,并自定义读写锁解决仿真过程中的同步问题;同时,通过将输出暂存到缓冲区,以避免FMI API竞争访问的问题。最后通过一个房间温差模型和一个船舶定位模型验证了所提方法的准确性,与FMU并行的非迭代雅可比方法进行对比,所提方法取得了显著的性能提升。
中图分类号:
| [1]HATLEDAL L I,STYVE A,HOVLAND G,et al.A Language and Platform Independent Co-Simulation Framework Based on the Functional Mock-Up Interface[J].IEEE Access,2019,7:109328-109339. [2]BLOCHWITZ T,OTTER M,ARNOLD M,et al.The FunctionalMockup Interface for Tool independent Exchange of Simulation Models[C]//Proceedings of the 8th International Modelica Conference.Dresden:Linköping University Press,2011:105-114. [3]GALTIER V,VIALLE S,CHERIFA D,et al.FMI-based dis-tributed multi-simulation with DACCOSIM[C]//Proceedings of the Symposium on Theory of Modeling & Simulation:DEVS Integrative M&S Symposium.2015:39-46. [4]ÉVORA GÓMEZ J,HERNÁNDEZ CABRERA J,TAVELLA J P,et al.Daccosim NG:co-simulation made simpler and faster[C]//The 13th International Modelica Conference.2019:785-794. [5]DAD C,TAVELLA J P,VIALLE S.Synthesis and feedback on the distribution and parallelization of FMI-CS-based co-simulations with the DACCOSIM platform[J].Parallel Computing,2021,106:102802. [6]KRAFT J,MEYER T,SCHWEIZER B.Parallel Co-Simulation Approachwith Macro-Step Size and Order Control Algorithm[C]//15th International Conference on Multibody Systems,Nonlinear Dynamics,and Control.2019. [7]POGORELOV D,RODIKOV A,KOVALEV R.Parallel Computations and Co-simulation in Universal Mechanism Software.Part I:Algorithms and Implementation[J].Transport Problems,2019,14(3):163-175. [8]BEN KHALED A,BEN GAID M,PERNET N,et al.Fastmulti-core co-simulation of Cyber-Physical Systems:Application to internal combustion engines[J].Simulation Modelling Practice and Theory,2014,47:79-91. [9]SAIDI S E,PERNET N,SOREL Y.Automatic parallelization of multi-ratefmi-based co-simulation on multi-core[C]//TMS/DEVS 2017-Symposium on Theory of Modeling and Simulation.ACM,2017. [10]SAIDI S E,PERNET N,SOREL Y.A method for parallelscheduling of multi-rate co-simulation on multi-core platforms[J].Oil & Gas Science and Technology-Revued’IFP Energies Nouvelles,2019,74:49. [11]HANSEN S T,GOMES C,KAZEMI Z.Synthesizing Orchestration Algorithms for FMI 3.0[C]//2023 Annual Modeling and Simulation Conference(ANNSIM).2023:184-195. [12]BROMAN D,BROOKS C,GREENBERG L,et al.Determinate composition of FMUs for co-simulation[C]//2013 Proceedings of the International Conference on Embedded Software(EMSOFT).IEEE,2013:1-12. [13]VAN ACKER B,DENIL J,VANGHELUWE H,et al.Generation of anOptimised Master Algorithm for FMI Co-simulation[C]//Proceedings of the Symposium on Theory of Modeling & Simulation:DEVS Integrative M&S Symposium.2015:205-212. [14]CREMONA F,LOHSTROH M,TRIPAKIS S,et al.FIDE:anFMI integrated development environment[C]//Proceedings of the 31st Annual ACM Symposium on Applied Computing.ACM,2016:1759-1766. [15]WU Q,COLE C,SPIRYAGIN M,et al.Parallel co-simulation of heavy-haul train braking dynamics with strong nonlinearities[J].Mechanics Based Design of Structures and Machines,2024,52(5):2623-2638. [16]SHEN Y,LIU C,ZHOU D,et al.A parallel coupling framework for DEM-MBD:Model verification and application DEM-MBD[J].Powder Technology,2024,448:120257. [17]ZHENG L,CUI Y,JIN S,et al.High-Performance Computing-Based Open-Source Power Transmission and Distribution Grid Co-Simulation[J].IEEE Transactions on Power Systems,2024,39(5):6144-6153. [18]STEWART R,RAITH A,SINNEN O.Optimising makespanand energy consumption in task scheduling for parallel system[J].Computers & Operations Research,2023,154:106212. [19]LI M,HUANG L,XU G,et al.A parallel particle swarm optimization framework based on a fork-join thread pool using a work-stealing mechanism[J].Applied Soft Computing,2023,145:110537. [20]FATOUROU P,KOSMAS E,PALPANAS T,et al.FreSh:ALock-Free Data Series Index[C]//2023 42nd International Symposium on Reliable Distributed Systems(SRDS).2023:209-220. [21]MAROTTA R,IANNI M,PELLEGRINI A,et al.A Conflict-Resilient Lock-Free Linearizable Calendar Queue[J].ACM Transactions on Parallel Computing,2024,11(1):1-32. [22]EGUILLON Y,LACABANNE B,TROMEUR -DERVOUT D.F$$_3$$ORNITS:a flexible variable step size non-iterative co-simulation method handling subsystems with hybrid advanced capabilities[J].Engineering with Computers,2022,38(5):4501-4543. [23]PERABO F,PARK D,ZADEH M K,et al.Digital Twin Modelling of Ship Power and Propulsion Systems:Application of the Open Simulation Platform(OSP)[C]//2020 IEEE 29th International Symposium on Industrial Electronics(ISIE).IEEE,2020:1265-1270. [24]LU L,XUE Z,LIU F.Design and Development of an FMI Co-Simulation Tool[C]//2024 3rd International Conference on Artificial Intelligence and Computer Information Technology(AICIT).2024:1-5. [25]SICKLINGER S,BELSKY V,ENGELMANN B,et al.InterfaceJacobian-based Co-Simulation[J].International Journal for Numerical Methods in Engineering,2014,98(6):418-444. |
|
||