Optimization
CPLEX Licensing
As described in the special attention notes, The optimization solver IBM ILOG CPLEX is now bundled with RiverWare. To access the solver, your RiverWare license must specifically allow you access to the solver library.
CPLEX File Type
Optimization problems are now written in CPLEX's SAV binary format.
Diagnostics
Many improvements were made to optimization diagnostics. Previously, diagnostics were either on or off for optimization, with no filtering. Now there are meaningful categories and better messages, particularly for variable replacement and approximation. Print statements within Optimization goals are now supported. See
Optimization Diagnostics in Debugging and Analysis for more information.
Run Sequence Checks
When you initiate a run from either the Run Control dialog or the SCT, RiverWare now identifies situations in which you may have mistakenly omitted a run in the typical optimization run sequence (Simulation e Optimization e Rulebased Simulation). If an anomaly is noticed, a dialog will ask you if you want to continue. There are currently two specific scenarios that will be caught:
• A Rulebased simulation run followed by an Optimization run.
• A Simulation run followed by a Rulebased Simulation run (when there is an optimization policy set loaded).
Pool Elevation Approximation
In RiverWare optimization, pool elevation is approximated by storage. A constraint that only references pool elevation on a level reservoir is replaced by an equivalent storage constraint without approximation error. In all other cases pool elevation is replaced with a linear or piecewise-linear function of storage. A linear function is used when a constraint is of the form “Pool Elevation ± x = y,” “Pool Elevation ± x >= y,” or “Maximize Pool Elevation ± x” while a piecewise-linear function is used for the other cases, “Pool Elevation ± x <= y,” or “Minimize Pool Elevation ± x.” Linear replacement in general is either by selecting a point tangent to the nonlinear curve, or by choosing two points that form a secant with the curve. Each linear approximation uses one of these approaches.
Previously, RiverWare used the Tangent method for Pool Elevation. The code was changed to now use the Secant method. This change allows users to effectively have the same approximation for any form of a Pool Elevation constraint or objective function by specifying the same two points for Secant and Piecewise in the Pool Elevation LP Param table. All optimization users are likely to see different results as a result of this change from the Tangent approximation to the Secant approximation. To nearly replicate the previous results the Secant approximation points should be set very close to the Tangent point, but the points must be different. However, users may prefer the results obtained with different values of the secant points. Changing the points can improve or degrade approximation error depending on the nature of the solution.
Opt Input Evaporation Method
A new method was added to the Optimization Evaporation Computation category for reservoirs: Opt Input Evaporation. The method is analogous to the Input Evaporation method in simulation. It allows you to input Evaporation Rate and Precipitation Rate for each timestep and the method calculates Evaporation as the product of Evaporation Rate, Average Surface Area and Timestep length (similarly for Precipitation). Evaporation and Precipitation are then added to the mass balance constraint.
The Use Elevation Approximation Points method was added to the Evaporation Linearization Automation category. The method copies the storage values in the Pool Elevation LP Param slot to automatically populate the Surface Area LP Param slot.