I'm learning to love the time series import and mapping features of Ventity.
I've been able to get Ventity to import a time series if DateTime is fractions of a day (e.g. 0, 0.0417, 0.0833, ...) or whole days (e.g. 1/1/2017, 1/2,2017,...) after checking "Use Calendar Time" in Run Control.
But I haven't figured out how to import hourly data using Calendar Time (e.g. Hourly solar flux throughout a year). Sure, I can hack this in Excel by making DateTime increment from 0 to 365 in steps of 1/24, but that seems to defeat the point of the Calendar Time feature.
Did I miss something?
Import data using Calendar Time and fractional days
Re: Import data using Calendar Time and fractional days
Here's an example that works with calendar time, using the date-time format in Excel.
Unfortunately, there appears to be a bug in the charting, such that hourly plots look wrong, but the underlying data in the results appears to be OK. We'll get that fixed.
Unfortunately, there appears to be a bug in the charting, such that hourly plots look wrong, but the underlying data in the results appears to be OK. We'll get that fixed.
/*
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
*/
Re: Import data using Calendar Time and fractional days
I am in a similar state now, and cannot find the example you mention, Tom.
I need a variable that holds a date, to trigger a pulse flow.
I define a constant "expansion date", which I then would like to define in Entities 1, and eventually in Excel, as we are discussing.
I have Run Control "Use Calendar Time" checked.
When I enter a date value "01/01/2018" I get the error "input string was not in a correct format"
I need a variable that holds a date, to trigger a pulse flow.
I define a constant "expansion date", which I then would like to define in Entities 1, and eventually in Excel, as we are discussing.
I have Run Control "Use Calendar Time" checked.
When I enter a date value "01/01/2018" I get the error "input string was not in a correct format"
Re: Import data using Calendar Time and fractional days
Oops - forgot to attach it, and I don't have it here at the SD conference.
The basic idea was to use a DateTime in Excel initialization data to set the date at which an entity would be added. That looks like 7/18/2017 15:30.
However, you can't put a date in a variable; you need to use time as a number.
If the model is using calendar time, the model.time starts at 0 and thereafter is an offset from initial time, in the time unit of the simulation. So, if the model runs in months, and starts 1/1/2017, 1/1/2018 is time=12.
The basic idea was to use a DateTime in Excel initialization data to set the date at which an entity would be added. That looks like 7/18/2017 15:30.
However, you can't put a date in a variable; you need to use time as a number.
If the model is using calendar time, the model.time starts at 0 and thereafter is an offset from initial time, in the time unit of the simulation. So, if the model runs in months, and starts 1/1/2017, 1/1/2018 is time=12.
/*
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
*/