Skip to content

NikoZHAI/pyswmm-extended

Repository files navigation

Extended PySWMM

Extended SWMM5 API for optimization problems

Original API:

PySWMM - Open Water Analytics

What's new?

Add features to manipulate the link cross-sections. Changing diameters and type of your conduits.

See in swmm5.py:

  1. Property getters:

     getLinkLength()
     getLinkXsectDiameters()
     getLinkType()
    
  2. Property setter:

     setLinkXsectDiameters() 
    

Usage

The lib/linux/swmmapi_extended.so is compiled from modified C source code SEE HERE.

One should load this executable when you want to use the above-stated features.

import pyswmm as swm
with swm.Simulation(inputfile='my_inp.inp', swmm_lib_path='pyswmm_ROOT/lib/linux/swmmapi_extended.so') as sim:
	# Example usage
	l = sim._model.getLinkLength(link_index)
	print(l)

Related Project

Multi-objective optimization by progressive improvement of surrogate machine learning models (MOPRISM)

hosted by UNESCO-IHE

supervised by Prof. Dimitri Solomatine and Dr. Juan Carlos Chacon-Hurtado

Contact

Huanyu ZHAI - [email protected]

About

Extended SWMM5 API for Optimization Problems

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages