Page 1 of 1

Importing data as .vdf

Posted: Thu Aug 30, 2012 9:47 am
by megboyar
Hi,

I'm looking for a bit of clarity on importing data...

(1a) When you save a data variable as a .vdf, does it just save that variable?
(1b) Whereas when you save a simulation run as a .vdf it saves values for all variables in the model?

What's the best way to import a subscripted data variable (without using GET XLS equations...I want to import it and convert to .vdf).
(2a) Specifically, when I import from Excel, in the Table to Vdf Conversion box I see an area for subscripts, but don't know how to use this or where to find a reference explaining it. (See image1 attached) Help? How to format the data and configure the conversion?
(2b) Is my subscript limited to 8 elements? If so, the best way to load a variable subscripted by more than 8 elements?

(3) Finally, I really forgot how do do something: How you you link a data variable into an equation? See attached model.

Many, many thanks!

Best wishes,
Sarah

Re: Importing data as .vdf

Posted: Thu Aug 30, 2012 1:32 pm
by Administrator
(1a) When you save a data variable as a .vdf, does it just save that variable?
Can you explain a little more what you mean here? Are you exporting a dataset to save an individual variable?
(1b) Whereas when you save a simulation run as a .vdf it saves values for all variables in the model?
Correct. Everything is saved (unless you specify a savelist).
What's the best way to import a subscripted data variable (without using GET XLS equations...I want to import it and convert to .vdf).
Use a format similar to
time 0 1 2 3 4
some var[sub1] 0 2 3 5 6
some var[sub2] 0 2 3 5 6
some var[sub3] 0 2 3 5 6

Make sure the file is either tab or comma delimited.
(2a) Specifically, when I import from Excel, in the Table to Vdf Conversion box I see an area for subscripts, but don't know how to use this or where to find a reference explaining it. (See image1 attached) Help? How to format the data and configure the conversion?
Ignore this. It's easier to both read and work with if you just list them as I have above (the documentation for this is at
http://www.vensim.com/documentation/ind ... ?23465.htm)
(2b) Is my subscript limited to 8 elements? If so, the best way to load a variable subscripted by more than 8 elements?
No. You can only have 8 subscript ranges in Vensim, but each range can have many elements.
(3) Finally, I really forgot how do do something: How you you link a data variable into an equation? See attached model.
Use data variables in the same way you use any other variable. Eg
"some data" is a data variable.

some calculation = some data / 2

Re: Importing data as .vdf

Posted: Thu Aug 30, 2012 4:07 pm
by megboyar
Thank you!

Everything has come clear now : )

Best wishes,
Sarah