parsim() with fast restart returns different results
6 views (last 30 days)
Show older comments
Abdolkarim Mohammadi
on 15 Sep 2020
Answered: Abdolkarim Mohammadi
on 21 Oct 2021
I am running multiple simulations using parsim() with fast restart to accelerate execution. However, I have noticed that using parsim() with fast restart produces different results compared to sim() and parsim() without fast restart. I have attached a simple model containing only SimEvents blocks and the code for running it. The model has a variable named InterGenerationTime, which is used by the Period field of the Entity Generator block. A SimulationInput object is used to set InterGenerationTime for different experiments. The To Workspace block records the number of entities generated by the block.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/360616/image.png)
After running the code, the following figure is obtained.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/360619/image.jpeg)
The first two lines are just as expected, but the third line (parsim() with fast restart) is not. I assume there is something wrong with my implementation. Any help is appreciated.
3 Comments
Reid Spence
on 15 Sep 2020
I concur with Rahul. If you change the sim() command to use fast restart you also get different behavior. The issue seems to be on the SimEvents side. If this issue is blocking you, please contact MathWorks Technical Support.
Example from my machine:
SimOutSim = sim(SimIn,'UseFastRestart', 'on');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/360913/image.png)
Accepted Answer
More Answers (1)
Allison Rozet
on 18 Sep 2020
Please see the following bug report:
3 Comments
Allison Rozet
on 12 Mar 2021
Hi Abdolkarim,
In that case, you may want to work with MathWorks Technical Support further on this issue.
See Also
Categories
Find more on Discrete-Event Simulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!