Table Slot and GUI Design for ...
RiverWare 5.3 Reservoir Enhancement: Time Varying Elevation Volume and Elevation Area Methods
Phil Weinstein -- 3-17-2010

See also Preliminary Notes (March 2010)

Proposed Enhancements to Table Slot

(1) Add Boolean Property to Table Slot: "Has Header Column" (tentative name)

This property causes the first column of the table to be treated specially in several ways.

  1. It prevents the first column from being deleted. This internal constraint is redundant with certain typical Table Slot configurations, for example Table Slots not supporting expandable blocks (i.e. a block size of -1).
  2. It excludes the first column from all "column block" operations. For example, a Table Slot with a block size of two (2) might have, for example, one or three or five columns.
  3. If the Table Slot has a "Numeric Dimension" Column Map, the first element of the column map is unused. The Table Slot will just use the normal non-column-map behavior for the first column, with a text-based label. I'm recommending that we ignore the Column Map's first element rather than apply a 1-element offset. The latter risks "one-off" coding errors which might be hard to even know about.

It is sufficient for this property to be "static" -- set only in C++ code on the relevant engineering objects -- not dynamically settable by the user. The property does not need to be supported on Data Object Table Slots. As such, it doesn't have to be included in the SimObj serialization. Note that we do not currently support a "Numeric Dimension" Column Map on Data Object Table Slots.

Note: If the name "Header Column" is not desirable (e.g. because this leads to referring to the "Header Column Header" -- possibly in the GUI -- maybe a little goofy?) -- we could consider these other names (some of which also have "overloading" problems):

(2) Support Date-Time Values in Numeric Dimensions (as Numeric Columns for Table Slots).

This will require special GUI support for editing Column Map values -- accessible from "Set Column Value" in an Open Table Slot dialog for a Table Slot having a column map. (See the image on this page: the "Single Value Editor" support dialog on the right for normal numeric values). If a new dialog is devised to support editing the Date/Times for ALL of the relevant columns (i.e. excluding the "Header Column"), controls for auxiliary display properties (such as the following item) could be shown in that dialog.

Unfortunately, the display-configuration encoding for these values (which makes special use of the DATETIME unit-type's user units) doesn't include an option to show only the Date (and not also the Time) of an absolute time. Note that, in this application, the Date/Time values will be required to be on timestep boundaries, but that is likely too precise in this case. Note that Date/Time values support "partial" dates, e.g. "March" of no particular year -- that's not useful for this requirement. So ...

(3) Add a Display Property to Numeric Dimension for Date/Time values.

The current need is only to limit the Date/Time value to a Date, but we might want to do something a bit more general. This property needs to be serialized (with RiverWare model files or Object export files) ONLY IF we provide a GUI control to modify it, as mentioned in the previous item.

(4) Support a Plot Function which creates a Plot with one Curve for each Non-Header Column (plotted with respect to the header column).

See this mockup. This is achievable now by manually adding the subsequent Table Slot columns as additional Table Slot "curves" to the Plot -- all having Column 0 for the "x" axis. This could be done automatically when a Table Slot having a "Header Column" is plotted.

(5) Lookup Function for column index, based in a Date_Time value.

Note that a NumericDimension "Column Map" is already supported on TableSlots, and since Date/Time values can be compared numerically, it will not be difficult to create the required function based on a Date_Time instance. See the "Variable Lag Coefficients" Table Slot on Reaches.

---