Skip to content

Development Repository for the object-oriented implementation of EPANET

License

Notifications You must be signed in to change notification settings

hxyan/epanet-dev

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

epanet-dev

This is a collaborative project to develop a new version of the EPANET computational engine for analyzing water distribution systems.

Introduction

The last major update to EPANET, version 2.0, was made in 2000. Since that time many new advances in water distribution system modeling and suggestions for improving EPANET have been made. This project seeks to develop a new version of the EPANET computational engine and its associated API that includes many of these advances and improvements. It is currently using EPANET 3 as its working title. Written in C++, it employs an object oriented approach that allows the code to be more modular, extensible, and easier to maintain.

EPANET 2 was originally developed by the U.S. Environmental Protection Agency (USEPA) and placed in the public domain. The new version being developed by this project represents an independent effort that is part of the Open Source EPANET Initiative and is neither supported nor endorsed by USEPA.

Building & Installation

The source code can be compiled as a static or shared library, and a command-line application is included as well. Any C++ compiler that supports the C++11 language standard can be used.

To build using CMake on Linux/Mac:

mkdir build && cd build
cmake .. && make
cd bin
./run-epanet3 input.inp report.txt

Windows & Visual Studio

To build using CMake on Windows, make sure that CMake is installed and accessible from the system PATH. Typing cmake at a command prompt should result in a message from the program and not an error like " 'cmake' is not recognized ...". By default, CMake uses the latest version of Visual Studio to build projects on Windows. Visual Studio 2015 does not install C++ development tools by default. Instructions for adding them are here. To build the project, open a developer command prompt for VS 2015, navigate to the project root directory, and follow the commands:

mkdir build && cd build
cmake .. 
msbuild /p:Configuration=Release ALL_BUILD.vcxproj
cd bin\Release
run-epanet3 input.inp report.txt

Windows & MSYS

To build using CMake on Windows, make sure that the programs CMake, make and the g++ C++ compiler are installed and accessible from your system PATH. The compiler is available as part of MinGW which can be installed with MSYS. Typing cmake, make, and g++ at a command prompt should result in a message from each program rather than an error like " 'make' is not recognized ...". Building on windows then follows almost the same steps as for Linux/Mac:

mkdir build && cd build
cmake -G "MSYS Makefiles" .. && make
cd bin
run-epanet3 input.inp report.txt

API Reference

The EPANET 3 API has a similar flavor to version 2, but all of the functions have been re-named and require that an EPANET project first be created and included as an argument in all function calls. (This makes the API capable of analyzing several projects in parallel in a thread safe manner.) EPANET 3 is able to read EPANET 2 input files but uses a different layout for its binary results file. Thus it will not be compatible with the current EPANET 2 GUI. Details of the API, including the changes and additions made to various computational components of EPANET, can be found in the 'docs' section of this repository.

You can access the full documentation at wateranalytics.org/epanet-dev.

License

The new version of EPANET will be distributed under the MIT license as described in the LICENSE file of this repository.

About

Development Repository for the object-oriented implementation of EPANET

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.4%
  • C 1.9%
  • CMake 0.7%