Analysis: Adding Units to the Series Display Compression Numeric Reference Value / RiverWare 6.3
Phil Weinstein / 4-4-2013; minor revisions 4-5-2013.
Note that the Series Display Compression feature is available for both Open Series Slot Dialogs and Edit Account Dialogs (all implemented with common C++ classes). This feature is not available in the SCT.
The problem statement requests that a scaled unit be associated with the numeric reference value (e.g. "cfs" for "1000 cfs" in the example above). In general, this changes the user interface in the following ways:
Internally, a Scaled Unit needs to be associated with, and saved with (in persistence serializations) the numeric reference value within each Series Slot's and Account's Display Compression Specification record. The internal representation -- both the numeric value and its scaled unit -- would remain intact, in those units, through display unit changes but would be subsequently displayed in -- and used within computations in -- the currently active units of the relevant series. (See the subsequent sections for special considerations involving display unit changes).
![]() |
There are two cases where multiple unit types may be represented within the series display:
In these cases, I recommend that only the compression functions which do not make use of the numeric reference value be provided.
Technical: QComboBox doesn't directly support disabled items (as do QMenus). So, the unavailable functions would just be hidden from the QComboBox's list.
Alternative: Compression functions using the numeric reference value would still be provided, but would apply to only the unit type with which the reference value was defined. The reference value editor dialog would present a combo box with all of the represented units (possibly of different unit types). The user would pick the unit (and, by implication, the unit type) to be used for the numeric reference value. In the series data, columns not matching the unit type would not be considered in the compression computation.
A related issue is series displays having multiple units with a single common unit type. In this case, I recommend arbitrarily using the first represented unit. The alternative of allowing the user to choose between different represented units could also be considered in this case, but is not likely to be relevant very often. (For example, it would probably be strange for a multiple-column AggSeries Slot having several Flow-value columns to use a different Flow units for those columns).
Changes of the active display unit between irregular and regular time units will be a problem for the presentation of the numeric reference value -- but, by the way, will not be a problem for use of that value in the compression computations which are always done in the context of series timesteps. That is, changes between units (e.g. Flow units) of these types:
What should be done with the display of "1000 cfs" reference value when the slot's display units are changed from "cfs" to "100 acre-feet/month"?
I propose the following:
Series Display Compression has been provided in the Edit Account Dialog (see image below). However, I suspect that it may not be useful in real Accounting models. Perhaps this should be confirmed by an engineer, but I don't think I've seen a circumstance where "Repeated Value" compression has an effect. For the compression functions using the numeric reference value, it's unlikely that any particular value would have meaning for all of the series of an Account.
Associating a scaled unit with the numeric reference value would require additional complexity for the support of Alternate Units -- which are relevant only within the Edit Account Dialog and not in the Open Slot Dialog (generally speaking). The sort of alternate solutions mentioned above for addressing multiple-unit-types could be brought to bear also to the handling Alternate Units. The possible convention of simply ignoring differently-unit-typed series columns in the compression computation potentially makes this feature in the Edit Account Dialog more useful than it is now. However, we could consider just removing the Series Display Compression feature from the Edit Account Dialog.
--- (end) ---