Exporting and importing time series data values within a simulation

Use this forum to post Vensim related questions.
Post Reply
niallmnaidoo
Junior Member
Posts: 2
Joined: Wed May 09, 2018 3:56 pm
Vensim version: PLE

Exporting and importing time series data values within a simulation

Post by niallmnaidoo »

Hi,
I am not a Vensim User at this time but would like to first confirm that model simulations are able to write calculated values for particular variables to a storage space (table or ODBC) and then in the course of the simulation call-up those previous values by referencing time and variable identifiers to be used in the ongoing calculations of the simulations. So basically you can write the calculated value or input value of a variable to a database or table and then in a later time period in the simulation recall those values to other specified variables to be used in new calculations within the same simulation? It appears that the DATA informational keywords would be best suited to this requirement?
Thanks in advance
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: Exporting and importing time series data values within a simulation

Post by Administrator »

You can certainly get calculations from previous time steps within Vensim during a simulation. Vensim has it's own internal storage.

There is no need to write to a database and then retrieve them. But you can write the calculations out to a database when the simulation is finished using Vensim DSS (via ODBC).

Why do you need to write to a database and retrive the same value during a simulation?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3808
Joined: Wed May 24, 2006 4:54 am

Re: Exporting and importing time series data values within a simulation

Post by tomfid »

Writing to/from files or databases within a single simulation would cause a dramatic slowdown, though you could do it in an external function if you needed something that wasn't possible using Vensim's builtin functions. Far better to do it in memory if possible though.
Post Reply