Feature Analysis: LBAO 1.4 SCT Tasks, RiverWare 7.2, July 2017
Phil Weinstein, David Neumann, Edie Zagona, CADSWES, edit 7-26-2017 (a).
Document home: R:\doc\sct\2017\LBAO-1p4-SCT-FeatureAnalysis.docx

This document proposes specific new RiverWare SCT features for these four requested capabilities:

  1. Time scrolling the model and SCT to a Symbolic DateTime: (a) when the model opens, and (b) as a script action.
  2. Support full editing of the new Text Series Slots.
  3. Easier way to apply an entered value to a time range on a Series Slot, with Interpolation option.
  4. Operations to set SCT slot labels to the slots' name or slot column name.

See also the Development Estimates section at the end of this document.

Time scrolling the model and SCT to a Symbolic DateTime: (a) when the model opens, and (b) as a script action.

Setting the RiverWare "Global Time Scroll" DateTime scrolls all "time navigation" DateTime Spinners in open dialogs to that DateTime. The Global Time Scroll is also applied to such dialogs (e.g. Open Object dialogs, and SCTs) when they are first opened. We propose the following two new features to set the RiverWare session's Global Time Scroll DateTime:

  1. Option in the Initial Workspace Appearance dialog to set the Global Time Scroll to a specified Symbolic DateTime. (This value persists in the model file).
  2. New RiverWare Script Action to set the Global Time Scroll to a specified Symbolic DateTime.

Note that a Symbolic DateTime specification can be the name of a Global RPL Function (a RPL Function in a Global RPL Set). And such a Global RPL Function can refer to a DateTime-unit Scalar Slot (which itself could be a Scalar Slot with RPL Expression, possibly involving a Symbolic DateTime). Note also that, in the contexts of the features proposed below, "Current Timestep" in a Symbolic DateTime expression refers to the timestep containing the current "wall clock" time.

RiverWare 7.1 contains two uses of an advanced Symbolic DateTime editor presenting a drop down menu with sixteen (16) syntax templates, and selectors for existing Global RPL Functions and constant DateTime values (a conventional timestep DateTime spinner popup dialog). The two features outlined below would make use of this advanced editor. The current uses are:

  1. The Plot Axis Configuration Dialog's time axis widgets for "Time Scaling" settings.
  2. Script Dashboard widgets for Set Slot Value actions for DateTime-unit slots. (pictured below in 1B).

(1A) Option in the Initial Workspace Appearance dialog to set the Global Time Scroll to a specified Symbolic DateTime.

    

The currently supported (RiverWare 7.1) Initial Workspace Appearance dialog is shown to the right. To this dialog we could add an optional Symbolic DateTime specification, persistent in the model file. When loading a model file containing this specification, it is evaluated and applied to the Global Time Scroll.

If this Symbolic DateTime is defined, its value will be added to the "Global Time Scroll" menu in time navigation DateTime Spinners (but only if its value is distinct from the other menu items). That menu currently has only two timestep value items, as pictured here:

      

(1B) New RiverWare Script Action to set the Global Time Scroll to a specified Symbolic DateTime.

A new "Global Time Scroll" Script Action type will be provided. This is similar to the Set Slot Value script actions for DateTime-unit slots (also mentioned above). The following is an example of such an action, shown in the Script Dashboard.

(2) Support full editing of the new Text Series Slots

Text Series Slots were introduced in the recent RiverWare 7.1 release. The SCT's support for this new slot type (internally, actually a mostly hidden unit type) lacks these two capabilities:

  1. Editing of Text Series Slot timestep values and flags.
  2. Column width operations taking into account the display width of text values.

This development will complete those features.

Technical: Even when a single selected cell is edited by the user, a "list" of selected slot/timestep cells is processed using the "visitor pattern" by visitor classes which correspond to particular slot/timestep-value modification operations. Examples of these visitors include these classes defined in the SctDialog class: ValueSetter, ValueAdjuster, FlagSetter, NoteSetter, etc. For editing operations on Text Series Slots, either the ValueSetter visitor could be augmented with a string (text) value, or a new "TextValueSetter" visitor could be defined.

(3) Easier way to apply an entered value to a time range on a Series Slot, with Interpolation option

Added to the SCT's series data table's context menu (right-click on a slot/timestep cell) will be a "Set Values over Time Range..." menu item. This shows the following dialog. This context-menu item will be enabled only when exactly one cell is selected (which would always be the case unless the user holds down the SHIFT key when right-clicking in a cell).

Of course, given a fixed "First Timestep", the "Last Timestep" and "Timestep Count" inputs are mutually dependent; editing one causes the computation of the other. The step size of the "Last Timestep" timestep spinner matches that of the SCT from which this dialog was shown; that's typically the run controller's timestep size, but it doesn't have to be. As these inputs are changed, the slot/timestep cell selection in the SCT's series data table -- and the computed "Selection Statistics" (along the bottom of the SCT) -- are dynamically updated. The numeric value entered by the user is in the current display units of the selected series slot.

The three buttons presented here all dismiss the dialog ...

  1. Set Values ... sets the full specified time range to the specified value.
  2. Interpolate To ... sets the final timestep to the specified value, and interpolates all of the values in between.
    (This is enabled only if the initial value was non-NaN).
  3. Cancel ... dismisses the dialog, with just the original cell selected.

(4) Operations to set SCT slot labels to the slots' name or slot column name

Added to the SCT's Edit Series Slot List (see the following image) will be the following four operations. These will be applied to the selected slot items.

In this example, the slot labels happen to be Slot Column Names on an AggSeries Slot (named "FR").

Development Estimates

Task Est
Hours
Description
1A 16.0 Initial Workspace Appearance Settings: Optional Global Time Scroll
1B 8.0 New Script Action: Global Time Scroll
2A 16.0 Text Series Slots: Editing
2B 6.0 Text Series Slots: Column Width Operations
3 16.0 "Set Values over Time Range..." dialog and operation
4 5.0 Operations to set SCT slot labels to slots' names / column names
  67.0 Total [Hours] - Phil (7-25-2017).

--- (end) ---