Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

How can I determine now long my simulation takes?

+3 votes
I want to be able to compare the duration of multiple simulations.
asked Feb 8 by Plexim Support Team (87 points)

1 Answer

+4 votes
Best answer

To determine the actual (wall clock) time taken for a simulation run to complete in PLECS Standalone, only a few lines of code are required in a Simulation Script. The resulting value can then be viewed in the PLECS Console window. This could be useful, for example, when determining how different simulation setups or changes to a model affect simulation speed.

The required code for this is as follows:


To run the scripted simulation demonstration in the attached PLECS Standalone example model, select “Simulation scripts…” from the Simulation menu and run the script. The Octave console can be accessed by selecting “Show Console” from the Window menu.

Note that the same time calculation commands apply for PLECS Blockset in Simulink and can be executed in a MATLAB script:

sim(‘model_name’, Parameters)
answered Feb 8 by Plexim Support Team (87 points)