Page 1 of 1

Define variable as data type

Posted: Fri Jul 23, 2010 10:30 pm
by Lukas
Hello,

I use Vensim PLE (Version 5.9e).
I assign a time serie (txt format) to a variable.

I have created a variable and assigned 'data' as type.
After clicking OK I want to choose the menu Model --> Import dataset ... But I cannot choose that option (it is not highlighted).

When I go back to the window Editing equation of specific variable the field 'type' is empty.

What went wrong?

kind regards,
Lukas

Posted: Sat Jul 24, 2010 3:50 am
by tomfid
Vensim PLE doesn't do data variables - you need at least PLE plus. An alternative that's effective in some cases is to put your data in a lookup variable. Note that when you're editing a lookup with the "as graph" mode, you can import values copied from a spreadsheet or text file.

Tom

Posted: Sat Jul 24, 2010 10:04 pm
by bob@vensim.com
Vensim PLE does support the use of Data variables, but not connections to spreadsheets. The only type of data file that can be imported is a .dat file. Use the menu item Model>from .dat format to import the file. Then you will need to specify the dataset to be use to simulate.

You are correct that after declaring a variable to be type data the next time the equation editor is opened it shows a blank type - thanks for pointing that out we will fix it for the next release.

The easiest way to enter data is to use the Reference Mode tool (Chapter 20 of the USer's Guide).

Posted: Sun Jul 25, 2010 6:22 pm
by Lukas
Bob, Tom,

Thanks for your useful replies!

kind regards,
Lukas

Posted: Sun Jul 25, 2010 6:54 pm
by Lukas
Bob,

How do I convert my .txt file (tab delimited) to a .dat file?

kind regards,
Lukas

Posted: Sun Jul 25, 2010 8:31 pm
by bob@vensim.com
The .dat file format is described in Chapter 9 of the reference manual. You don't actually need to change the file extension, .txt will work fine. But the format has to be the simple .dat format, a tab delimited file will not work.