Hi there,
I am trying to import Excel file into vensim- My data is hourly electricity consumption in a year. when I import the values it sorts the data out in hours - Meaning all the 00:00s together followed by 01:00s, 02:00s and so on till 23:00- But it messes my calculation as I try to simulate the changes through the day (hourly)
Please see the attached file - Vensim sort the data out as all the 0s first then 1s and so on can I make changes to that?
How can I have my Hourly Data (For a year) following day after day in a Vensim ? showing the (00:00 to 23:00)1st Jan 2011followed by (00:00 to 23:00) 2nd Jan 2011 and so on for a year.
Best regards,
Bahar
Importing Data from Excel (24 hours in a year)
-
- Junior Member
- Posts: 3
- Joined: Wed Feb 14, 2018 4:20 pm
- Vensim version: PRO
Importing Data from Excel (24 hours in a year)
- Attachments
-
- Excel Data.docx
- (31.25 KiB) Downloaded 171 times
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Importing Data from Excel (24 hours in a year)
My guess is it's the conversion between Excel date/time and integer not working correctly.
Can you upload the spreadsheet? It's impossible to help when we've only got screenshots. And are you importing using GET_XLS_LOOKUPS or actually importing the sheet?
Can you upload the spreadsheet? It's impossible to help when we've only got screenshots. And are you importing using GET_XLS_LOOKUPS or actually importing the sheet?
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Importing Data from Excel (24 hours in a year)
You might also want to look at the decimal values of your time entries, they are almost certainly all less than zero. You'll need to convert these into 1, 2 etc to use them properly.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Junior Member
- Posts: 3
- Joined: Wed Feb 14, 2018 4:20 pm
- Vensim version: PRO
Re: Importing Data from Excel (24 hours in a year)
Hi,
Thanks for the respond. Please find the files attached. Well I am still not clear what should I do. Sorry I am new to vensim and this is my 1st model.
Thanks,
Bahar
Thanks for the respond. Please find the files attached. Well I am still not clear what should I do. Sorry I am new to vensim and this is my 1st model.
Thanks,
Bahar
- Attachments
-
- Solar Radiation- Sample.xlsx
- (11.76 KiB) Downloaded 165 times
-
- Wind Speed Table.xlsx
- (22.3 KiB) Downloaded 166 times
-
- Consumption.xlsx
- (21.99 KiB) Downloaded 165 times
-
- Junior Member
- Posts: 3
- Joined: Wed Feb 14, 2018 4:20 pm
- Vensim version: PRO
Re: Importing Data from Excel (24 hours in a year)
HI again,
I am actually Import the data from lookup -in the equation.
Regards,
Bahareh
I am actually Import the data from lookup -in the equation.
Regards,
Bahareh
Re: Importing Data from Excel (24 hours in a year)
You can't directly import a 2-dimensional table like your solar radiation table, except as an array of constants.
Some options:
1. Import the table as an array with GET XLS CONSTANTS, and then use rows of it with VECTOR LOOKUP
2. Using copy-paste, create a separate lookup table each for Jan, Feb, Mar ... You can either make each one a separate named variable, or use an array dimension, as in:
MonthOfYear : Jan, Feb, ...
Insolation[Jan] (0,0),(0,0), ...
Insolation[Feb] (0,0),(0,0), ...
3. Reorganize the table so that there's a single time index from start to finish.
Normally, I would choose option 3 for time series data. However, I think 1 or 2 is the more natural choice here.
Some options:
1. Import the table as an array with GET XLS CONSTANTS, and then use rows of it with VECTOR LOOKUP
2. Using copy-paste, create a separate lookup table each for Jan, Feb, Mar ... You can either make each one a separate named variable, or use an array dimension, as in:
MonthOfYear : Jan, Feb, ...
Insolation[Jan] (0,0),(0,0), ...
Insolation[Feb] (0,0),(0,0), ...
3. Reorganize the table so that there's a single time index from start to finish.
Normally, I would choose option 3 for time series data. However, I think 1 or 2 is the more natural choice here.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/