Last Modified: 2026-04-06 08:22:30.61

Software Version

HEC-HMS version 4.14-beta.1 was used to create this tutorial. You will need to use version 4.14-beta.1 or newer to open the project files.

Project Files

Download the initial HEC-HMS project files here: 

NAB_West_Branch_Susquehanna_Initial.zip

Overview

As a result of CWMS funding to add forecast optimization features to HEC-HMS, the stand-alone Optimized Trial simulation type in HEC-HMS has benefitted from several key enhancements which have expanded on its utility and areas of application. Examples of the Optimization Trial enhancements are outlined below. This tutorial and guide along with the associated project files will help you explore the new optimization enhancements and functionality.

Multiple Objective Targets

In previous versions of HEC-HMS, the Optimization Trial was limited to a single objective target which meant that only one location and one time-window could be optimized for at a given time. Starting in version 4.14, HEC-HMS now allows for multiple objective target locations and/or time-windows to be specified and included within a single Optimization Trial. As an example, if you were calibrating a model to a multi-peaked rainfall-runoff event at a location of interest, you could specify several non-overlapping time-windows at the target location that capture the multiple peaks. An optimization routine could then find the singular parameter set that best matches the multiple, observed peaks.

As a second example, if you wanted to find a singular parameter set that best matches observed streamflow data at two separate locations, a singular optimization routine can now be set up that accounts for both observed data in its search. When multiple objective function locations are specified in a singular optimization routine (using "Single Search"), the objective function results at the specified locations are combined via addition and assessed cumulatively.

Multi-Window Optimization  

Sequential Searches

Starting in version 4.14, an Optimization Trial now allows for iterative "Sequential Searches". If this option is selected, a separate optimization routine will be computed for each target location starting upstream and progressing downstream. For example, once an optimized parameter set for the most upstream target location is found, those parameter values will be locked into place and used for the subsequent optimization search routine that occurs at the next target location downstream. If "Single Search" is selected, only one optimization routine will be computed with the objective function value at each target location being added (as described in the above section).

Sequential Searches

Sequential Search

The Sequential Searches option is only available for statistic "goodness-of-fit" objective functions (minimization and maximization). There must be multiple, unique target locations selected.

Sequential Search

The Sequential Searches option is currently available for the Simplex and Differential Evolution search types. Furthermore, Sequential Searches is only allowed for Optimization Trials that contain element-based or subbasin zone-based optimization parameters.

New Optimization Parameter Type - Subbasin Zone

Previous versions of HEC-HMS allowed for several different categories of Optimization Parameters including element-based method parameters, precipitation parameters, and "All-Subbasin" scale-factors. Starting in version 4.14, a new "Subbasin Zone" scale-factor parameter type was created. If the basin model associated with an Optimization Trial has at least one Zone Configuration with Zone regions previously created, the "Subbasin Zone" Optimization Parameter type is accessible. This allows the optimization routine to find a scale-factor parameter set based on all of the subbasins within a specified Zone. 

Optimization Parameter - Subbasin Zone 

New Scale Factor Implementation for Baseflow Paramters

Starting in HEC-HMS version 4.14, scale-factors for baseflow methods have been added as selectable Optimization Parameters when "All-Subbasin" or "Subbasin Zone" is selected. For the recession baseflow method, users may select a recession constant scale-factor and/or a flow-to-peak-ratio scale factor as optimizable parameters. For the linear reservoir baseflow method, users may select a route coefficient scale-factor for each ground water layer being modeled (up to 3). Similarly, users may select a baseflow fraction scale-factor for each ground water layer.

During the optimization routine, if baseflow fraction scale-factors are sampled that lead to fractions greater than one when applied then the scale-factors will be normalized when applied so that they equal one. For example, if 0.8 is sampled as the baseflow fraction scale-factor for layer 1 and 0.4 is sampled as the baseflow fraction scale-factor for layer 2, then they will be normalized to 0.67 and 0.33 respectively.

New Scale Factor Implementation for Snow Parameters

