All Forums

Hi,

I am trying to make a link between SWMM and MATLAB (couple operation) to derive optimal policies. So, I call SWMM in MATLAB in each function evaluation process and need its results for decision making of optimization algorithm.

The problem is that I need to export data of some control nodes in one "text file" (for example time series of depth in one internal node) to have access to that data and be able to evaluate the objective function and change the policy until convergence. As I see, SWMM's ".OUT" and ".rpt" files don't consist of time series of internal nodes and links.

To clarify my question, I want to know how can I define for the SWMM software to export time series of one special node in a text file at the end of runs?

And one more question, Is InfoSWMM an open source software or not?

Thanks in advance,

Niloofar

You need to be a member of SWMM 5 or SWMM or EPASWMM - (not associated with EPA) to add comments!

Join SWMM 5 or SWMM or EPASWMM - (not associated with EPA)

Email me when people reply –

Replies

  • I called the specific results from .rpt file using "textscan" function with line marks. For example, I want to extract time series at Node 1. The line marks will be:

    line_marks{1} = '<<< Node 1 >>>'; % Starting mark
    line_marks{2} = '---------------------';
    line_marks{3} = '---------------------';
    line_marks{4} = '************'; % Ending mark

    The format of results will be '%s %s %f %f %f %f' 

    This code can be used for both extracting information from INP file and RPT file. 

  • InfoSWMM is an extension in Arc Map that uses the SWMM 5.1.011 engine so it is both open source and not open source.  If you use the time series output selection for nodes in the DOS/Console version of SWMM 5 (it is called SWMM5.EXE) then you can have a time series in the RPT file.  You can make an alteration of the code to save this to another text file but you have to modify the source code.

  • InfoSWMM uses the EPA SWMM 5.1.010 engine (the latest engine but the GUI is not open source.  

    Here are a few links to making a text file

    Subject:   How to use SWMM 5 DOS to make an Output Table in the RPT file


    You can make tables of the node,  link  and  Subcatchment output data in SWMM 5 if you use the DOS SWMM 5 program but not the Windows DLL.   Step 1 is to create the DOS batch file, Step 2 is to select the nodes, links and subcatchments, Step 3 is to run the batch file and Step 4 is to view the RPT tables or extract the data to Excel.  You can do this directly in the InfoSWMM and H2OMAP SWMM graphical user interfaces by using Run Manager, Step 5 to select the nodes, links and subcatchments and Step 6 to view the tables in the browser. 

    Step 1.   Make a Batch File to call the DOS SWMM 5

    swmm5.exe Example1.inp  D:\swmm5.0.022\bob.rpt
    pause

    Step 2.  Add the nodes,  links and  subcatchments tables you want to generate in the RPT file

    [REPORT]
    CONTROLS         NO
    LINKS                 ALL
    NODES               ALL
    SUBCATCHMENTS ALL

    Step 3.  Run the Batch file


    Step 4.  Extract the Tables from the RPT File of SWMM 5


      <<< Node 17 >>>
      ---------------------------------------------------------------------------------
                               Inflow  Flooding     Depth      Head       TSS      Lead
      Date        Time            CFS       CFS      feet      feet      MG/L      UG/L
      ---------------------------------------------------------------------------------
      JAN-01-1998 01:00:00      0.000     0.000     0.000   980.000     0.000     0.000
      JAN-01-1998 02:00:00      5.910     0.000     0.608   980.608    26.065     5.213
      JAN-01-1998 03:00:00     11.935     0.000     0.887   980.887    22.826     4.565
      JAN-01-1998 04:00:00     18.291     0.000     1.143   981.143    21.176     4.235
      JAN-01-1998 05:00:00     12.640     0.000     0.916   980.916    22.426     4.485
      JAN-01-1998 06:00:00      3.925     0.000     0.493   980.493    27.578     5.516
      JAN-01-1998 07:00:00      0.388     0.000     0.161   980.161    38.134     7.627
      JAN-01-1998 08:00:00      0.067     0.000     0.071   980.071    26.937     5.387
      JAN-01-1998 09:00:00      0.029     0.000     0.048   980.048     1.878     0.376

    Step 5.  InfoSWMM and H2OMAP SWMM dialog for selecting nodes, links and subcatchments for generating a detailed RPT file table.



    Step 6.  Sample InfoSWMM and H2OMAP SWMM RPT Tables if Report Options is used.

    http://www.swmm5.net/2013/01/how-to-run-swmm-5-console-from-swmm-5....

    • Hello Robert,

      Referring to the second step, you meant that these lines are to be added to the *.INP file right? I did that by opting for all subcathcments, links, and nodes, but the batch file does not create an *.RPT file that has time series for subcatchments/links/nodes. How can I then extract time series without using the EPA SWMM GUI? Am I supposed to obtain that from the binary *.OUT file?

      With thanks,

      Erfanul

      • No, you obtain it from the RPT file but you need to use the SWMM 5 Console file

        https://swmm5.org/2013/01/29/how-to-run-the-swmm-5-console-from-the...

        I normally send this out to Master's students who want to do Monte Carlo batch analysis of SWMM 5 in batch mode (normally they use Matlab to run the SWMM5 DOS console program)

        How to Use the SWMM 4 Dos Engine  SWMM Engine Name             - Name of the SWMM 4 DOS Engine SWMM Input File              - SWMM 4 Input file SWMM Output File             - SWMM 4 Text Output File (.OUT Extension) Alternative SWMM Output File - Reduced SWMM 4 Output File (.RPT Extension)  How to Use the SWMM 5 Dos Engine  SWMM Engine Name             - Name of the SWMM 5 DOS Engine (usually called SWMM5.EXE) SWMM Input File              - SWMM 5 Input file SWMM Output File             - SWMM 5 Output Binary Graphics File (.OUT Extension) Alternative SWMM Output File - SWMM 5 Output Text File (.RPT Extension)

        Here is a past link from the CHI Archives about this matter:

        https://www.openswmm.org/Topic/3668/swmm-and-monte-carlo

        The batch abilities of SWMM5 seems to work for students.

        • Thanks a lot Robert for your kind help. I managed to do it.

          Best,

          Erfanul

This reply was deleted.