用法:New Interface:应该始终使用新接口。旧接口(如下)只为向后兼容而保留。新界面的主要功能是More pythonic interface
A number of convenience functions
导入新接口并运行swmm>>> from swmm5.swmm5tools import SWMM5Simulation
>>> st=SWMM5Simulation("swmm5/examples/simple/swmm5Example.inp")Example 1:Retrive simulation properties.>>> st.SWMM5_Version() # Version of underlying SWMM5 engine.
'5.1.000'
>>> st.SWMM5_VERSION # same thing as an integer
51000
>>> st.Flow_Units() # Flow units.
'LPS'
>>> st.SWMM_FlowUnits # returns flow units as an index. 0 = CFS, 1 = GPM, 2 = MGD, 3 = CMS, 4 = LPS, and 5 = LPD
4
>>> st.SWMM_Nperiods # number of reporting periods
360
>>> st.SWMM_Nsubcatch # number of subcatchments
6
>>> st.SWMM_Nnodes # number of drainage system nodes
12
>>> st.SWMM_Nlinks # number of drainage system links
11
>>> st.SWMM_Npolluts # number of pollutants tracked
0
>>> print ("%.2f"%st.SWMM_StartDate) # start date of simulation
40844.00
>>> st.SWMM_ReportStep
60
>>>Example 2:Prints available entities>>> st.entityList()
['SUBCATCH', 'NODE', 'LINK', 'SYS']
>>> st.Subcatch()
['A2', 'A1', 'A3', 'A4', 'A5', 'E1']
>>> st.Node()
['J1', 'J2', 'J3', 'J4', 'J5', 'J6', '