Gnats 4210: Problem with regular intervals on periodic slots
Gnats Record (Internal) -- Edit 12-16-2009 (Phil)

Analysis of Periodic Slot / Regular Interval Row Headers (Example: Annual Period, Monthly Interval):

  Screenshots From David's Bug Model Phil's change, proposed for RiverWare 5.2.
Prior Appearance (5.1) Brad's Suggestion
(Mocked up using
Irregular Intervals)
Lookup Method PeriodicSlot0_lookup.gif PeriodicSlot1_lookup.gif PeriodicSlot2_lookup.gif
Interpolate Method PeriodicSlot0_interp.gif PeriodicSlot1_interp.gif PeriodicSlot2_interp.gif

Eleven Periodic Slot Configurations showing Proposed Appearance for RiverWare 5.2 (implemented):

  Old Row Headers
(RiverWare 5.1)
New Row Headers
for Lookup Method
New Row Headers
for Interpolate Method
Page 1 (5 cases) OldLookup01.gif NewLookup01.gif NewInterp01.gif
Page 2 (6 cases) OldLookup02.gif NewLookup02.gif NewInterp02.gif

Other Screenhots

Proposed Change (Checked into RiverWare 5.2):

A change was made to the periodic date/times shown in the row headers for the Open Periodic Slot dialog -- for periodic slots configured with a Regular Interval.

The motivation for this change is to address the "one-off" confusion which results from applying Periodic Slot values to Series Slots.  The problem arises from the difference in the ways period intervals are defined (at the beginning of the time interval) and series timestep times are defined (at the end of the time interval).  One reason period intervals are defined from the beginning is that, without having the a particular absolute date/time in hand, it's impossible to know where the end of the interval is in all cases, e.g. the end of February (28th or 29th), or the last day of  the year (day 365 or day 366).  But, at least for regular intervals using interpolation mode, we are now biting the bullet, and using the series convention for periodic slots -- i.e. assuming a leap year.  AND in some cases of the lookup mode, we are now leaving off the unnecessary precision which distinguishes the beginning from the end, i.e. for a monthly interval, instead of "0:00 January 1" or "24:00 January 31", we can just show "January" (or actually, "Jan") -- which nicely matches up with a monthly series timestep of "24:00 January 31" (the timestep ending at that time).

The rationale for the different row header conventions for these two modes (Lookup and Interpolation) is that:

  1. In Lookup Mode, typically used interval sizes nicely correspond to whole calendar intervals (i.e. a whole month or a whole day) so leaving out a precise date/time particular to the start or end of the interval is unnecessary.  (Unfortunately, this is not possible for other interval sizes -- i.e. of less than one day: 1-hour, 6-hours, or 12-hours -- so, in those cases, the old convention of showing the 0-hour based start-of-interval convention is still used).
  2. In Interpolation Mode, each value in the Periodic Slot corresponds to a precise moment (a particular Date/Time).
Technical: The row-header text formats are now implemented in these four virtual Sim/TimeLine subclass methods:
  1. bool RegTimeLine::getIntervalLookupText (int index, RWCString& text)
  2. bool RegTimeLine::getIntervalInterpText (int index, RWCString& text)
  3. bool IrregTimeLine::getIntervalLookupText (int index, RWCString& text)
  4. bool IrregTimeLine::getIntervalInterpText (int index, RWCString& text)

---