skip to main content
Optimization
• The Inline Power object has been enhanced. The enhancements have been motivated by the desire to model Ocoee2 at TVA as an Inline Power object. The main enhancements are to add a bypass slot and to allow optimization.
• The Constraint Editor has been enhanced to allow the user to close a goal or group by double-clicking on a constraint row under a goal or a group. In goal view, the user can double-click on the empty left-most column (open/close) or the fourth (goal-type) column to close the goal. In group view, the user must double-click on the left-most column (open/close) to close the group.
• The calculation of cumulative value of storage has been enhanced in two ways. First, flows in reaches that have not yet reached a reservoir by a given timestep are added to the reservoir storage to create a new slot, Anticipated Storage. The linearization of cumulative value is now done as a function of anticipated storage instead of storage. The second enhancement is to calculate the initial anticipated storage and the cumulative value of that anticipated storage. The suggested use of this initial value is to subtract it from the objective, e.g. " - Thermal Object.Total Cumulative Storage Value [0]". Thus, the new objective becomes Maximize avoided operating cost + NET increase in cumulative storage value. An attempt was made to include anticipated storage in the simulation calculations as well. This proved very difficult because of the interactions with object dispatching. This effort was abandoned, but the differences between optimization and simulation are very small. Still, the inclusion of these terms in optimization had a noticeable effect on flows during testing. In particular, flows at the end of the run were comparable to flows during the rest of the run, as desired.
• The automatic generation of a BWL point representing the initial conditions has been deactivated when the method generating "reducing" constraints is turned on; this point was interfering with the reducing constraints. The optimization now recognizes when lambda variables are implicitly fixed at zero, freezes appropriate variables and constraints, and passes the information to the OptAnalyst.
• The approximation error in spill constraints for level power reservoirs has been reduced by extrapolating spill tables in terms of storage rather than pool elevation.
• This release contains a large improvement in numerical stability. One fairly reliable measure of numerical stability is the condition number of the optimal basis. During a goal program there are a series of optimal bases and the condition numbers generally, if not monotonically, increase as optimization progresses. Prior to this work the condition number were roughly 1e+10 for one of the recent models with a long run time on "No Spill" constraints. After this work, the condition numbers are approximately 1e+6. While ILOG, the makers of CPLEX, suggests that ideally the condition numbers should be less than 10e+5, this improvement is still considerable.
The improvement is due to several factors. The initial effort focused on revising the units used in formulating the problem for CPLEX, the so-called OPT_UNITS. In the literature this kind of work falls under the more general category of scaling matrices. While the importance of scaling is widely accepted and easily demonstrated with small matrices, optimal scaling of matrices remains more of an art form than a science. With that in mind, we followed the general guidance that numbers close to one are preferable, and choosing "natural" units is advisable. The last piece of advice had been previously confirmed when SI units proved numerically on small problems where TVA’s user units worked fine. After trying several sets of units we converged on one set that we were unable to improve upon. Here is a sample of some of those units:
– Length: 10 m
– Area: 1e+7 m2
– Volume: 1e+8 m3
– Flow: 1000 cms
– Power: 1000 MW
– Energy: 1000 MWH
– Value: 1e+5 $
This task took somewhat longer than expected because, the optimization code had hidden assumptions about units in it. Those assumptions caused bugs, and they have been removed.
• Examining the optimization units led to several other enhancements that contributed to the reduction in the condition numbers. First, the precision of floating point numbers given to CPLEX has been made consistent. Second, an existing tolerance on minimum matrix coefficients has been used throughout optimization. Third, the Z variables introduced by RiverWare are now scaled based on the constraints of each priority. This last change required reworking the reporting of the satisfaction levels, and as part of that effort the satisfaction levels are now reported in terms of percentages, e.g. 100 means the constraints are fully satisfied.
The final optimization solution is checked for numerical instability based on 33 measurements. These measurements are compared against anticipated values and large differences are reported. The anticipated values will probably be refined as more models are run. The new tests added about 20 seconds to the runtime on a Sparc Ultra 5.
Revised: 01/05/2024