how to make simulation faster when using subsystems

2 ビュー (過去 30 日間)
Yaman
Yaman 2024 年 6 月 10 日
回答済み: Naga 2024 年 6 月 17 日
Hello everyone,
I am working on a simulation project and need some help. When I use a single subsystem, the simulation runs quickly. However, when I duplicate the subsystem, the simulation slows down drastically, with 1 second of simulation time taking over 30 minutes in real time.
I have already implemented all the solver suggestions, but the issue persists.
Any suggestions on how to speed up the simulation would be greatly appreciated!

回答 (1 件)

Naga
Naga 2024 年 6 月 17 日
Hello Yaman,
It's counter-intuitive that duplicating a subsystem would slow down the simulation so much. Here are a few suggestions to troubleshoot the issue:
  1. Even though subsystems are designed for modularity, it's possible there might be redundant calculations happening when you duplicate them. Ensure the subsystems aren't performing the same tasks unnecessarily.
  2. Is there a possibility that interactions between the duplicated subsystems are causing the slowdown? Analyze how the subsystems interact and see if there's a way to optimize communication between them.
  3. Try isolating a single duplicated subsystem and running the simulation. This might help pinpoint if the slowdown is caused by the subsystem itself or its interaction with the rest of the model.
Hope this helps!

カテゴリ

Help Center および File ExchangeSubsystems についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by