Timing Vensim models

Need to time model runs? One way to do it is with Vensim’s log commands, in a cmd script or Venapp:

LOG>CREATE|timing.txt
LOG>MESSAGE|timing.txt|"About to run."
LOG>TIMESTAMP|timing.txt
MENU>RUN|o
LOG>TIMESTAMP|timing.txt
LOG>MESSAGE|timing.txt|"Ran."

These commands were designed for logging user interaction, so they don’t offer millisecond resolution needed for small models. For that, another option is to use the .dll.

Generally, model execution time is close to proportional with equation count x time step count, with exceptions for iterative functions (FIND ZERO) and RK auto integration. You can use the .dll’s vensim_get_varattrib to count equations (expanding subscripts) if it’s helpful for planning to maximize simulation speed.

Leave a Reply

Your email address will not be published. Required fields are marked *

× 1 = 10

This site uses Akismet to reduce spam. Learn how your comment data is processed.