Hi,
I would like to read time series data into Vensim. The model is subscripted and the text file I have does not contain all the variables. What is the best approach for getting the data in?
As a simple example I have this data in a text file:
Time 0 1 2 3 4 5
Variable [AAA] 1 3 5 2 5
Variable [CCC] 3 5 2 5 6
(ie Variable [BBB] is missing)
I tried converting this data into a VDF file and then using the GET VDF DATA, but Vensim wants Variable [BBB] to be present. Similarly, the GET DIRECT DATA function wants all the variables to be there as you only specify the first row with the data in it. The other complication is that I do not know what order the variables will be in and what will be missing. This is why I has hoping the GET VDF DATA function would work as Vensim queries the .vdf file.
Any help very appreciated!
Time series data into Vensim
Re: Time series data into Vensim
When there are missing elements, the best option is to use the Model>Import Data options to create a vdf from your text file.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Super Administrator
- Posts: 4589
- Joined: Wed Mar 05, 2003 3:10 am
Re: Time series data into Vensim
Really? It should import without issues and then just say data missing if you try and run.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Time series data into Vensim
Hi,
Thanks for the super quick responses!
I have attached my test model. I get the following errors when I run it:
ERROR: The variable Variable[aaa] not found in file TestDataImportForum.vdfx.
ERROR: Unable to get data values for Data Variable[aaa].
ERROR: Failed to make live links to data - aborting simulation.
ERROR: Unable to correctly load in exogenous values - aborting.
I am prepared to be told that there is something really simple that I am getting wrong!
Thanks for the super quick responses!
I have attached my test model. I get the following errors when I run it:
ERROR: The variable Variable[aaa] not found in file TestDataImportForum.vdfx.
ERROR: Unable to get data values for Data Variable[aaa].
ERROR: Failed to make live links to data - aborting simulation.
ERROR: Unable to correctly load in exogenous values - aborting.
I am prepared to be told that there is something really simple that I am getting wrong!
- Attachments
-
- TestModel.zip
- (1.61 KiB) Downloaded 172 times
Re: Time series data into Vensim
Short answer is, don't use GET VDF. Make the variable an ordinary data variable (not a data equation) and specify the data file on the Advanced tab of the simulation control dialog.
https://www.vensim.com/documentation/usr16.htm
https://www.vensim.com/documentation/ref_data.htm
https://www.vensim.com/documentation/usr16.htm
https://www.vensim.com/documentation/ref_data.htm
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Time series data into Vensim
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Time series data into Vensim
Wonderful - Thanks!