Define variable as data type

Use this forum to post Vensim related questions.
Post Reply
Lukas
Junior Member
Posts: 8
Joined: Fri Jul 16, 2010 8:02 am

Define variable as data type

Post 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
tomfid
Administrator
Posts: 4000
Joined: Wed May 24, 2006 4:54 am

Post 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
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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).
Lukas
Junior Member
Posts: 8
Joined: Fri Jul 16, 2010 8:02 am

Post by Lukas »

Bob, Tom,

Thanks for your useful replies!

kind regards,
Lukas
Lukas
Junior Member
Posts: 8
Joined: Fri Jul 16, 2010 8:02 am

Post by Lukas »

Bob,

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

kind regards,
Lukas
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
Post Reply