Starting in HEC-HMS version 4.14, scale-factors for the temperature index snow methods have been added as selectable Optimization Parameters when "All-Subbasin" or "Subbasin Zone" is selected. Users may select a base temperature scale-factor and/or a PX temperature scale-factor as optimizable parameters.

Background

The project files in this tutorial and guide model Bald Eagle Creek (a tributary of the West Branch Susquehanna River) and the drainage area above Foster Joseph Sayers Dam (339 square miles). Foster Joseph Sayers Dam is located approximately one mile upstream from Blanchard, PA and 14 miles above the mouth at Lock Haven, Centre County, PA. The dam is an earth fill construction with a maximum height of 100 feet above the streambed and a top length of 6,835 feet. It has a gated outlet tunnel for the regulation of flood flows. The spillway, located in rock in a saddle adjacent to the left abutment, is uncontrolled. The reservoir has a storage capacity of 99,000 acre-feet at spillway crest and a drainage area of 339 square miles. The project was completed in 1969.

Bald Eagle Creek Watershed

Multiple Objective Target Time Windows

  1. Download the "NAB_West_Branch_Susquehanna.zip" file to your C drive and extract it.
  2. Open HEC-HMS version 4.14 or newer.
  3. Click File | Open and navigate to the "NAB_West_Branch_Susquehanna.hms" file within the extracted folder to open the project.
  4. In the Watershed explorer, click the Compute tab and then expand the Optimization Trials node.
  5. Select the Optimization Trial named "A_OptimizeHouserville" which has an optimization routine already setup for the most upstream portion of the watershed.
  6. As seen in the below figure, the Objective tab shows that one objective function has been setup with a location of Houserville and a time-window that encompasses the entire simulation period. A minimization goal has been set using Peak-Weighted RMSE to reach a solution that best matches the observed discharge time-series data at the Houserville location.
    Trial Objective Component Editor
  7. In this case, the only upstream element in the basin model is the "Spring_Crk_ab_Houser" subbasin. Five element-based optimization parameters have been configured for the subbasin, including two optimization parameters related to Deficit and Constant loss method parameters and three related to Recession baseflow method parameters.
    Trial Parameter Component Editor

    Parameter Bounds

    To achieve the best optimization results, it is important to define realistic minimum and maximum bounds for each optimization parameter.

  8. Compute the "A_OptimizeHouserville" optimization trial via the right-click option. The optimization trial should converge on a solution after roughly 130 iterations.
    Right-click Compute
  9. Navigate to the Results tab, expand the Optimization Trials node, and select the "A_OptimizeHouserville" optimization trial. Select the Optimized Parameters table. Also, expand the Houserville folder and select the Observed Data plot. The five optimized parameter values (albeit Parameter 3 was set to "locked" in this example) led to a good visual match between the computed and observed time-series data.
    Optimized Parameter and Observed Data Results
  10. While the optimized parameters led to a good fit of the observed data across the entire simulation window, let's pretend that we were only interested in closely matching the peak of the hydrograph and the recession limb. We can define multiple objective time windows to achieve this outcome
  11. Create a copy of the "A_OptimizeHouserville" optimization trial by navigating to the Compute tab, right-clicking the A_OptimizeHouserville node, and selecting Create copy. Name the copy "Multi-Window Optimization".
    Create Copy
  12. Select and expand the newly created "Multi-Window Optimization" node and navigate to the Objective tab. Let's narrow the start and end dates/times so that they encompass only the time period that the observed peak occurs. Specify the below time-window changes.
    Window 1 Objective
  13. Now let's create a second objective time window by double-clicking in the first column of the next row and selecting Houserville. Let's specify start and end dates/times so that they encompass a portion of the observed recession limb. Specify the below time-window entries for this second objective.
    Window 1 and Window 2 Objectives

    Multiple Time Windows

    When multiple time windows are specified at the same location, they must NOT overlap. 

  14. Save your project. Compute the "Multi-Window Optimization" simulation.
  15. After 150 iterations, the Simplex search will fail to converge. The optimization trial has a neat feature that allows you to increase the maximum iteration and then pick back up where you left off when you re-compute.
  16. Navigate to the Search tab and increase the Max Iterations entry from 150 to 200. Save and recompute. The simulation should re-start at iteration 150 (unless you clicked force-compute or changed other parameters) and converge after roughly 180 iterations.
    Search - Max Iterations
  17. Navigate to the Results tab and expand the "Multi-Window Optimization" simulation node. Notice that there are two "Houserville" folders, one for each specified objective time-window. View the Optimized Parameters table and view both of the Observed Data plots contained in the two folders. The only difference in the two Observed Data plots are the vertical, dashed lines denoting the two distinct time periods that the optimization routine used in its evaluation. The optimized parameter values achieved a better fit of the observed peak and of the specified portion of the recession limb. You'll notice that the optimized values, particularly those relating to the Decifict and Constant parameters, are different than the previous optimization trial that used one objective function that covered the entire simulation period. 
    Multi-Window Optimization Results

