Ruby ICM InfoWorks vs. ICM SWMM Node Property Data Comparison
Ruby ICM InfoWorks vs. ICM SWMM Node Property Data Comparison

Ruby ICM InfoWorks vs. ICM SWMM Node Property Data Comparison

The ICM Infoworks and SWMM Network Comparison Tool for Nodes is a script designed to bridge the gap between two hydraulic modeling systems, InfoWorks and SWMM, as implemented in ICM. This tool provides engineers and modelers a powerful means to compare and analyze node attributes across these two networks within the Integrated Catchment Modeling (ICM) environment.

At its core, the tool facilitates a detailed comparison between InfoWorks HW Node Tables and SWMM SW Nodes Tables. It allows users to select specific attributes for comparison, such as ground level, chamber floor/invert elevation, flood level/surcharge depth, maximum depth, floodable area/ponded area, and chamber/shaft area. This flexibility lets users focus on the most relevant parameters for their analysis needs.

The comparison process is both comprehensive and user-friendly. It begins by setting up the current network (CN) as the ICM Infoworks Network and the background network (BN) as the ICM SWMM Network. The tool then collects node data from both networks and presents users with an interface to select the attributes they wish to compare. As the comparison runs, it calculates differences between corresponding nodes, highlighting significant discrepancies and providing overall statistics on the comparison results.

What sets this tool apart is its attention to detail and ability to handle special cases. For instance, it applies specific logic for attributes like 'min_surfarea' and 'surcharge_depth', ensuring accurate comparisons even for complex scenarios. The output is designed to be informative and actionable, focusing on nodes with significant differences and providing a clear statistical overview of the comparison.

This tool saves time and enhances the accuracy and reliability of hydraulic modeling efforts by bridging InfoWorks and SWMM networks. It's an invaluable asset for engineers and modelers working with multiple hydraulic modeling platforms, offering insights that can lead to more informed decision-making and improved model consistency. It helps you find modeling differences.

Seven possible comparisons between InfoWorks HW Node Tables and SWMM SW Nodes Tables
Ruby Script Output

The attribute pairings we will compare consist of various related SWMM and ICM parameters. The first property is the ground levels of the InfoWorks and SWMM nodes, and the following additional pairs will be compared with each other:

  • chamber_floor and invert_elevation: These two attributes represent different aspects of the network’s structure and will be compared to identify discrepancies.
  • flood_level and surcharge_depth: These attributes are crucial in understanding the network’s capacity and response to flooding events.
  • maximum_depth: This attribute is also a standalone parameter that will be analyzed separately.
  • floodable_area and ponded_area: These attributes provide insights into the areas that are susceptible to flooding.
  • chamber_area and min_surfarea: These parameters are compared to understand the minimum surface area required for the chamber.
  • shaft_area and min_surfarea: This comparison helps understand the minimum surface area required for the shaft.

6. Output

The output of this comparison will provide valuable insights into the network:

  • Nodes with a difference percentage greater than 0.1% will be displayed. This helps quickly identify the nodes with significant differences in their attributes.
  • The output will also show the total values for each network and the difference between them. This provides a high-level overview of the networks’ characteristics.
  • Additionally, the output will provide statistics on the comparisons made. This includes the number of comparisons below 0.1%, the total number of comparisons made, and the percentage of comparisons below 0.1%. These statistics quantitatively measure the similarities and differences between the networks.

BN is different due to ground elevation differences for outfalls
Ruby Description
# ICM Infoworks and SWMM Network Comparison Tool for Nodes

## Overview
This script compares selected attributes between InfoWorks HW Nodes and SWMM SW Nodes in ICM networks.

## Key Components

1. **Network Setup**
   - `cn`: Current network (ICM Infoworks Network)
   - `bn`: Background network (ICM SWMM Network)

2. **Node Collections**
   - `cn_nodes`: HW nodes from current network
   - `bn_nodes`: SW nodes from background network

3. **User Interface**
   - Prompts user to select attributes for comparison
   - Displays informational messages about the tool's functionality

4. **Attribute Pairs for Comparison**
   - ground_level
   - chamber_floor vs. invert_elevation
   - flood_level vs. surcharge_depth
   - maximum_depth
   - floodable_area vs. ponded_area
   - chamber_area vs. min_surfarea
   - shaft_area vs. min_surfarea

5. **Comparison Process**
   - Loops through selected attributes
   - Creates a hash map of SW attributes by node_id
   - Compares HW attributes to SW attributes using node_id
   - Calculates and displays differences

6. **Output**
   - Displays nodes with difference percentage > 0.1%
   - Shows totals for each network and the difference
   - Provides statistics on comparisons:
     - Number of comparisons below 0.1%
     - Total number of comparisons
     - Percentage of comparisons below 0.1%

## Special Handling
- Handles 'min_surfarea' with a fixed value of 12.566
- Calculates 'surcharge_depth' based on conditions
- Computes 'maximum_depth' for HW nodes

## Note
The script reminds users that "CN is the ICM Infoworks Network and BN is the ICM SWMM Network" at the beginning and end of execution.        
Location of the Ruby Code

01 InfoWorks ICM/01 Ruby/02 SWMM/0149 - Utilities/Compare InfoWorks to SWMM for Nodes

Closing Note:

Thank you for reading these articles. I appreciate your engagement and support. Thank you again, and I hope you'll join me on this ongoing journey of learning and discovery. Until next time!

The articles in this newsletter highlight temporal asymmetries. They discuss topics that, while only universally relevant at some times, become crucial for those in need. These pieces are resources, and they are ready to let you know and help when specific circumstances arise.

Ghulam Murtaza PH, PMP?. ENV SP,

Senior Water Resources Engineer

4 个月

Very informative. Thanks for sharing

回复

要查看或添加评论,请登录

Robert Dickinson的更多文章

社区洞察

其他会员也浏览了