test_topographic.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:WNTR 作者: USEPA 项目源码 文件源码
def test_diameter():
    """
    Pandit, Arka, and John C. Crittenden. "Index of network resilience
    (INR) for urban water distribution systems." Nature (2012).
    """

    raise SkipTest

    inp_file = join(datadir,'Anytown.inp')

    # Create a water network model for results object
    wn = wntr.network.WaterNetworkModel(inp_file)

    G = wn.get_graph_deep_copy()
    udG = G.to_undirected()

    diameter = nx.diameter(udG)

    error = abs(5.0-diameter)
    assert_less(error, 0.01)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号