{"id":647,"date":"2010-09-26T20:14:43","date_gmt":"2010-09-26T17:14:43","guid":{"rendered":"http:\/\/www.water-simulation.com\/wsp\/?p=647"},"modified":"2010-09-27T20:13:58","modified_gmt":"2010-09-27T17:13:58","slug":"the-future-of-epanet","status":"publish","type":"post","link":"http:\/\/www.water-simulation.com\/wsp\/2010\/09\/26\/the-future-of-epanet\/","title":{"rendered":"The future of EPANet"},"content":{"rendered":"<p><a title=\"EPANet 3\" href=\"http:\/\/www.water-simulation.com\/wsp\/2010\/09\/21\/epanet-3\/\">EPANet 3<\/a> is due sometime next year and it will probably be the last version supported by the US EPA. Last year,\u00a0a proposal was made at the 2009 EWRI\u00a0conference in Kansas City to establish an Open Source Project for EPANet. About two weeks ago, at the <a title=\"WDSA 2010\" href=\"http:\/\/wdsa2010.org\">WDSA 2010<\/a> conference held in the Tucson AZ, Lew Rossman and Kobus van Zyl raised the issue again. During the conference I talked with a few people and got a few opinions, all of them\u00a0positive\u00a0I must say. There are a number of issues that needs to be resolved before this kind of project is initiated and in this post I will try to present my views.<\/p>\n<div id=\"attachment_649\" style=\"width: 464px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.water-simulation.com\/wsp\/wp-content\/uploads\/2010\/09\/kobus-van-syl-wdsa-2010.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-649\" class=\"size-full wp-image-649\" title=\"kobus-van-syl-wdsa-2010\" src=\"http:\/\/www.water-simulation.com\/wsp\/wp-content\/uploads\/2010\/09\/kobus-van-syl-wdsa-2010.jpg\" alt=\"Kobus van Zyl at WDSA 2010\" width=\"454\" height=\"338\" \/><\/a><p id=\"caption-attachment-649\" class=\"wp-caption-text\">Kobus van Zyl at WDSA 2010<\/p><\/div>\n<p>I&#8217;m all for\u00a0open source as I have been involved for a few year now with an open source project called <a title=\"WordPress\" href=\"http:\/\/www.wordpress.org\">WordPress<\/a>. WordPress is the software that runs this blog and it is used by millions of people all around the world. I have been a part of the Israeli WordPress\u00a0community\u00a0by contributing some\u00a0patches\u00a0and helping with localization. Earlier this month we held the third WordPress user conference in Israel called <a href=\"http:\/\/wordcampjerusalem.com\/en\/\">WordCamp<\/a>. All is done by\u00a0volunteers\u00a0for the community.<\/p>\n<h2><strong>What is Open Source?<\/strong><\/h2>\n<p>Many people think of open source, or free software, as a matter of price, a software that is given for free. \u00a0Actually it has nothing to do with price but with liberty. To understand the concept, one should think of &#8220;free&#8221; as in &#8220;free speech&#8221;, not as in &#8220;free beer&#8221;. Usually it is said that users should have four essential freedoms (source:\u00a0<a title=\"The Free Software Definition\" href=\"http:\/\/www.gnu.org\/philosophy\/free-sw.html\">The free software definition<\/a>):<\/p>\n<ul>\n<li>The freedom to run the program, for any purpose (freedom 0).<\/li>\n<li>The freedom to study how the program works, and change it to make it do what you wish (freedom 1). Access to the source code is a precondition for this.<\/li>\n<li>The freedom to redistribute copies so you can help your neighbor (freedom 2).<\/li>\n<li>The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.<\/li>\n<\/ul>\n<h2><strong>Organization<\/strong><\/h2>\n<p>An open source project is usually managed online over the Internet and is started with a small group of people that expands as time goes by. The community is self-organizing with almost no official organization. The most common case is that the majority of the community are users and not contributers. The group of contributers divide between core developers, beta-testers, documenters and many people who reports bugs and make suggestions. In most cases, the small core team have the final word regarding what will go in the program and what will not. In the case in which part of the community thinks differently than the core team they may create a &#8220;fork&#8221; and form a new project (remember\u00a0that its open source and anyone has the right to do so). However, this is a rare case as the threat of &#8220;<strong>forkability<\/strong>&#8221; is one of the things which holds the community together (<a title=\"Producing Open Source Software\" href=\"http:\/\/my.safaribooksonline.com\/0596007590\/producingoss-CHP-4-SECT-1\">Producing Open Source Software by Karl Fogel<\/a>):<\/p>\n<blockquote>\n<div id=\"_mcePaste\">The indispensable ingredient that binds developers together on a free software project, and makes them willing to compromise when necessary, is the code\u2019s forkability: the ability of anyone to take a copy of the source code and use it to start a\u00a0competing project, known as a fork. The paradoxical thing is that the possibility of\u00a0forks is usually a much greater force in free software projects than actual forks, which\u00a0are very rare. Because a fork is bad for everyone, the more serious the threat of a fork becomes, the more willing people are to compromise to avoid it.<\/div>\n<\/blockquote>\n<p>In many cases there is one person who holds the &#8220;keys&#8221; for the project. Since the project is managed online it &#8220;lives&#8221; on a web server. Currently EPANet is hosted on the EPA&#8217;s servers and they control it. When the project will move to a new &#8220;home&#8221; it will be hosted on a different server which is controlled by some else. At any given time there is only one entity that controls a server. But, no worries.\u00a0Remember\u00a0forkability?<\/p>\n<h2>A few technicalities<\/h2>\n<p>A project is hosted on a web site that should include at least two elements: a version control tool to allow\u00a0management\u00a0of the source code and a bug tracking tool. The tools that the WordPress project uses are\u00a0<a title=\"trac\" href=\"http:\/\/trac.edgewall.org\/\">trac<\/a> and <a title=\"SVN\" href=\"http:\/\/subversion.apache.org\/\">SVN<\/a> which are also open source projects. These are self-hosted tools but there are many <a title=\"Comparison of open source software hosting facilities\" href=\"http:\/\/en.wikipedia.org\/wiki\/Comparison_of_open_source_software_hosting_facilities\">hosted services<\/a> like <a href=\"http:\/\/sourceforge.net\/\">SourceForge<\/a> and <a title=\"Google Code\" href=\"http:\/\/code.google.com\/\">Google Code<\/a> which ease the project&#8217;s\u00a0management\u00a0burdens. To get an idea of what these systems offer look at WordPress <a href=\"http:\/\/core.trac.wordpress.org\/browser\/tags\">versions page<\/a>, the software <a href=\"http:\/\/core.trac.wordpress.org\/timeline\">timeline<\/a>, the <a href=\"http:\/\/core.trac.wordpress.org\/report\">bugs tickets<\/a> and\u00a0a small <a href=\"http:\/\/core.trac.wordpress.org\/changeset\/15658\">change<\/a> to the code. In addition to these two tools the community may use a mailing list, support forums, chat rooms, IRC and even, god forbid, face-to-face meetings.<\/p>\n<p>Using a self-hosted solution allows more control on everything. However, <strong>with\u00a0authority comes responsibility<\/strong>. For the self-hosted option the project will need someone to manage the hosting server, keep all software updated, make backups and more. This is a\u00a0responsibility\u00a0and also comes with a cost. I think that the EPANet project should start with a hosted solution like Google Code and if\\when it grows the community may consider moving to the self-hosted option.<\/p>\n<h2>Scope of the software<\/h2>\n<p>EPANet is not very different from other projects. Lew reveled that in the first 8 month of 2010 EPANet was downloaded about 20,000 times! What we can learn from this number is that the vast majority of EPANet users are people who use EPANet&#8217;s graphical user interface (GUI) and not software developers who uses the programmer&#8217;s toolkit or directly use the source code. EPANet is somewhat unique in the fact that it is built from two sub-programs: the hydraulic\\quality engine and the GUI. While the first component is most important mainly to the research community the latter is used by most of the program users.\u00a0I think that EPANet, as an open source project, must include both components (engine and GUI).<\/p>\n<h2>License<\/h2>\n<p>EPANet was developed by the US EPA. As such, it is a public domain software that may be freely copied and distributed. In other words there is absolutely no ownership. As strange as it may sound, anyone may download the program and sell it as it is. Yes, that&#8217;s right, sell it. However, open source is not about money, its about liberty (as explained above).<\/p>\n<p>Each open source project usually have a license and there are <a title=\"Licenses by Name\" href=\"http:\/\/www.opensource.org\/licenses\/alphabetical\">plenty<\/a> of them. There are a few licenses that are popular and widely used or with strong communities:\u00a0<a href=\"http:\/\/www.opensource.org\/licenses\/apache2.0.php\">Apache<\/a>, <a href=\"http:\/\/www.opensource.org\/licenses\/bsd-license.php\">BSD<\/a>, <a href=\"http:\/\/www.opensource.org\/licenses\/gpl-license.php\">GPL<\/a>, <a href=\"http:\/\/www.opensource.org\/licenses\/lgpl-license.php\">LGPL<\/a>, <a href=\"http:\/\/www.opensource.org\/licenses\/mit-license.php\">MIT<\/a> and a few more. There is no need to go into each of them and explain the differences as in our case it is enough to\u00a0consider\u00a0the GPL and MIT licenses. The MIT license is one of the most simple ones. It actually states that anyone is\u00a0entitled\u00a0to do whatever they want with the software with the\u00a0exception\u00a0that the\u00a0authors\u00a0can&#8217;t be held\u00a0liable\u00a0in any case. The GPL license is much more complicated but the main difference is that when one redistribute the program, or any\u00a0derivative\u00a0of the program, he must do that under the same license. For example, let us consider the case that one would add a new feature to EPANet, like a new valve type, compile the code and sells it to a third party. In both licenses he has the right to do so. However, with GPL, since the new software is a\u00a0derivative\u00a0of the original, it is also\u00a0licensed\u00a0under GPL. And according to the license the third party must be granted the right to change the code and redistribute it thus he must have access to the source code. I guess that by now you understand the main difference: it would be difficult to sell\u00a0proprietary software based on a GPLed license EPANet.<\/p>\n<p>If the community would like to allow\u00a0proprietary software based on EPANet then the MIT license is the way to go. While I was in Tucson I had a chat with a few people on this subject. Some, mainly from the academic research community, said that they would not feel right contributing to the project if commercial companies would be able to make money from their work and not give back to the community. Unfortunately I didn&#8217;t have the time to discuss this subject with the\u00a0corporate\u00a0people but I will try to get their response. I&#8217;m not a lawyer but there are\u00a0legal\u00a0and practical ways around this. I think that the project should start with the MIT license and see what understanding may be\u00a0achieved later on\u00a0with the big companies.<\/p>\n<h2>The case of CWSNet<\/h2>\n<p>A few days before the WDSA 2010 conference Dragan Savic\u00a0announced via the EPANet user&#8217;s list the\u00a0availability\u00a0of a new\u00a0open-source, object oriented, library for water distribution system modelling named <a title=\"CWSNet\" href=\"http:\/\/centres.exeter.ac.uk\/cws\/technology\/cwsnet-library\">CWSNet<\/a>. Zoran Kapelan presented the library at the conference and it seems that it performs very similarly to EPANet but still somewhat slower with large networks. The main advantage of CWSNet is the fact that is object oriented and simplifies the understanding of the code. An example given by the CWSNet authors to show the need for an object oriented library has to do with\u00a0matrix representation:<\/p>\n<blockquote><p>Another problem in the design of EPANET is that the items that are used in various parts of the hydraulic\u00a0computation (such as the matrix representation) do not have a specific interface. For example, the matrix\u00a0that represents the linear systems of equations is accessed directly by the various methods, i.e. these\u00a0methods know how the matrix is represented in the memory. Therefore, if a programmer needs to change\u00a0the internal representation of the matrix, he or she needs to change all the methods that interact with it.<\/p><\/blockquote>\n<p>I think that in the long run it would be better if EPANet would be object oriented so the understanding of the code would be much more simple and it would be easy to replace software\u00a0components. This structure have an additional benefit license wise, as it would be much more\u00a0easier\u00a0to include GPLed components in the MIT licensed project. Don&#8217;t get me wrong, I think Lew&#8217;s code is brilliant. I still use code snippets from the Visual Basic version on EPANet 1.0.<\/p>\n<div id=\"attachment_680\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.water-simulation.com\/wsp\/wp-content\/uploads\/2010\/09\/cwsnet-authors.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-680\" class=\"size-full wp-image-680 \" title=\"cwsnet-authors\" src=\"http:\/\/www.water-simulation.com\/wsp\/wp-content\/uploads\/2010\/09\/cwsnet-authors.jpg\" alt=\"CWSNet awarded at WDSA 2010\" width=\"400\" height=\"300\" \/><\/a><p id=\"caption-attachment-680\" class=\"wp-caption-text\">CWSNet awarded at WDSA 2010<\/p><\/div>\n<p>The introduction of CWSNet, a few days before the conference, seemed to spark a debate among the participants. At one moment it looked like its the\u00a0Europeans\u00a0against the Americans. I may got it wring but as I understand it, Lew wants to stay with the current structure for EPANet and not move to an object oriented\u00a0structure. I think that for version 3.0 this is the way to go as CWSNet is still young, hadn&#8217;t been tested and used by the community and currently does not include the water quality engine nor the GUI. A lot of work is needed to bring it to where EPANet currently stands. Once version 3.0 is released and the community takes over a process should be made to merge the work done in CWSNet into the project.<\/p>\n<h2>How to proceed?<\/h2>\n<p>It may take up to one year for EPANet 3.0 to be released and I have no\u00a0doubt\u00a0that the open source project should officially start from that point. However, things may be done in the meanwhile. It is up to the US EPA and Lew Rossman to decide what will be included in version 3.0 and hope this decision would be made soon. Another decision is what will be the GUI development environment &#8211; Java or C# (my\u00a0impression\u00a0was that it&#8217;s going to be Java).<\/p>\n<p>Once these decisions are made I hope Lew will be able to release an <em>alpha<\/em> version as soon as\u00a0possible.\u00a0It does not really matter how raw is this version and how many bugs there are.\u00a0This alpha version is not to be used by the general public but should be used to set up the open source development environment (Google Code would make a good option). Once the environment is set up people from all over the world could start and learn how to work with it. How to make suggestions, report bugs, suggest code patches and more. If Lew could release also a\u00a0<em>beta<\/em> version it would be even better. After the final release of version 3.0 the new code would be uploaded and the community will take it from there.<\/p>\n<h2>Conclusions<\/h2>\n<ul>\n<li>The EPANet\u00a0project should start with a hosted solution like Google Code.<\/li>\n<li>The project must include the core engine and the GUI.<\/li>\n<li>At first the MIT license should be selected.<\/li>\n<li>Jim Uber suggested that a new name will be selected for the project. This is an option but the community must make sure that the fiasco of the <a href=\"http:\/\/www.water-simulation.com\/wsp\/2007\/03\/07\/epanetcom-what-is-it\/\">epanet.com<\/a> domain name will not return.<\/li>\n<li>Object oriented structure should be introduced in steps using the work done with CWSNet once the open source project gets going.<\/li>\n<li>An <em>alpha<\/em> version of EPANet 3.0 is essential to set up the open source environment.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>EPANet 3 is due sometime next year and it will probably be the last version supported by the US EPA. Last year,\u00a0a proposal was made at the 2009 EWRI\u00a0conference in Kansas City to establish an Open Source Project for EPANet. &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.water-simulation.com\/wsp\/2010\/09\/26\/the-future-of-epanet\/\"> <span class=\"screen-reader-text\">The future of EPANet<\/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":[8],"tags":[17,112,111,60,78],"class_list":["post-647","post","type-post","status-publish","format-standard","hentry","category-epanet-related","tag-features","tag-gpl","tag-mit","tag-open-source","tag-wdsa"],"_links":{"self":[{"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/posts\/647","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=647"}],"version-history":[{"count":2,"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/posts\/647\/revisions"}],"predecessor-version":[{"id":688,"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/posts\/647\/revisions\/688"}],"wp:attachment":[{"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/media?parent=647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/categories?post=647"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.water-simulation.com\/wsp\/wp-json\/wp\/v2\/tags?post=647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}