Analysis: Adding Units to the Series Display Compression Numeric Reference Value / RiverWare 6.3
Phil Weinstein / 4-4-2013; minor revisions 4-5-2013.

From "Unit Scheme Remaining Work" [David, 4-3-2013]:

[2.11] Slot Compression: For certain compression modes, you can specify a value. I.e. Show values > 1000. The value is in whatever slot units are shown. It does not change when you change the unit scheme or activate a different scheme. That is, the 1000 remains even though you have changed the units. It does not automatically update, you must uncompress, then re-compress to refresh the computation. This should be improved to retain the units and convert when scheme changes.

   

Analysis

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:

  1. The compression functions will be displayed with units, e.g. "Show Values >= 1000 cfs".
  2. In general (see below), this numeric reference value is displayed using the currently active units for the series, dynamically updated when the unit scheme changes.
  3. The value editor popup dialog will indicate the units to the right of the numeric entry field. The units are the currently active units for the series.

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).

   

Recommendation for Multiple Unit Types

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).

Recommendation for Unit Scheme / Unit Changes: Irregular Units

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:

  1. In these cases, the reference value is displayed in the filter using the original units (i.e. with which the reference value was last edited). So, in the given example, the compression function options (QComboBox) would still display "1000 cfs" even though the display units have changed to "100 acre-feet/month".
     
  2. In these cases, where the units of the reference value differ from the units of the current series, the reference value popup editor (see image on first page) would present these controls:
       ... the OK button would be enabled only if the user entered a new value (using the new units). Otherwise, only the Cancel button would be enabled.

  3.  

Recommended Simplification:
    Remove Series Display Compression from the Edit Account Dialog

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) ---