killoinspired.blogg.se

Epanet for windows 10
Epanet for windows 10







epanet for windows 10
  1. EPANET FOR WINDOWS 10 HOW TO
  2. EPANET FOR WINDOWS 10 MAC OS X
  3. EPANET FOR WINDOWS 10 CODE

In practice, the differences would reflect unique conditions for each resilience scenario.įor each simulation, the water network model must be a unique model object to avoid thread conflicts. To make each simulation different, the simulation duration is changed for each new simulation.

EPANET FOR WINDOWS 10 CODE

The example code below runs five simulations in a multi-threaded manner. """Run the EPANET simulator on a water network and store results.""" The first step is to load the Python packages that are needed for this example and create a water network model. Note that the EPANET 2.0 library was not written to be "thread-safe" (i.e., it does not allow simultaneous use of the library by multiple threads).įor that reason, the EpanetSimulator must use EPANET 2.2 (which is the default). The WNTRSimulator can also be used in a similar way.

EPANET FOR WINDOWS 10 HOW TO

The following example shows how to use the EpanetSimulator in a multi-threaded manner. The standard Python library documentation. The interpreter process is shared among threads, and libraries are only loaded once.įor more details on how to use threading, see the threading module in Threads are a "lightweight" method of parallel processing.

EPANET FOR WINDOWS 10 MAC OS X

Some examples include the multiprocessing Python package, the threading Python package, and Message Passing Interface (MPI) libraries.īecause the threading Python package works with Windows, Linux, and Mac OS X operating systems, it is used in the examples below. The user's operating system and hardware will determine which packages can be used. Many different parallelization methods and packages are available to Python users.

epanet for windows 10

This independence allows for parallelization and the use of multiple processors, which can significantly reduce the time it takes to run an analysis. Since individual disaster scenarios are typically independent, they can be simulated separately. Of a pipe leak scenario where the location and duration are drawn from probability > print( selected_pipes) # doctest: +SKIPĪ stochastic simulation example provided with WNTR runs multiple realizations choice( pipe_names, N, replace = False, p = failure_probability)) > import numpy as np # doctest: +SKIP > pipe_names = This information can be used within WNTR to simulate stochastic pipe failure. The Python packages NumPy and SciPy include statistical distributions and random selection methods that can be used for stochasticįor example, the following code uses the NumPy method random.choice to select two unique pipes from a list of four pipesīased on a failure probability of each pipe. State on a component, as described in the Section on :ref:`fragility_curves`.

epanet for windows 10

Scenarios that are defined using failure probabilities or distributions.įor disaster scenarios, the location, duration, and severity of different types of incidentsĬan often be drawn from distributions and included in the simulation in a stochastic manner.ĭistributions can be a function of component properties (i.e., age, material) orįragility curves are a common way to include stochasticity in the damage Stochastic simulations is often used to evaluate an ensemble of hydraulic and/or water quality In contrast to deterministic or enumeration of every possible scenario, This section describes several advanced simulation techniques using WNTR.









Epanet for windows 10