In a general sense, optimization is the process of finding the best solution from all feasible solutions. An optimization problem consists of maximizing or minimizing a real function by systematically choosing input values from within an allowed set and computing the value of the function. In HEC-HMS, the input values are hydrologic parameters and/or precipitation parameters (when simulating a hypothetical storm). The function (called an Objective Function in HEC-HMS) falls into one of two categories: (1) a goodness-of-fit metric or (2) a response function.