Page 1 of 1

Problem with reading Data variable

Posted: Mon Jan 06, 2014 9:15 am
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

Re: Problem with reading Data variable

Posted: Mon Jan 06, 2014 12:38 pm
by Administrator
Do you want to link directly to the data in Excel or go through the import process?

Re: Problem with reading Data variable

Posted: Mon Jan 06, 2014 12:53 pm
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.

Re: Problem with reading Data variable

Posted: Tue Jan 07, 2014 10:26 am
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

Re: Problem with reading Data variable

Posted: Tue Jan 07, 2014 11:53 am
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.

Re: Problem with reading Data variable

Posted: Wed Jan 08, 2014 8:56 am
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

Re: Problem with reading Data variable

Posted: Fri Jan 10, 2014 11:47 pm
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.