################################# NSGA-II for SWAT Watershed Model ################################# nsga2sw 3.0
Released: 31-October-2014
Introduction
Soil and Water Assessment Tool (SWAT) is a conceptual distributed continuous time model that has capability of running on a daily and sub-daily time step.
Non-Dominated Sorting Genetic Algorithm II (NSGA-II) is a multi-objective optimization algorithm used as an automatic calibration tool in various disciplines.
Setup
Install the Python module:
pip install https://github.com/mehmetbercan/NSGA-II_Python_for_SWAT_model/zipball/master
Setup SWAT Model:
Create "./Backup" folder in "SWATtxtinout" folder and copy content in "SWATtxtinout" to the "SWATtxtinout/Backup" folder.
Copy "ExampleModel/swatTest/NSGA2.IN" in to the "SWATtxtinout" folder.
Setup NSGA-II inputs in "./NSGA2.IN" folder.
NSGA-II calibration can be started using "ExampleModel/ExampleTest.py".
"ExampleModel/ExampleTest.py" can be edited for certain purposes.
Definition of model Outputs in "./NSGA2.OUT" folder.
Running NSGA-II in SWAT-CUP:
Although above procedure is enough to run NSGA-II, this section explains how to run it in SWAT-CUP. This calibration tool is designed in a way to migrate into SWAT-CUP with an only need to add the NSGA-II calibration method to SWAT-CUP interface. The procedure bellow is not final intent but it is a way around to run NSGA-II in SWAT-CUP.
Follow the above procedure but do not run ("ExampleModel/ExampleTest.py" )
Open SWAT-CUP and create a new GLUE project by following instruction within the interface
Under SWAT-CUP "Project Explorer", extend "Executable Files" and right Click on "GLUE_run.bat" to open "item location"
Right click "GLUE_run.bat" file and click "edit"
Click on "Calibrate..." (green gear shape) on the upper menu and click on "GLUE_run.bat"
To generate more results in SWAT-CUP, click on "Calibrate..." on the upper menu and click on "GLUE_Post.bat"
Plots and outputs can be viewed under "Calibration Outputs" and "Sensitivity analysis" in the SWAT-CUP "Project Explorer" window to the left.
Notes
my website <http://mehmetbercan.com/research/researchCal.html>
_ for more informationCredit:
Please cite one of the below articles if you use this code:
Ercan, M. B. and J. L. Goodall(2016), Design and implementation of a general software library for using NSGA-II with SWAT for multi-objective model calibration., Environmental Modelling & Software, 84, 112-120. doi:10.1016/j.envsoft.2016.06.017 <http://www.sciencedirect.com/science/article/pii/S1364815216302547>
_.
Ercan, M. B. and J. L. Goodall (2014), A Python tool for multi-gage calibration of SWAT models using the NSGA-II algorithm., In: Ames, D.P., Quinn, N.W.T., Rizzoli, A.E. (Eds.), 2014. Proceedings of the 7th International Congress on Environmental Modelling and Software, June 15-19, San Diego, California, USA. (4):2325-2331, 2014. doi:10.13140/2.1.3865.4407 <https://www.researchgate.net/publication/264373424_A_Python_Tool_for_Multi-Gage_Calibration_of_SWAT_Models_using_the_NSGA-II_Algorithm?channel=doi&linkId=53da56850cf2631430c8182a&showFulltext=true>
_.