Multiple Objective Target Locations

  1. Navigate to the Compute tab and create a copy of the "AB_OptimizeHouserAxe" optimization trial. Name the new trial "Multi-Location Optimization".
  2. Select and expand the newly created "Multi-Location Optimization" node and navigate to the Objective tab. Notice that there are two objective locations specified, one for the Houserville location and one for the Axemann location further downstream.
  3. For this example, let's change the Objective Search Type to Single Search. We will explore the new Sequential Searches feature later on.
    Objective Component Editor
  4. Notice that there are 10 parameters that are already defined. Five of them are related to the "Spring_Crk_ab_Houser" subbasin element and the other five are related to the "Spring_Crk_ab_Axe" subbasin element. This optimization trial is setup to find the parameter sets that best match the observed data at both Houserville and Axeman (located further downstream). Since the Sequential Search option is de-selected, only one optimization routine will be executed with the objective function results at Houserville and Axemann combined and assessed via addition for each iteration.
    Multiple-Location Configuration
  5. Navigate to the Search tab. Increase the Max Iterations to 200 and change the Tolerance to 0.1.
    Search Component Editor
  6. Save your project. Compute the "Multi-Location Optimization" simulation. The optimization trial should converge on a solution after roughly 150 iterations.
  7. Navigate to the Results tab and expand the "Multi-Location Optimization" simulation node. Notice that there are two folders, one for each specified objective location. View the Optimized Parameters table and view both of the Observed Data plots contained in the two folders. In this example, the optimization routine did a decent job at converging on a combined parameter set that closely matched the observed data at both locations.
    Multi-Location Optimization Results

Sequential Searches

  1. Let's explore the Sequential Searches option now. Navigate to the Compute tab and select the "AB_OptimizeHouserAxe" optimization trial.
  2. Navigate to the Objective tab and verify that the Sequential Searches option is selected for Objective Search Type.
    Multi-Location Sequential Search
  3. Compute the "AB_OptimizeHouserAxe" simulation. Notice in the figure below that the progress bar indicates that two search sequences will take place.
    Progress Bar During Sequential Search Compute 
    The first search sequence for the Houserville objective should converge on a solution after roughly 130 iterations. The optimized parameter values for "Subbasin_Crk_abv_Houser" are then locked into place and used for the second search sequence at the Axemann objective location further downstream. The second search sequence should converge after roughly 80 iterations.
  4. Navigate to the Results tab and expand the "AB_OptimizeHouserAxe" simulation node. Notice that there are two folders, one for each specified objective function location. View the Optimized Parameters table and view both of the Observed Data plots contained in the two folders. Overall, this optimization trial with the sequential search method performed slightly better than the previously computed "Multi-Location Optimization" trial with the sequential search de-selected. You can use the Objective Function Summary table metrics as well as the calibration metrics on the individual element Summary Table tables to compare and contrast the performance of the single search optimization and the sequential search optimization.
    Multiple Location Optimization Results - Sequential Search

    Objective Function Summary tables

    Element Summary Table Results

