First community release of the EPANET toolkit

It took us just over one year since the announcement of an open source EPANET initiative to release the first community version of the EPANET toolkit (the EPANET engine DLL). This is now version EPANET 2.1.

From the release note:

The last update to the EPANET engine was “Build 2.00.12” in February of 2008. Since that time, a community effort to update and extend the open-source code has emerged. This group has made a number of bug-fixes and API additions that help to improve the EPANET engine for everyone. Version 2.1 was released in July 2016, after 8.5 years.

The new functions (APIs) are:

  • ENgetaveragepatternvalue – Retrieve the average multiplier value in a time pattern
  • ENgetstatistic – Get hydraulic simulation statistic
  • ENgetcoord – Get coordinates (x,y) for a node
  • ENsetcoord – Set coordinates (x,y) for a node
  • ENgetpumptype – Get the type of pump
  • ENgetqualinfo – Get quality analysis information (type, chemical name, units, trace node ID)
  • ENgetnumdemands – Get the number of demand categories for a node
  • ENgetbasedemand – Get a node’s base demand for a specified category
  • ENsetbasedemand – Sets the node’s base demand for a category
  • ENgetdemandpattern – Get the index of the demand pattern assigned to a node for a category index
  • ENgetcurve – Get a curve’s properties
  • ENgetcurveid – Retrieves index of curve with specific ID
  • ENgetcurvelen – Retrieves number of points in a curve
  • ENgetcurvevalue – Retrieves number of points in a curve
  • ENsetcurvevalue – retrieves x,y point for a specific point number and curve
  • ENsetcurve – Sets x,y values for a specified curve
  • ENaddcurve – Adds a new curve appended to the end of the existing curves
  • ENgetheadcurveindex – Retrieves the curve index for a specified pump index
  • ENgetcurveindex – Retrieves index of curve with specific ID

Performance pmprovements, bug fixes, usage features and more:

  • API float type is a compile-time option with the EN_API_FLOAT_TYPE definition. Use either float or double – default if left undefined is float to maintain compatibility with 2.0.x
  • updated hash table algorithm
  • fixed memory leak when saving output
  • enables interleaved hydraulic and water quality analysis steps:

[c collapse=”false”]

ENopenH();
ENinitH(0);
ENinitQ(EN_NOSAVE);
do {
ENrunH(&t);
ENrunQ(&qt);
ENnextQ(&qstep);
// collect results
ENnextH(&tstep);
} while (tstep > 0);
ENcloseQ();
ENcloseH();

[/c]

  • engine code and command-line executable are now in separate implementation files
  • parameter #define directives are now enumerated values
  • main header now contains doxygen-compatible comment blocks for auto-generated documentation

Documentation available at wateranalytics.org/EPANET and pre-built binaries for Windows (32 and 64 bits), Mac and Linux can be found on GitHub.

Tagged with: , ,
8 comments on “First community release of the EPANET toolkit
  1. Fabrício says:

    Great New.
    Man, I’m New at epanet Simulator. I do work with simulation but I use others program languages.
    Does somebody knows about any other literature rather than toolkit doc that brings some implemantation examples?
    Thanks

  2. Amir Idris says:

    any thoughts to have EPanet for surge analysis as well

  3. Amir Idris says:

    I know EPanet is a public free software, what are the weaknesses of Epanet compared to the commercial ones.

    regards

  4. Mihail says:

    Guys is there any deadline for the developing of this project? When we can expect the final release? There is no information about the progress of the project on the Aqua Terra’s website.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.