importing data

Use this forum to post Vensim related questions.
Post Reply
suwalaw
Junior Member
Posts: 8
Joined: Tue Oct 20, 2020 2:33 pm
Vensim version: DSS

importing data

Post by suwalaw »

Where can I found desription/manual of (model ; import datasets ) DATA IMPORT SETTINGS and how the settings correspond to the EXCEL file configuration, especially with 2-3 indexes.
WS
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: importing data

Post by Administrator »

The help system has lots of info about importing datasets.

If you can upload an example of what you are having trouble with, we can take a look.
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
suwalaw
Junior Member
Posts: 8
Joined: Tue Oct 20, 2020 2:33 pm
Vensim version: DSS

Re: importing data

Post by suwalaw »

Helpis not very helpful, for example doesn't mention that when you import subscripted data, VENSIM does not read the subscripts, but assignes data to the vector or matrix in declred subscripts order.

I have actually problem with importing subscripted data. I'm struggling with it all last two weeks.
The attached xls file has the data, that was impotred to dat.vdfx file with no error:

Writing 8 values for HEATING MODE GENERAL OLD[URBAN,CENTRAL HEATING INDIVIDUAL]
Writing 8 values for HEATING MODE GENERAL OLD[URBAN,DISTRICT HEATING]
Writing 8 values for time base -Time
Loading Dat.vdfx as Dat.vdfx. Origin is ..
DatXLS.xls converted to dataset Dat.vdfx on Wed Nov 4 13:40:41 2020 (not possible to attach)

Dat.vdfx was declared as data set im Model simulation menu, but the result is:

WARNING: No data found for -HEATING MODE DETAIL 0[URBAN,STOVE,RES]- in the exogenous data files.
WARNING: No data found for -HEATING MODE DETAIL 0[URBAN,STOVE,BIOMASS]- in the exogenous data files.
WARNING: No data found for -HEATING MODE DETAIL 0[URBAN,STOVE,HEAT PUMP INDIVIDUAL]- in the exogenous data files.
WARNING: No data found for -HEATING MODE DETAIL 0[URBAN,STOVE,ELECTRICTITY]- in the exogenous data files.
... similar warnings suppressed for additional variables
ERROR: Unable to correctly load in exogenous values - aborting.


I looking for any help or detailed description of importing data, or other possibilities of using such data.
Best regards
WS
Attachments
M02xx.mdl
(1.28 KiB) Downloaded 154 times
Dat.xls
(7.6 KiB) Downloaded 149 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: importing data

Post by Administrator »

Have you clicked on Model->Simulate->Advanced and added the data to the model using the "Data sources" button?
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
suwalaw
Junior Member
Posts: 8
Joined: Tue Oct 20, 2020 2:33 pm
Vensim version: DSS

Re: importing data

Post by suwalaw »

Shure it is marked, see the attached file.
Attachments
screen.png
screen.png (85.05 KiB) Viewed 3577 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: importing data

Post by Administrator »

ok, I cannot see what the problem is here. Vensim is reporting that it cannot find certain data which is correct as it is not in the spreadsheet you are importing.
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
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: importing data

Post by tomfid »

suwalaw wrote: Wed Nov 04, 2020 12:45 pm when you import subscripted data, VENSIM does not read the subscripts, but assignes data to the vector or matrix in declred subscripts order.
The GET XLS and GET DIRECT functions read data in the declared order of subscripts.

Data imported via the menu or command script functions (TAB2VDF, etc.) does read the subscripts. If you have data that is not populated for all elements, this is usually the preferred way to handle it.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: importing data

Post by tomfid »

This seems to work OK for me. The import succeeds and the model runs. I do notice one glitch, which is that the xls file is in Excel 2 format (truly ancient), and the import misses the last column of values. I resaved the file as tab-delimited text and it works fine. Modern XLSX would probably also work fine.

The puzzle here is why you're getting an abort, rather than just warnings about data that really is missing.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: importing data

Post by tomfid »

Anyway, this works:
M02xx.zip
(2.77 KiB) Downloaded 189 times
suwalaw
Junior Member
Posts: 8
Joined: Tue Oct 20, 2020 2:33 pm
Vensim version: DSS

Re: importing data

Post by suwalaw »

Thanks for help.
Your files work, with missing data warnings and without abort.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: importing data

Post by tomfid »

The abort is baffling. If you zip your package with the vdfx and upload it, we can investigate.
suwalaw
Junior Member
Posts: 8
Joined: Tue Oct 20, 2020 2:33 pm
Vensim version: DSS

Re: importing data

Post by suwalaw »

I followed your reccomendations, and now I can manage the data import. Many thanks for the help.
WS
Post Reply