Optimization Parameter Types - Subbasin Zone

  1. Let's explore the new "Subbasin Zone" Optimization Parameter type. 
  2. Create a copy of the "A_OptimizeHouserville" optimization trial by navigating to the Compute tab, right-clicking the A_OptimizeHouserville node, and selecting Create copy. Name the copy "A_OptimizeHouserville_Zone".
  3. Select and expand the newly created "A_OptimizeHouserville_Zone" node and click on the Parameter 1 node.
  4. Change the Element to --Subbasin Zone--, the Zone Configuration to Gages, the Zone to F. Houserville, the Zone Objective Location to Houserville, the Parameter to Decit and Constant - Constant Rate Scale Factor, Minimum to 0.1, and Maximum to 4.
    Parameter 1 Configuration
  5. Make similar changes to Parameter 2, but for Parameter select Decit and Constant - Initial Deficit Scale Factor. Enter a Minimum of 0.3 and a Maximum of 1.5
    Parameter 2 Configuration
  6. Delete Parameter 3, Parameter 4, and Parameter 5.
  7. "Subbasin Zone" Optimization Parameters tend to lead to quicker convergence than element-based Optimization Parameters. Navigate to the Search tab and decrease the tolerance to 0.0001.
    Search Component Editor - Tolerance
  8. Compute the "A_OptimizeHouserville_Zone" simulation and view the results. In this case, there is only one subbasin element in the F. Houserville Zone ("Spring_Crk_ab_Houser"). So the optimized scale factors are based only on that element. Otherwise, optimized scale factor values that work best considering all elements in the zone would have been determined. In this example, multiplying the constant rate value as defined in the basin model (0.11911 in/hr) by a factor of 1.0001 and the initial deficit value (0.24980 in) by a factor of 0.67148 led to the best results.
    Zone Subbasin Optimization Results

Project Files

Download the final HEC-HMS project files here: 

NAB_West_Branch_Susquehanna_Final.zip

Forecast Optimization

