Output.link_result#
- Output.link_result(index, time_index=None)[source]#
For a link at given time, get all attributes.
- Parameters:
- Returns:
dict of attributes for a link at given timestep
- Return type:
dict {attribute:value}
Examples:
>>> from pyswmm import Output >>> from datetime import datetime >>> >>> with Output('tests/data/model_full_features.out') as out: ... data = out.link_result('C2', datetime(2015, 11, 1, 15)) ... for attribute in data: ... print(attribute, data[attribute]) >>> LinkAttribute.FLOW_RATE 8.226319313049316 >>> LinkAttribute.FLOW_DEPTH 0.0 >>> LinkAttribute.FLOW_VELOCITY 0.0 >>> LinkAttribute.FLOW_VOLUME 0.0 >>> LinkAttribute.CAPACITY 1.0