Problem with reading Data variable

Use this forum to post Vensim related questions.
Post Reply
schalkj
Junior Member
Posts: 13
Joined: Thu Jul 28, 2011 11:19 am
Vensim version: PRO

Problem with reading Data variable

Post by schalkj »

Hi,
I use Vensim Pro 6.2, running Windows 7.

My model does not read the data, returns error message: WARNING: No data found for -CO2 level history- in the exogenous data files.
WARNING: No data found for -emissions history- in the exogenous data files. .

I have tried Model Import Dataset from xls file, from CSV file and from tab delimited file. Each time the conversion to .VDF is successfull. Yet when I click on the variable (with the .vdf dataset loaded) it returns empty values. If I try to run the model I get the error above.

Obviously I am doing something wrong, but I can't figure out what. I attach the model and the xls files. I would really appreciate some help.

Regards
Schalk
Attachments
Data variable test.mdl
(1.34 KiB) Downloaded 225 times
emissions history.xlsx
(11.52 KiB) Downloaded 222 times
CO2 level history.xlsx
(9.16 KiB) Downloaded 246 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Problem with reading Data variable

Post by Administrator »

Do you want to link directly to the data in Excel or go through the import process?
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
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Problem with reading Data variable

Post by Administrator »

I've included both in the attached example.

The reason the values were not showing in the imported dataset is that you imported "CO2 level", but the data parameter was called "CO2 level history". Renaming it to "CO2 Level" displays the values correctly.

The model also contains two additional parameters which read the data directly from Excel.

Hope this helps.

Tony.
Attachments
2014-01-06 Thread 5448.zip
(17.86 KiB) Downloaded 219 times
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
schalkj
Junior Member
Posts: 13
Joined: Thu Jul 28, 2011 11:19 am
Vensim version: PRO

Re: Problem with reading Data variable

Post by schalkj »

Hi Tony,
Thanks for the prompt reply - you obviously know how frustrating it can be to find an error in a model :D

I've learned something new - it is the variable in the spreadsheet / CSV / tab delimited file that must have the same name as the variable in the Vensim model, not the filename that must be the same? It would be helpful if the Table to VDF converter allowed one to specify the row / column that contains the data, not only the column containing the variable name. However, I can also see that it is good practice to specify the variable name - ensures that one uses the correct data!

Do I understand it correctly that a .dat file is generated by Vensim, or is there another way of creating a .dat file ("from .dat format")?

Regards
Schalk
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Problem with reading Data variable

Post by Administrator »

You can create a .dat file from Vensim, but I don't think it's a great idea as it's not a format supported by many other apps. CSV or TAB would be a better option.

If you can explain what you are trying to do, we can probably advise a little better.
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
schalkj
Junior Member
Posts: 13
Joined: Thu Jul 28, 2011 11:19 am
Vensim version: PRO

Re: Problem with reading Data variable

Post by schalkj »

Hi Tony,

Thanks a lot, your first solution addressed my problem.

Just as a matter of interest, I am experimenting with Kim Warren's (Strategy Management Dynamics) approach of reflecting historical, feared and preferred (modelled) outcomes in Vensim. For historical I use a data variable, feared = reference mode and preferred = modelled.

As you have gathered, I am still a novice in Vensim, so I really appreciate the help and advice.

Regards
Schalk

Ps. All the experts are right - it helps a lot to build models developed by others. Not only do I learn about modelling, but I find that I learn a lot technically about Vensim as well - mostly by making mistakes and getting help from the forum :D
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Problem with reading Data variable

Post by tomfid »

Absolutely. That's how I learn too - a combination of seeing far by standing on the shoulders of giants, and good judgment = accumulated experience from bad judgment.
Post Reply