Topics of the day:
1. RSWMM: Autocalibration of SWMM in R
2. SWMM binary to csv
**********************************************************
* To sign off, email to: list...@listserv.uoguelph.ca *
* In the body of the message type: signoff swmm-users *
**********************************************************
----------------------------------------------------------------------
Date: Tue, 10 Jan 2012 09:25:42 -0800
From: Peter Steinberg <pstei...@HERRERAINC.COM>
Subject: RSWMM: Autocalibration of SWMM in R
Good morning everyone:
I have seen a number of emails on this listserve about autocalibration of SWMM. I wrote a pair of R scripts that work together to do this, and I am happy to share them. Send me a private email.
The scripts do not assess the structure of the model: they only change its parameters. You start out with a SWMM input file where you have gone through and edited the uncertain parameters to replace them with non-SWMM codes like $1$. Then you have a separate CSV of your codes, along with minimum and maximum bounds for each parameter. R runs optimization functions and when the SWMM-based objective function is called, parameter values are passed from R into writing SWMM input files where your replacement codes are replaced by actual numbers. R then runs the input file, scans the binary file of results, and calculates performance statistics based on calibration data provided in a separate CSV. The performance statistic(s) is returned from the objective function to the optimization library and the process repeats.
You can do single objective optimization by one of about 6 methods (built in R functions) or you can do multiobjective optimization using NSGA2 (from the mco R package).
The code is very lightweight because I did not get into the source code of SWMM at all. Thus no compilation steps are required. You just put RSWMM.r and runRSWMM.r (text files) in your working directory. RSWMM.r is the library of functions to connect SWMM and R, and runRSWMM.r is the much shorter script that adapts RSWMM.r functions to specific projects by providing paths and options. Typically you only need to edit the heavily-commented runRSWMM.r script to calibrate a SWMM model.
When I have time, I would like to extend the multiobjective optimization to BMP costs optimization rather than simple calibration. Let me know if you have any ideas about features for this.
Note this is a work in progress and the documentation is still light.
Take care,
Peter Steinberg
Environmental Scientist
direct 206.787.8228 | cell 206.715.4492 | main 206.441.9080
2200 Sixth Avenue Suite 1100 Seattle, WA 98121
Find Herrera online at: www.herrerainc.com
This electronic transmission may contain privileged and/or confidential information intended only for the recipient(s) named. If you have received this message in error, please delete it from your system without copying it, and please notify me by reply electronic mail. Thank you.
SEATTLE, WA | PORTLAND, OR | MISSOULA, MT | OLYMPIA, WA | WINTHROP, WA | GUANGZHOU, CHINA
**********************************************************
* To sign off, email to: list...@listserv.uoguelph.ca *
* In the body of the message type: signoff swmm-users *
**********************************************************
------------------------------
Date: Tue, 10 Jan 2012 15:45:47 -0800
From: Jay Heiman <Jayh...@CIVILSOLUTIONS.ORG>
Subject: SWMM binary to csv
No sooner did I get copies emailed to those that requested it than an
error comes up.
I believe I got the new, new version out to all but if not, as before,
please email me directly so as not to clutter up the list-server.
This error occurred when writing the node and links properties csv file
and has been fixed.
Jay
**********************************************************
* To sign off, email to: list...@listserv.uoguelph.ca *
* In the body of the message type: signoff swmm-users *
**********************************************************
------------------------------
End of SWMM-USERS Digest - 9 Jan 2012 to 10 Jan 2012 (#2012-3)
**************************************************************