Links#
- class Links(model)[source]#
Link Iterator Methods.
- Parameters:
model (object) – Open Model Instance
Examples:
>>> from pyswmm import Simulation, Links >>> >>> with Simulation('tests/data/model_weir_setting.inp') as sim: ... for link in Links(sim): ... print(link) ... print(link.linkid) <swmm5.Link object at 0x031B0350> C1 <swmm5.Link object at 0x030693D0> C2 <swmm5.Link object at 0x031B0350> C3 <swmm5.Link object at 0x030693D0> C0
Iterating or Links Object
>>> links = Links(sim) >>> for link in links: ... print(link.linkid) C1:C2 C2 C3
Testing Existence
>>> links = Links(sim) >>> "C1:C2" in links True
Initializing a link Object
>>> links = Links(sim) >>> c1c2 = links['C1:C2'] >>> c1c2.flow_limit = 12 >>> c1c2.flow_limit 12
Methods