Document: R:\doc\optimization\LimitDataChecking-DataSupport.docx
Document: R:\doc\optimization\LimitDataChecking-DataSupport-2014-01-08.pdf
Document: http://cadswes2.colorado.edu/~philw/2013/Opt/LimitTableCheck/Bake1.html
Initial writing: 1-7-2014; Edit: 1-8-2014 (Phil Weinstein, CADSWES)
See also: R:\doc\optimization\OptTableCheckingRangesFRD.fm [Tim Magee, CADSWES, 11-15-2013]
Enhancements were made to RiverWare 6.5 development to support optimization data checking limits for TableSlot columns. This includes:
The current development does not include modifications to the Optimization TableSlot data checking algorithms, i.e. to limit the scope of such checks to user-specified optimization minima and maxima. Also, only a demonstration sample of TableSlot configurations were modified to make use of the new optimization limits. See the next section.
This document contains the following sections:
Optimization Variable (X,Y,Z) / TableSlot Column index associations AND support for optimization checking limits (min/max) can now be configured for each TableSlot column on each Engineering Object. This is done in EngrObj source code.
For development testing and demonstration, nine TableSlots on Reservoir and PowerReservoir were provisionally configured with the new optimization variable / column associations. This is where the new Optimization TableSlot Limits (min/max) are enabled for particular TableSlot columns. (See items with "OPT_LIMITS", below). The TableSlot Columns supporting these limits can have specific Optimization Minimum and Maximum values assigned to them using the TableSlot (Column) configuration dialog or the multiple-slot configuration dialog.
The new TableSlot data members and public methods added to support these configurations are enumerated in a subsequent section.
Reservoir::setupPrototype() ... // Set optimization variable / column index associations |
PowerReservoir::setupPrototype() ... // Set optimization variable / column index associations |
The TableSlot single-column configuration dialog now presents an "Optimization Column Min and Max Values" panel if the column being edited is configured to support optimization checking limits.
The "Configure Existing Slots" dialog now supports two general modes of operation, selected with radio buttons in the lower-left (see image below):
In Optimization mode ...
The new GUS slot filter (RootFilter) -- "Supports Opt Limits" -- is useful for picking slots to be added to this dialog. This will especially be useful for inspecting the Engineering Object TableSlot column configurations (done in EngrObj C++ code).
A new slot RootFilter has been added to match slots (TableSlots) having optimization checking limits enabled on any of their columns (in EngrObj C++ code). This includes TableSlots for which optimization checking limits CAN be set by the user, regardless of whether optimization minimum and maximum values have been set.
Note that new numeric min/max fields were created for this purpose instead of making use of the previously implemented (but marginally-used) min/max TableSlot fields. The existing min/max fields are similar to those on SeriesSlots which represent limits of all of the values in the series. The semantics for the new optimization limit checking fields are different: they don't represent limits of valid values -- they are intended only to constrain value checking operations for optimization.
// Optimization variable/column support bool _optXcolUsesLimits; // Does 'X' column support Optimization min/max? double _xColOptMin; // 'X' column optimization minimum |
... for Optimization Variable (X,Y,Z) / TableSlot Column index associations AND for Optimization Checking Limits (min/max):
// Optimization variable/column support int colIndexForOptX() const { return _colIndexForOptX; } // (-1): n/a void setXcolOptLimits (double min, double max); double xColOptMin() const { return _xColOptMin; } double usrColOptMin (int col, double scale, const QString& unit) const; |
Control File/Exec-based DMIs were enhanced to support the new optimization TableSlot checking limits. This includes support for per-column Scale and Unit records in TableSlot data files. (No provisions were added for control files).
TableSlot (and TableSeriesSlot) DMI data files -- both "all-column" and "single-column" variations -- now support these attribute fields:
scale: <col 0 scale> <col 1 scale> ...
units: <col 0 units> <col 1 units> ...
opt_min: <col 0 opt min> <col 1 opt min> ...
opt_max: <col 0 opt max> <col 1 opt max> ...
EXAMPLE (for a TableSlot on a Level Power Reservoir):
# Table Slot: Apalachia.Regulated Spill Table
# Column: [0] Elevation [1 ft]
# Column: [1] Max Reg Spill [1000 cfs]
scale: 1 1000
units: ft cfs
opt_min: 14580.0524934 NaN
opt_max: 18221.7847769 NaN
In the "single-column" TableSlot DMI data files, of course only one value is provided (for the particular TableSlot column).
With Output DMIs, the new attribute fields above are generated; each TableSlot's column's current display units (via Unit Schemes) are used (for Output). Also comment headers are generated, but only if this legacy environment variable is NOT defined (introduced in 2003 for TVA): OLD_4P2_EXPORT_COMMENT_STYLE_SYM.
Previously, TableSlot DMI functions assumed the use of current display units for all columns -- for both input and output DMIs. (Note that use of "scale" and "units" attributes in TableSlot control file records had, and still have no effect; in any case, their current specification would not accommodate different scale and units for individual TableSlot columns). Various TableSlot DMI functions have been modified to use scale and units provided by per-column vectors of those attributes.
--- (end) ---