Giter Club home page Giter Club logo

Comments (5)

michaelbynum avatar michaelbynum commented on May 27, 2024

from wntr.

Tabznator avatar Tabznator commented on May 27, 2024

Here is a sample code and i am using windows 7. The code runs perfectly for about half of the pipes so am not sure about what triggers the error.

def get_error_list():
wnt = wntr.network.WaterNetworkModel(inp_file)
error_box,source_pipes = [],[]
pipes = wnt.link_name_list
sources = wnt.tank_name_list
sources.extend(wnt.reservoir_name_list)

if sources == []:
    raise no_sources   
source_pipes = [link for source in sources for link in wnt.get_links_for_node(str(source)) ]

for pipe in pipes:
    wnt = wntr.network.WaterNetworkModel(inp_file)
    
    if pipe not in source_pipes:
        
        try:
            wnt.remove_link(pipe)
            sim = wntr.sim.EpanetSimulator(wnt)     
            results = sim.run_sim()
            
           
        except Exception,e:  
            error_box.append(pipe)
            
return error_box,source_pipes

from wntr.

michaelbynum avatar michaelbynum commented on May 27, 2024

@dbhart Any thoughts? This seems odd to me.

from wntr.

michaelbynum avatar michaelbynum commented on May 27, 2024

@Tabznator We are having difficulty reproducing the error. Do you have the same problem with any of the example networks distributed with WNTR?

from wntr.

kaklise avatar kaklise commented on May 27, 2024

While we were not able to reproduce this error, we suspect that the issue has been resolved with the use of EPANET 2.2 in WNTR. If this is not the case, the issue can be reopened.

from wntr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.