*ModGA
A Modular Genetic Algorithm Based Flow
and Transport
Optimization Model for Modflow and MT3D*

**INTRODUCTION**

**Purpose and Scope**

In recent years, researchers have actively sought to couple aquifer simulation models with mathematical optimization techniques to address important groundwater quantity and quality management issues (e.g., Gorelick, 1983; Ahlfeld et al., 1988; Wagner and Gorelick, 1989; Andricevic and Kitanidis, 1990; Dougherty and Marryott, 1991; Culver and Shoemaker, 1992; McKinney and Lin, 1994; Sawyer et al., 1995; Barlow et al., 1996). The coupled simulation-optimization approach is appealing because it can account for the complex behavior of the groundwater flow system and identify the best management strategy under consideration of the management objectives and constraints (Wagner, 1995). Comprehensive reviews of the simulation-optimization approach can be found in Gorelick (1983 and 1990), Willis and Yeh (1987), Yeh (1992), and Gorelick et al. (1993). Wagner (1995) outlines some of the more recent advances in simulation-optimization groundwater management modeling.

While significant progress has been made in the theoretical development of the simulation-optimization approach for groundwater hydraulic control and quality management, the application of simulation-optimization models to large, field-scale problems has remained very limited. Several factors may have contributed to this lack of practical applications. First, the use of a simulation-optimization model requires intensive computing capabilities, thus making many complex three-dimensional field problems intractable. Second, there are currently very few general-purpose and easy-to-use simulation-optimization codes available to practitioners at the field project level. Finally, the advantages of the simulation-optimization approach over the conventional trial-and-error approach in solving real-world problems have not been adequately demonstrated since most studies presented in the literature use simple hypothetical examples. In spite of these shortcomings, however, it is believed that the simulation-optimization models will become a widely accepted and used tool in groundwater hydraulic control and remediation system designs, as increasingly more powerful desktop computers and a new generation of software packages become available.

**Key Features**

This report describes a simulation-optimization model, referred to as ModGA, which can be used for optimal design of groundwater hydraulic control and remediation systems under general field conditions. The model couples genetic algorithms (GA), a global search technique inspired by biological evolution, with modflow (McDonald and Harbaugh, 1988) and MT3D (Zheng, 1990 and 1997), two commonly used groundwater flow and solute transport codes. The coupled simulation-optimization model is capable of finding the global optimum when multiple local optima are present for certain complex problems. It allows for multiple management periods in which optimal pumping rates and schedules vary with time to adapt to the changing flow and transport conditions during the remediation process. The objective function of the model is general enough to accommodate many different types of optimization problems with multiple cost terms such as the capital costs associated with drilling and installation, and the operational costs associated with pumping and treating the contaminated groundwater. Most constraints that are commonly encountered in hydraulic control and remediation system design can be incorporated, including hydraulic gradients, pumping capacities, head and concentration limits, and the maximum number of active wells allowed at any time out of all candidate wells.

ModGA is fully compatible with the modflow and MT3D flow and transport simulators and supports all the discretization and simulation capabilities of these codes. After flow and/or transport models have been constructed and calibrated for a specific site, they can be used directly by ModGA in the remediation design phase without any modification to the modflow and MT3D input files. If the user-specified constraints involve the flow conditions only, ModGA will automatically skip transport simulation.

One of the key features of ModGA is the simplicity and ease with which it can be applied to field problems. This is made possible by the choice of GA as the optimization technique in the coupled simulation-optimization code. As one of the global optimization techniques that seek to optimize the objective function by mimicking a natural selection process, GA is simple to implement because it is independent of the form of the objective function and the nature of the simulation code. Using GA, there is no need to calculate the derivatives (gradients) of the objective function with respect to the variables to be optimized, thus eliminating a primary source of numerical difficulty associated with the simulation-optimization approach. As a result, an GA based optimization model is generally more robust and stable than a gradient based model, especially when the flow and/or transport models are complex and highly nonlinear.

