Import data using Calendar Time and fractional days

A place for Ventity software questions & answers
Post Reply
nachtrieb
Junior Member
Posts: 4
Joined: Mon Oct 28, 2013 2:09 pm
Vensim version: PRO

Import data using Calendar Time and fractional days

Post by nachtrieb » Sun Jul 02, 2017 2:57 pm

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?

tomfid
Administrator
Posts: 2354
Joined: Wed May 24, 2006 4:54 am

Re: Import data using Calendar Time and fractional days

Post by tomfid » Mon Jul 03, 2017 6:40 pm

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.

gsimpso4
Junior Member
Posts: 7
Joined: Thu Mar 09, 2017 9:37 am
Vensim version: Ventity

Re: Import data using Calendar Time and fractional days

Post by gsimpso4 » Tue Jul 18, 2017 11:56 am

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"

tomfid
Administrator
Posts: 2354
Joined: Wed May 24, 2006 4:54 am

Re: Import data using Calendar Time and fractional days

Post by tomfid » Tue Jul 18, 2017 9:20 pm

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.

Post Reply