RiverWare Scenario Enhancements / Scenario Playbox -- Design 3
Phil Weinstein / CADSWES / Edit: 1-3-2013 (1-4-2013, micro-edits).
Images for detailed design, in progress:
This document proposes the following enhancements to RiverWare Scenarios.
Prior Design Proposals:
With RiverWare 6.2, the "Stakeholder's" (scenario user's) workflow generally consists of these steps:
In Step 5, the user must manually operate the Snapshot Manager to capture the results of a scenario run. And it's up to the user to give the generated snapshot object a name which semantically associates it with the scenario.
We would like to automate this process with the following provisions:
Note that while scenarios are saved in a "scenario" file distinct from the baseline RiverWare model, the scenario output snapshot objects are created within the model "proper" (not the scenario). Also note that the baseline model cannot be resaved -- it can only be "saved as" a distinct non-baseline model. The user may want to export the generated scenario output snapshot objects as distinct files, possibly in the directory containing the scenario file of the corresponding scenario.
The Scenario Playbox is a new dialog intended for stakeholders (scenario users). It facilitates a stakeholder's workflow of creating a new scenario, adjusting the values of up to three (3) predetermined scenario input slots with sliders, running the scenario, and comparing scenario output results.
In the initial implementation, only a single Scenario Playbox instance is provided. But this could be enhanced to support multiple named Scenario Playboxes associated with the baseline model.
The Scenario Playbox configuration is created by the scenario engineer and is saved in the baseline model. This configuration is not editable by the stakeholder. It consists of the following properties:
These settings are made by the scenario engineer in a new "Scenario Playbox Configuration" dialog. This configuration dialog is shown by clicking the "Configure Playbox..." button on the "Baseline" tab.
Note that when a scenario input slot has been included in a playbox configuration, its values are no longer directly editable, e.g. in its Open Slot Dialog or an SCT. (It will be "read-only" in those dialogs). This is necessary because the values of such a scenario input slot are computed with a linear function of its corresponding baseline slot.
The Scenario Playbox is accessible from both the RiverWare Workspace and the Scenario Manager. If a Scenario Playbox has been configured, a "Scenario Playbox..." menu item appears in the Utilities menu, following "Scenario Management..." item. In the Scenario Manager, each Scenario Tab has a "Playbox..." button which brings up the playbox with the corresponding scenario initially selected.
The playbox has two major sections, described below:
This is in addition to the following general functions, made available as menu items (in the dialog's menubar), and in some cases, as icon toolbar buttons (basically the same set of toolbar buttons as in the Scenario Manager Dialog).
The "Create a New Scenario" function will create a new scenario with a new unique name in the form of "Unsaved Scenario#" (e.g. "Unsaved Scenario4") and will set the "Adjust Input Slots for Scenario" combo box (see following) to that new scenario.
Value adjustment sliders are presented for up to three (3) scenario input slots. Such slots from one particular scenario are effected, selected with this combo box:
Up to three panels -- for the each of the adjustable input slots -- are arranged horizontally. Each panel contains the following controls:
The Scale slider bar is exponential. The range is based on the upper value set by the scenario engineer. The lower limit of the range is the reciprocal of the specified upper value. The mid-point is always "1", which results in no difference from the baseline slot values. Note: although the scale slider bar’s positions are interpreted logarithmically, the slider’s tick marks are evenly spaced; this is a limitation of the Qt4 slider widget.
Detail: Numeric computations for the "exponential" scale slider bar are defined on this webpage:
Scale Slider Formulas
http://cadswes2.colorado.edu/~philw/2012/Scenarios/Design/SliderScrollFormula.html
The Offset slider bar is linear, and ranges from the negative value to the positive value of the adjustment limit value set by the scenario engineer. The mid-point is always "0", which results in no difference from the baseline slot values. The Offset values are in the display units for the slot. Note that offsets are applied in user-units -- so, in the case of "irregular time" units such as "acre-feet per month", the adjustment to the underlying standard values (e.g. "cms") is different depending on the month or year in which the timestep occurs.
When a slider bar has "focus" (e.g. after it has been clicked), the slider "thumb" can be stepped by a small amount by pressing the right or left arrow keys (i.e. on the keyboard). Holding down those arrow keys for about one second causes them to repeat, effectively animating the motion of the slider thumb and resulting value.
The three numerically labeled buttons below the slider function both as a slider "value key" and controls to set the slider to the corresponding positions. The middle position represents the "null transform" for each of these functions, 1.0 and 0.0 respectively for "scale" and "offset".
The actual computation of the scenario input slots from the baseline slots -- as a linear function using the scale or offset values -- occurs generally after the slider has stopped moving (for about half a second). Any plots or Open Slot Dialog showing the scenario input slot's values will immediately show the new computed values.
The computed scenario slot values are "clipped" at the configured minimum and maximum values for the baseline slot -- if those have been configured. This is not considered an "error condition". (Note that these minimum and maximum values should not be confused with the adjustment limit values which apply to the coefficients of the linear adjustment transform function. These minimum and maximum values are applied to the results of that function).
The bottom section of the Scenario Playbox is for showing scenario results (outputs), in the form of a plot. It consists of three components:
The slot plot is updated as the selections in the two lists are changed. A curve is shown for each of the selected scenarios' copies of the single selected output scenario slot. A curve for the baseline slot is always shown.
We have now introduced a new type of snapshot object -- whose list of slot copies is different from the Snapshot Manager's slot list template. This isn't really a problem, as the list of slots in each of the snapshot objects is no longer dynamically "synchronized" with that slot list template. Scenario output snapshot objects will appear in the snapshot object list (bottom-right panel) having the names of scenarios which had been run. The user is free to delete scenario output snapshot objects -- they will be recreated the next time the scenario is run.
All new persistent information resides in the RiverWare model file. (Nothing is being added to scenario files). This new information consists of:
--- (end) ---