Can I run two or more Simulink test cases in parallel using Parallel Computing Toolbox?
26 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 31 Okt. 2024
Beantwortet: MathWorks Support Team
am 18 Mär. 2025
I have a test runner, which is part of the 'matlab.unittest.testrunner' class. The test suite that is being passed in contains multiple Simulink test cases, which is part of the 'sltest.testcase' class.
Is it possible to run multiple Simulink test cases in parallel using 'parsim' or any other Parallel Computing Toolbox functionality?
Akzeptierte Antwort
MathWorks Support Team
am 31 Okt. 2024
Yes, you are able to run multiple Simulink test cases in parallel using 'parsim'.
'parsim' simulates a model using the inputs specified in the 'SimulationInput' object, in. The 'parsim' function uses an array of 'SimulationInput' objects to run multiple simulations. Therefore, if you call the 'parsim' function with an array of 'SimulationInput' objects, you can run multiple simulations.
You can define your Simulink test cases using 'slstest.testmanager.TestCase', create a 'Simulink.SimulationInput' object for each test case, add all of the 'Simulink.SimulationInput' objects to an array, and then pass in the array to 'parsim' to execute the test cases in parallel.
Below are some documentation links on how to use 'parsim', 'slstest.testmanager.TestCase', and 'Simulink.SimulationInput':
Please note that the 'parsim' function requires the Parallel Computing Toolbox license to run the simulations in parallel.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Run Multiple Simulations finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!