Importing data as .vdf

Use this forum to post Vensim related questions.
Post Reply
megboyar
Senior Member
Posts: 55
Joined: Mon Nov 16, 2009 7:22 am

Importing data as .vdf

Post 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
Attachments
CFC2.mdl
(3.06 KiB) Downloaded 215 times
image1.jpg
image1.jpg (79.26 KiB) Viewed 3878 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Importing data as .vdf

Post 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
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
megboyar
Senior Member
Posts: 55
Joined: Mon Nov 16, 2009 7:22 am

Re: Importing data as .vdf

Post by megboyar »

Thank you!

Everything has come clear now : )

Best wishes,
Sarah
Post Reply