Starting in HEC-HMS v4.14, the Forecast Alternative simulation type will be able to leverage the aforementioned Optimization Trial enhancements to automate the calibration process. If a Forecast Alternative and Zone Configuration exists, the user will be able to quickly create a linked Optimization Trial that will determine optimized parameter scale factors for each subbasin zone. The optimized scale factors are then pushed to the Forecast Parameter "Override" Tables where they can be saved prior to computing the Forecast Alternative.

  1. Navigate to the Compute tab, expand the "Forecast Alternatives" node, and select "Daily Summer".
  2. The Forecast Alternative editor panel has a new "Zonal Config Optimization" option. Select Yes. This will create a new Zonal Config Optimization tab.
  3. Select the Zonal Config Optimization tab. This tab allows you to link one or more Optimization Trials to this Forecast Alternative.
  4. Click the Add button. This button launches a wizard to facilitate the rapid parameterization of a linked Optimization Trial.
  5. Step 1 of the wizard allows you to enter a name, check whether or not you want the Optimization Trial to use the same time window as the Forecast Alternative lookback period, and, finally, select a Zone Configuration for the Optimization Trial. Let's use the defaults for this tutorial. Click Next.
  6. Step 2 of the wizard is where you connect zones to control points where observed flow (or SWE) data are available. When an optimization trial is computed, optimized scale-factor parameters for a given zone will be determined based on how well the computed results match the observed results at the chosen control point. These connections need to be made carefully. As much as possible, select control points that are at or near the most downstream portion of each zone. Match zones to control points according to the figure below. Click Next.


  7. Step 3 of the wizard is where you select the available scale factor parameters that you would like to optimize. It is recommended to only choose the available parameters that you think will have the most impact on calibration results. For each desired parameter, you need to select the Include checkbox. Optionally, you may edit the default Min and Max bounds that the optimization routine will use. It is important to think critically when specifying the bounds so that parameter ranges remain realistic; in general, the tighter the bounds the more realistic your optimized parameter sets will be. 
    1. Use the "Param Filter" and select Deficit and Constant - Constant Rate Scale Factor. Select the Include box for all of the zones. Leave the Min and Max defaults at 0.33 and 3.0.
    2. Use the "Param Filter" and select Deficit and Constant - Initial Deficit Scale Factor. Select the Include box for all of the zones. Leave the Min and Max defaults at 0.33 and 3.0.
    3. Use the "Param Filter" and select ModClark - Storage Coefficient Scale Factor. Select the Include box for all of the zones. Leave the Min and Max defaults at 0.33 and 3.0.
    4. Use the "Param Filter" and select ModClark - Time of Concentration Scale Factor. Select the Include box for all of the zones. Leave the Min and Max defaults at 0.33 and 3.0.
    5. Use the "Param Filter" and select Recession - Ratio to Peak Scale Factor. Select the Include box for all of the zones. Let's put tighter bounds on this parameter. Define the Min and Max bounds at 0.8 and 1.2.
    6. Use the "Param Filter" and select Recession - Recession Constant Scale Factor. Select the Include box for all of the zones. Let's put tighter bounds on this parameter. Define the Min and Max bounds at 0.8 and 1.2.
    7. Now, use the "Param Filter" and select --None--. Verify that your zone-based parameters are in accordance with the below figure. You should have 30 parameters selected.
  8. Click Create to create the linked Optimization Trial. 
  9. Navigate to the Compute tab, expand the "Optimization Trials" node, and select "OPT: Daily Summer". The optimization trial should be fully parameterized, including each of its 30 parameters.
  10. Navigate back to the Compute tab, expand the "Forecast Alternatives" node, select "Daily Summer", and open the Zonal Config Optimization tab. Notice that the table has been updated with the newly created, linked optimization trial. For this tutorial, we will only link one Optimization Trial. However, additional linked optimization trials can be created and linked by clicking the Add button and repeating the 3-step wizard.
  11. Click the compute icon located within the first row and last column of the Zonal Config Optimization table. When you compute a linked Optimization Trial from this table (and ONLY this table) some special logic is executed that links Forecast Alternative information to the Optimization Trial. Below are some of the unique outcomes that occur.
    1. Prior to compute, the Optimization Trial time windows may be updated to match the Forecast Alternative lookback period.
    2. Prior to compute, the Optimization Trial parameters are adjusted to match initial baseflow, initial reach, and initial reservoir adjustments specified in the Forecast Alternative.
    3. Prior to compute, the Optimization Trial input gage and grid data may be changed to match the Forecast Alternative data variant.
    4. After compute, the Optimization Trial results will be used to update the Combined Forecast Parameter Editor (see next step). The Combined Forecast Parameter Editor will be presented to the user to apply (or discard) the edits.
  12. At the end of the compute (it should complete in under five minutes), the Combined Forecast Parameter Editor will appear with adjusted values highlighted in blue. You can alternate between the Deficit Constant Loss, ModClark Transform, and Recession Baseflow tabs to see all of the optimized scale-factor values from the linked Optimization Trial. Click Apply to accept and save the edits.
  13. Now, let's compute the Forecast Alternative. You may compute it from the Combined Forecast Parameter Editor (from the previous step) by clicking the forecast Compute button near the bottom of the editor.
  14. Navigate to the Results tab, expand the "Forecast Alternatives" node, and select "Daily Summer (Default)".
  15. Let's open up the Graph results for each of our control points (objective function locations). From upstream to downstream, those elements are Houserville, Axemann, Spring Creek, Milesburg, and Sayers_IN. Also, let's open up the Calibration Summary table to look at statistical calibration metrics.
  16. The simulated results match the observed data from the forecast lookback period extremely well. Some manual calibrations adjustments may be warranted to better match the recession limb at a couple of control points, but this is a really solid calibration out-of-the-box.


A demo video below provides a sneak-peak of the initial design of this new functionality.