{"id":3671,"date":"2016-10-27T10:24:29","date_gmt":"2016-10-27T07:24:29","guid":{"rendered":"http:\/\/www.water-simulation.com\/wsp\/?p=3671"},"modified":"2016-10-27T10:24:29","modified_gmt":"2016-10-27T07:24:29","slug":"first-community-release-of-the-epanet-toolkit","status":"publish","type":"post","link":"http:\/\/www.water-simulation.com\/wsp\/2016\/10\/27\/first-community-release-of-the-epanet-toolkit\/","title":{"rendered":"First community release of the EPANET toolkit"},"content":{"rendered":"<p>It took us just over one year since the <a href=\"http:\/\/www.water-simulation.com\/wsp\/2015\/06\/13\/announcement-of-an-open-source-epanet-initiative\/\">announcement of an open source EPANET initiative<\/a>\u00a0to release the first community version of the EPANET toolkit (the EPANET engine DLL). This is now version EPANET 2.1.<\/p>\n<p>From the <a href=\"http:\/\/wateranalytics.org\/EPANET\/release_2_1.html\">release note<\/a>:<\/p>\n<blockquote><p>The last update to the EPANET engine was &#8220;Build 2.00.12&#8221; 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.<\/p><\/blockquote>\n<p>The new functions (APIs) are:<\/p>\n<ul>\n<li>ENgetaveragepatternvalue &#8211;\u00a0Retrieve the average multiplier value in a time pattern<\/li>\n<li>ENgetstatistic &#8211;\u00a0Get hydraulic simulation statistic<\/li>\n<li>ENgetcoord &#8211;\u00a0Get coordinates (x,y) for a node<\/li>\n<li>ENsetcoord &#8211;\u00a0Set coordinates (x,y) for a node<\/li>\n<li>ENgetpumptype &#8211;\u00a0Get the type of pump<\/li>\n<li>ENgetqualinfo &#8211;\u00a0Get quality analysis information (type, chemical name, units, trace node ID)<\/li>\n<li>ENgetnumdemands &#8211;\u00a0Get the number of demand categories for a node<\/li>\n<li>ENgetbasedemand &#8211;\u00a0Get a node&#8217;s base demand for a specified category<\/li>\n<li>ENsetbasedemand &#8211;\u00a0Sets the node&#8217;s base demand for a category<\/li>\n<li>ENgetdemandpattern &#8211;\u00a0Get the index of the demand pattern assigned to a node for a category index<\/li>\n<li>ENgetcurve &#8211;\u00a0Get a curve&#8217;s properties<\/li>\n<li>ENgetcurveid &#8211;\u00a0Retrieves index of curve with specific ID<\/li>\n<li>ENgetcurvelen &#8211;\u00a0Retrieves number of points in a curve<\/li>\n<li>ENgetcurvevalue &#8211;\u00a0Retrieves number of points in a curve<\/li>\n<li>ENsetcurvevalue &#8211;\u00a0retrieves x,y point for a specific point number and curve<\/li>\n<li>ENsetcurve &#8211;\u00a0Sets x,y values for a specified curve<\/li>\n<li>ENaddcurve &#8211;\u00a0Adds a new curve appended to the end of the existing curves<\/li>\n<li>ENgetheadcurveindex &#8211;\u00a0Retrieves the curve index for a specified pump index<\/li>\n<li>ENgetcurveindex &#8211;\u00a0Retrieves index of curve with specific ID<\/li>\n<\/ul>\n<p>Performance pmprovements, bug fixes, usage features and\u00a0more:<\/p>\n<ul>\n<li>API float type is a compile-time option with the EN_API_FLOAT_TYPE definition. Use either <em>float<\/em> or <em>double<\/em> &#8211; default if left undefined is <em>float<\/em> to maintain compatibility with 2.0.x<\/li>\n<li>updated hash table algorithm<\/li>\n<li>fixed memory leak when saving output<\/li>\n<li>enables interleaved hydraulic and water quality analysis steps:<\/li>\n<\/ul>\n<p>[c collapse=&#8221;false&#8221;]<\/p>\n<p>ENopenH();<br \/>\nENinitH(0);<br \/>\nENinitQ(EN_NOSAVE);<br \/>\ndo {<br \/>\n    ENrunH(&amp;t);<br \/>\n    ENrunQ(&amp;qt);<br \/>\n    ENnextQ(&amp;qstep);<br \/>\n    \/\/ collect results<br \/>\n    ENnextH(&amp;tstep);<br \/>\n   } while (tstep &gt; 0);<br \/>\nENcloseQ();<br \/>\nENcloseH();<\/p>\n<p>[\/c]<\/p>\n<ul>\n<li>engine code and command-line executable are now in separate implementation files<\/li>\n<li>parameter #define directives are now enumerated values<\/li>\n<li>main header now contains doxygen-compatible comment blocks for auto-generated documentation<\/li>\n<\/ul>\n<p>Documentation available at <a href=\"http:\/\/www.wateranalytics.org\/EPANET\">wateranalytics.org\/EPANET<\/a> and pre-built binaries for Windows (32 and 64 bits), Mac and Linux can be found\u00a0on <a href=\"https:\/\/github.com\/OpenWaterAnalytics\/EPANET\/releases\/tag\/v2.1\">GitHub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It took us just over one year since the announcement of an open source EPANET initiative\u00a0to 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 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.water-simulation.com\/wsp\/2016\/10\/27\/first-community-release-of-the-epanet-toolkit\/\"> <span class=\"screen-reader-text\">First community release of the EPANET toolkit<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,8,7,2],"tags":[235,81,60],"class_list":["post-3671","post","type-post","status-publish","format-standard","hentry","category-announcements","category-epanet-related","category-programming","category-water-simulation-packages","tag-community","tag-epanet","tag-open-source"],"_links":{"self":[{"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/posts\/3671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/comments?post=3671"}],"version-history":[{"count":2,"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/posts\/3671\/revisions"}],"predecessor-version":[{"id":3684,"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/posts\/3671\/revisions\/3684"}],"wp:attachment":[{"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/media?parent=3671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/categories?post=3671"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/tags?post=3671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}