The most significant limitation of ModGA, as with any other optimization code based on a global search technique, is the intensive computational requirement due to the large number of forward flow and/or transport simulation runs needed. While this limitation will be mitigated to a large extent with the rapid advances in computer powers, it should be kept in mind that the most effective use of ModGA is to identify a near-optimal solution generally with a much smaller number of forward simulation runs than that would be required to identify the absolute optimum. Although a near-optimal solution may be slightly different from the global optimum, reaching the global optimum may require so much more computational time that it is neither practical nor necessary.

**Organization of the Report**

This report covers the theoretical, numerical and application aspects of the ModGA software. Following this introduction, Chapter 2 provides a brief overview of the simulation-optimization approach along with a tutorial on genetic algorithms as used in the context of groundwater management and remediation optimization. Chapter 3 discusses the structure and design of the coupled simulation-optimization code and describes all the major modules of the coupled code. Chapter 4 outlines the steps in the formulation of a typical optimization problem and provides detailed input instructions for the optimization package. Chapter 5 includes three typical examples to illustrate the application of ModGA in groundwater remediation system optimization. The appendices contain sample input and output files and abbreviated input instructions.

Groundwater flow and solute transport modeling using MODFLOW and MT3D is a prerequisite to the application of ModGA. Thus, it is assumed that the user of ModGA is already familiar with MODFLOW and MT3D, and groundwater modeling in general. No attempt has been made in this report to address any topic specific to groundwater flow and solute transport modeling. As a result, this report is intended for use in conjunction with the modflow documentation (McDonald and Harbaugh, 1988) and the MT3D documentation (Zheng, 1990 and 1997). General guidance on field scale groundwater flow and solute transport modeling can be found in Anderson and Woessner (1992) and Zheng and Bennett (1995).

**Acknowledgments**

Mingguang Wang contributed to the development of this software package through his dissertation research on global optimization methods and case studies as a graduate assistant at the University of Alabama. Kevin P. Garon of DuPont Environmental and Remediation Services provided invaluable suggestions and field perspectives throughout the duration of this project. Charles L. Karr and Jen-Ho Fang of the University of Alabama were instrumental in getting us interested in genetic algorithms, and David L. Carroll of the University of Illinois provided the initial version of the genetic algorithm code used in ModGA. The author has also benefited from numerous discussions with Charles B. Andrews of S. S. Papadopulos & Associates, Inc., and P. Patrick Wang and Min Sun of the University of Alabama on the subjects of groundwater remediation and optimization techniques. The funding for this project was provided, in part, by DuPont Company through a contract to the University of Alabama. The support and encouragement from Calvin C. Chien, leader of DuPont Containment and Transport Modeling Technology Team, is greatly appreciated.

*ModGA_P
Parameter Estimation Using Genetic
Algorithms*

**INTRODUCTION**

**Purpose and Scope**

In any field application, the input parameters required for a groundwater model are never completely defined and always associated with various uncertainties. A trial-and-error procedure is typically used to manually adjust the input parameters until the model results match the field observations to a satisfactory degree. Given the countless number of parameter combinations, the trial-and-error process is understandably tedious and there is no guarantee that the best combination has been found. An increasing trend in recent years is to apply various optimization procedures to automate certain aspects of the model calibration process and remove some of the subjectivity involved in trial-and-error calibration. The optimization approach is advantageous in that it provides a consistent framework and objective criteria for systematic evaluation of the goodness-of-fit between the model results and field data, and for quantitative analysis of the sensitivity and uncertainty in estimated parameters. For a comprehensive treatment of the concepts and techniques pertinent to parameter estimation, refer to the numerous texts and papers available in the literature, including those listed in the reference section.

