Computer Science ›› 2026, Vol. 53 ›› Issue (2): 107-116.doi: 10.11896/jsjkx.250200061

• Computer Architecture • Previous Articles     Next Articles

Local Synchronous FMI Co-simulation Method Based on Thread Pool Task Scheduling

XUE Zhaoyang1, QIAN Xiaochao2, LIU Fei1   

  1. 1 School of Software Engineering,South China University of Technology,Guangzhou 515000,China
    2 Shanghai Institute of Mechanical and Electrical Engineering,Shanghai 201109,China
  • Received:2025-02-17 Revised:2025-05-23 Published:2026-02-10
  • About author:XUE Zhaoyang,born in 1999,postgra-duate,is a member of CCF(No.Y8623G).His main research interest is modeling and simulation.
    LIU Fei,born in 1976,Ph.D,professor,Ph.D supervisor,is a member of CCF(No.B9231M).His main research interests include modeling and simulation,and artificial intelligence.
  • Supported by:
    National Natural Science Foundation of China(62273153) and Guangdong Basic and Applied Basic Research Foundation(2024A1515010900).

Abstract: Parallel simulation is a key means to improve simulation performance.However,parallel co-simulation based on FMI faces many challenges,such as coupling between FMU and threads,input/output synchronization,and mutual exclusion of FMI API.In response to these problems,this paper proposes a local synchronous FMI co-simulation method based on thread pool task scheduling.Firstly,the framework of the method is presented,consisting of a simulation scheme,master algorithm,scheduler,and buffer to provide a modular representation of parallel simulation.Then,the master algorithm of FMI parallel co-simulation is described,which divides a simulation task of a FMU into two stages:simulation execution and task scheduling.The scheduler sche-dules the task to execute.And customizes read-write lock is designed to solve the synchronization problem during the simulation.The output is temporarily stored in a buffer to solve the problem of FMI API contention for access.The accuracy of the proposed method is verified through a room temperature difference model and a ship positioning model.Compared with the non-iterative Jacobi method parallel to FMU,significant performance improvement is achieved.

Key words: Parallel simulation, Co-simulation, Functional Mock-up Interface, Functional Mock-up Unit, Master algorithm, Lock-free

CLC Number: 

  • TP391.9
[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.
[1] LI Hao, YE Shuai, SHI Peiteng, SHI Zhijiang. Survey of Combat Parallel Simulation Technology [J]. Computer Science, 2024, 51(11A): 240100127-7.
[2] . Parallel Benchmark for Evaluating Parallel Simulation Engine [J]. Computer Science, 2013, 40(3): 41-45.
[3] ZHANG Li-dong,JIA Lei,ZHU Wen-xing,SHI Xiao-wei. Parallel Traffic Signal Numerical Optimization Algorithm Study [J]. Computer Science, 2012, 39(3): 209-211.
[4] DUAN Xin-ming WU Ji-gang GHANC} Da-kun. Adaptive Fault-tolerant Routing in Torus Networks [J]. Computer Science, 2012, 39(2): 115-117.
[5] XU Chuan-fu , CHE Yong-gang, WANG Zheng-hua. Research on Parallel Performance Simulation of Large Scale Parallel Computer [J]. Computer Science, 2009, 36(9): 7-10.
[6] DUAN Xin-Ming, YANG Yu-Lu (Department of Computer Science, Nankai University, Tianjin 300071). [J]. Computer Science, 2007, 34(11): 29-31.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!