Analysis for feature development questions from Greg Mueller, TVA (3-14-2017 e-mail).
Document Home: R:\doc\sct\2017\TvaEst\TvaSctEstMarch2017Rev1.docx
Phil Weinstein, CADSWES, 3-16-2017 (a) -- see subsequent analysis and proposal.
Greg's questions are in two different aspects of the SCT:
See these relevant feature documents:
![]() |
|
The accompanying screenshot illustrates applying a custom color to a selected set of slot/timestep cells within an SCT. (Note that the "Add Note..." operation, also discussed below, is enabled only for application to a single slot/timestep cell).
There are two, well encapsulated, major data structures used to represent the named color pairs (foreground/background), assignment of those color pairs to particular timesteps on particular series slots, and also value threshold information for the "conditional formatting" cell color function.
One instance of each is currently saved in the SCT, so after applying custom colors to SCT cells, the SCT must be saved for the assigned cell colors to be viewable in a different RiverWare session (possibly by a different user). Unfortunately, re-saving the SCT is not readily doable in an important TVA RiverWare application.
These two data structured could easily be deployed within a model file instead of in an SCT. (This possibility was anticipated when these classes were originally developed). That's the first possible approach to address this problem outlined below.
Here are two possible approaches to address the requirement of having SCT custom cell colors applied in one RiverWare session available to different users in other sessions.
![]() |
|
The relevant classes are fully encapsulated, including XML serialization. It would be a very simple matter for the RiverWare model to maintain an instance of each of these which any given SCT could optionally refer to in place of its own instances of these things.
A natural place to present a "Store Custom Colors in Model File" checkbox would be in the "Flags" tab of the SCT Configuration dialog, under the "Custom Slot/Timestep Cell Colors..." button. (See the RiverWare 7.0 version of this dialog tab to the right).
Some implementation considerations:
(1A) Estimates (Phil, 3-16-2017):
![]() |
|
Prior to the introduction of SCT Custom Slot/Timestep Cell Colors in RiverWare 6.8, RiverWare supported "Series Notes" which can be placed on individual timesteps within particular series slots. The data for those notes and "associations" of notes to particular slot/timesteps is stored in the RiverWare model file. This is currently available, but the current user interface is quite cumbersome, involving the need to view and operate two rather complex-looking dialogs just to apply a note to a slot/timestep.
We could develop an option for Series Note display to override a cell's background color instead of showing an icon-ornament in the slot/timestep cell.
The following screenshots demonstrate the complexity of the current implementation. Applying a new note to a timestep involves four operations using four different dialogs, as demonstrated in the following image. Applying an already-defined Series Note to a new slot/timestep cell requires only steps (3) and (4).
Once a Series Note has been placed on a slot/timestep cell, it can more easily be copied to other cells, as illustrated below.
The design of more natural way of placing a set of pre-configured Series Notes (or Series Note Background Colors) could be implemented, analogous to the treatment of SCT custom slot/timestep cell colors.
Some implementation considerations:
(1B) Estimates (Phil, 3-16-2017):
NOTE: A more detailed analysis and estimate for enhancing Series Notes in provided
in the subsequent iteration of this document ("notes3.html" 3-18-2017):
|
Here is the Greg Mueller's [TVA] description of a desirable feature. [3-14-2017 e-mail]:
A simple way of roughly accomplishing the requested behavior would be to create a 2nd SCT from the slots on the selected (possibly dragged) SCT Sheet tab. Any solution which uses that as the basis of the implementation (possibly hiding certain features of the "copy") would be quite easy to develop.
Alternatively, if the torn off sheet is an entirely different sort of thing (not itself actually an SCT, as such), we would need to understand more precisely what we are trying to accomplish.
Note that, currently -- in RiverWare 7.0 -- it is very easy to copy the contents of an SCT Sheet tab from one SCT to another, using context menu operations on the "Edit Series Slot List" tab. This is illustrated below. Also, the SCT's File menu has a "New SCT ..." operation; this creates a new SCT, opened to the Edit Series Slot Tab. So the behavior we are considering here is currently doable (in RiverWare 7.0), with basically ten (10) clicks. This at least demonstrates that the pieces to accomplish a higher level operation to support this feature are already in place. In any case, this does provide a way of recombining several separate SCTs into a single SCT. We could also provide higher level operations for that work flow, i.e. copying or moving sheets directly using context menu or drag operations directly on SCT Sheet tabs.
Estimates (Phil, 3-16-2017):
See illustration below.
Original Slot Text Annotations (Series Notes) Documentation
SCT Custom Slot/Timestep Cell Colors Documentation
Sample UserFlagSet and SlotUserFlagMap in SCT Config serialization
User Flag XML in Flex/Bison-parsed SCT grammar. [RiverWare 7.0]
Related Images(http://cadswes2.colorado.edu/~philw/2017/SCT/CustCellColors/). USER_FLAG_SET XML-UFLAG-SET-BEG
<UserFlagSet>
<UserFlagDef bgEna="1" fgEna="1" fgColor="#000000" label="E-Mergen-C" bgColor="#ff8074"/>
<UserFlagDef bgEna="1" fgEna="0" fgColor="#000000" label="Potato" bgColor="#aaaa7f"/>
</UserFlagSet>
XML-UFLAG-SET-END SLOT_USER_FLAG_MAP XML-UFLAG-MAP-BEG
<SlotUserFlagMap slotRecCnt="2">
<UserFlagSlotRecord slotName="Mead.Inflow" cellCnt="2" slotCol="-1" slotRecInx="0">
<UFS-Cell flag="Potato" dt="11-01-1993 00:00:00"/>
<UFS-Cell flag="Potato" dt="12-01-1993 00:00:00"/>
</UserFlagSlotRecord>
<UserFlagSlotRecord slotName="Mead.Outflow" cellCnt="2" slotCol="-1" slotRecInx="1">
<UFS-Cell flag="Potato" dt="11-01-1993 00:00:00"/>
<UFS-Cell flag="Potato" dt="12-01-1993 00:00:00"/>
<ThresholdSpec valType="N" threshInx="0" intervalName="Normal">
<NumValue unitType="Flow" scale="1" unit="acre-feet/month" val="800000"/>
</ThresholdSpec>
<ThresholdSpec valType="N" threshInx="1" intervalName="Oops" flag="E-Mergen-C">
<NumValue unitType="Flow" scale="1" unit="acre-feet/month" val="0"/>
</ThresholdSpec>
</UserFlagSlotRecord>
</SlotUserFlagMap>
XML-UFLAG-MAP-END
--- (end) ---