This report describes a version of the modular genetic algorithm based
simulation-optimization model (ModGA) that can be used for aquifer parameter estimation
purposes under general field conditions. While the ModGA code is primarily intended for
groundwater management and remediation design optimization, the concept and techniques
used in ModGA are equally applicable to other types of optimization problems such as
aquifer parameter estimation. This report is only intended to serve as a supplement to the
*ModGA Documentation and User’s Guide* (Zheng, 1997) to provide information
specific to parameter estimation. Readers who are not familiar with the ModGA code or
genetic algorithms in general should refer to Zheng (1997) for more information on genetic
algorithms and their applications to groundwater optimization problems.

**Key Features and Limitations**

The version of ModGA described in this supplement is referred to as ModGA_P where the suffix P stands for parameter estimation. ModGA_P is identical to ModGA except in the definition of the objective function and constraints. Thus, for those users who are already familiar with ModGA for groundwater remediation design optimization, it should be straightforward to understand and apply ModGA_P to parameter estimation problems.

Currently, ModGA_P can be used to estimate 1) horizontal hydraulic conductivity, 2) anisotropy ratio of vertical to horizontal hydraulic conductivities, 3) storage coefficient for confined aquifers, 4) specific yield for unconfined aquifers, 5) recharge rates, and 6) evapotranspiration rates. Other types of parameters can be readily added. Both hydraulic head and solute concentration measurements can be used to define the objective function (calibration criteria). Prior information on estimated parameters is directly incorporated as the lower and upper bounds of the parameters.

ModGA_P is fully compatible with the modflow and MT3D flow and transport simulators and supports all the discretization and simulation capabilities of these codes, except that the top and bottom elevations of each model layer must be explicitly specified in modflow (as in MT3D) in order to update the vertical hydraulic conductance internally. After flow and/or transport models have been constructed for a specific site, they can be used directly by ModGA_P in the calibration phase without any modification to the modflow and MT3D input files. If no solute concentration measurement is used, ModGA_P will automatically skip transport simulation.

Since ModGA_P is based on a global optimization technique, it is capable of finding globally or near globally optimal parameters. This can become a significant advantage when many local optima may be present for a complex, highly nonlinear problem. Another key feature of ModGA_P is its simplicity and flexibility with which it can be applied to complex field problems. Because it does not calculate the derivatives (gradients) of the objective function with respect to the estimated parameters, the ModGA_P code eliminates one primary source of numerical instability and is thus very robust. Another important strength of ModGA_P is that it is not sensitive to the initial guess for the estimated parameters. As long as the optimal values are within the user-specified ranges, they can be identified regardless of the initial guess. Obviously, the closer to the final value is the initial guess, the faster the optimal value will be reached. Finally, ModGA_P can be extended to optimize both parameter values and parameter structures (e.g., the number of hydraulic conductivity zones and the boundaries between zones) in a straightforward manner.

As a global optimization code, ModGA_P is computationally demanding due to the large number of forward flow and/or transport simulation runs needed, especially when the number of estimated parameters is large. Therefore, it is important to develop a well-posed inverse problem to reduce the number of estimated parameters to a minimum as justified by the amount of observation data. It should also be kept in mind that ModGA_P is most effective for identifying near optimal parameters with a relatively small number of forward simulation runs. Currently, ModGA_P does not calculate the sensitivity and uncertainty of estimated parameters. As a result, the quality of estimated parameters cannot directly assessed. This limitation can be resolved by either adding a routine for sensitivity and uncertainty calculation into ModGA_P, or using ModGA_P in conjunction with an existing, gradient-based parameter estimation code such as MODFLOWP (Hill, 1992) and PEST (Watermark Computing, 1994).

**Acknowledgments**

The funding for this project was provided by DuPont Company through a contract to the University of Alabama. The support and encouragement from Calvin Chien and Kevin Garon is greatly appreciated. Jiu J. Jiao tested several earlier versions of the code and made valuable suggestions. Daniel Feinstein kindly provided the field case study used in this study. The author also benefited from numerous discussions with Charles Andrews, Mingguang Wang, and P. Patrick Wang on model calibration and global optimization.

Last modified: June 14, 2001