Runner Module

This script provides a command-line interface for creating and adding multiple subcatchments to an existing SWMM model. The user will be prompted to provide input for each subcatchment’s area, land use type, and land form type. The subcatchments will be added to the model and the updated model will be saved.

Usage:

python3 runner.py file_path

Example:

python3 runner.py example.inp

Arguments:

file_path: The path to the SWMM input file (INP) to which subcatchments will be added.

Functions:

add_multiple_subcatchments: A recursive function that adds subcatchments to the model.

rcg.runner.add_multiple_subcatchments(model)[source]

Add multiple subcatchments to the given model recursively. The function calls itself and adds subcatchments to the model until the user decides to stop.

Parameters

modelBuildCatchments

An instance of the BuildCatchments class representing the SWMM model to which the subcatchments will be added.

rcg.runner.generate_subcatchment(file_path: str, area: float, land_form: str, land_cover: str)[source]

Adds a subcatchment to an existing SWMM model.

Parameters

file_pathstr

The path to the SWMM input file (INP) to which subcatchments will be added.

areafloat

The area of the subcatchment [ha].

land_use_typestr

The land use type of the subcatchment.

land_form_typestr

The land form type of the subcatchment.