Dear All,
I have a number of time series data in a text file that I want to use to drive my model model. My plan had been to import the data and create a vdf file
from which I would use the 'GET VDF DATA' function to get the data. I am forced to import from a text file because Excel cannot be installed on the server I am working on. I am getting errors using the 'GET VDF DATA' function because I have not been successful in introducing a variable name in the text file that can be reference as an argument in the function. Kindly assist. Attached is an example of the file in excel.
Importing time series data from a textfile
Importing time series data from a textfile
- Attachments
-
- TS_data.xlsx
- (37.64 KiB) Downloaded 532 times
Re: Importing time series data from a textfile
GET VDF DATA is for retrieving a value from a Vensim dataset, not a text file. I think you want to use either the GET DIRECT DATA function, or import the dataset from text to VDF. GET VDF DATA is rarely needed.
/*
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: Importing time series data from a textfile
Okay thanks for the reply. I tried that, but the issue I had was with respect to the arguments. The function has the arguments "GET DIRECT DATA( {'filename'} , {'tabname'} , {'time_row_or_col'} , {'first_data_cell'} )". In the text file, how do I reference ,tabname, time row or col, and first data cell? This is easy to do in excel or csv but not text file
Re: Importing time series data from a textfile
Check the sample models in the help system. For ext files, the tab name field is used for the delimiter.
http://vensim.com/documentation/fn_get_direct_data.htm
http://vensim.com/documentation/fn_get_direct_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: Importing time series data from a textfile
You reference the rows and columns with the same notation as if it were an Excel 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
*/
Re: Importing time series data from a textfile
Okay thanks