skip to main content
Optimization
RPL Based Optimization
The RPL-based optimization controller is now the only optimization controller supported in RiverWare. The original (Tcl-based) optimization is no longer supported.
RPL-based optimization is a global solution that solves for the optimal solution across all timesteps. To contrast, Simulation and Rulebased simulation solve each timestep, marching forward in time. In RPL-based optimization, the user creates an optimization policy set, using the RiverWare Policy Language (RPL), that contains constraints and objectives. RiverWare uses this set along with mass balance and other physical constraints and approximations to create an optimization problem. The optimization problem is then solved by the CPLEX solver and the results are sent back to RiverWare. Note, a separate CPLEX license is still required.
A typical optimization model uses the following three steps:
1. Simulation run to determine the consequences of any inputs
1. RPL-based optimization run to solve the optimization problem
1. Rulebased simulation run that incorporates some of the optimal results and removes linearization errors. For example, one option is for the rules to return the optimal reservoir outflows to the workspace.
If you would like additional information on using this controller, contact: riverware-support@colorado.edu
Documentation
Preliminary documents were added for optimization Optimization Overview in Optimization but the documents are still under development. In addition, documentation of the thermal object was added User Methods in Objects and Methods.
Optimization Run Parameters
The Set CPLEX and Goal Parameters was re-implemented and renamed the Set Optimization Solver Parameters. This dialog now provides a more user friendly tree-view of the parameters used in optimization.
RiverWare is shipped with two files, cplex.par and goals.par, which provide overrides for optimization parameter defaults. There was not an effective way for the user to make changes to these values that would take effect for future runs.
Now, when an optimization controller is selected RiverWare first looks for the files cplex.init.par and goals.init.par in the optimization directory (the value of the environment variable RIVERWARE_OPT_DIR or /tmp/opt-<user name> if that variable is not set). If a parameter override file is found there, it is used, otherwise it looks for the installed version of that file.
When the user changes parameter settings in the Optimization Parameters dialog, there is a toggle indicating whether or not they would like to save the changes to a file; if this is selected when changes are accepted by the user, the non-default parameter settings are written to the cplex.init.par and goals.init.par files in the optimization directory. Unless these files are removed or the optimization directory is moved, all subsequent optimization controllers will begin by reading these parameter settings
Revised: 07/03/2024