From 2d064c60ece7759bc78b0e17563cbfe60c67d2ae Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Fri, 12 Jun 2015 10:34:06 -0400 Subject: [PATCH 001/120] build files --- build/Linux/Makefile | 108 ------------- build/Linux/Makefile_Rev | 111 ------------- build/MSVS/LemonTigerJ.sln | 20 --- build/MSVS/LemonTigerJ.vcxproj | 105 ------------ build/WinSDK/Readme.txt | 17 ++ build/WinSDK/dll_win_make.bat | 11 ++ build/WinSDK/exe_win_make.bat | 11 ++ .../epanet.xcodeproj/project.pbxproj | 151 +++++++----------- .../contents.xcworkspacedata | 7 - 9 files changed, 98 insertions(+), 443 deletions(-) delete mode 100755 build/Linux/Makefile delete mode 100755 build/Linux/Makefile_Rev delete mode 100755 build/MSVS/LemonTigerJ.sln delete mode 100755 build/MSVS/LemonTigerJ.vcxproj create mode 100644 build/WinSDK/Readme.txt create mode 100644 build/WinSDK/dll_win_make.bat create mode 100644 build/WinSDK/exe_win_make.bat rename build/Xcode/{epanet => }/epanet.xcodeproj/project.pbxproj (79%) delete mode 100755 build/Xcode/epanet/epanet.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/build/Linux/Makefile b/build/Linux/Makefile deleted file mode 100755 index d08b6df..0000000 --- a/build/Linux/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# Linux Makefile for EPANET - -# This will build EPANET as a shared object library -# (libepanet2.so) under Linux/Unix, and a standalone -# executable (epanet2). - -# The following targets are defined: -# make -# -Builds libepanet2.so, epanet2 -# make install -# -Creates shell wrapper runepanet2.sh that executes epanet2. -# The runepanet2.sh wrapper simply exports -# environment variables that help locate the runtime library, -# allowing you to specify your own library locations. -# -Installs epanet2 and runepanet2.sh -# in /bin, where defaults to ~ (and can be set -# below to something different - see "Install directories") -# -Installs libepanet2.so in /lib -# -Installs epanet2.h in /include. This is the required -# header file for the EPANET programmer's toolkit, and thus -# /include should be on your CPP include search path -# for subsequent use of the toolkit and linking with the -# library libepanet2.so -# make clean -# -Removes object and library files, returning the build directory -# to its pristine state. - -# You may wish to change the install path 'prefix', -# or the compiler flags, but these defaults should be fine. - -SHELL = /bin/sh - -# Target filenames -epanetrootname := epanet2 -libname := lib$(epanetrootname).so -exename := $(epanetrootname) -# Shell wrapper -runcmdtemplate = runepanet.sh.template -runcmdname = runepanet2.sh -# Location of EPANET toolkit includes -epanetincludedir = ../../include -# Search path for sources -epanetsrcdir = ../../src -VPATH = $(epanetsrcdir):$(epanetincludedir) - -# Install directories -prefix = ~ -exec_prefix = $(prefix) -libdir = $(exec_prefix)/lib -bindir = $(exec_prefix)/bin -includedir = $(prefix)/include -datarootdir = $(prefix)/share -docdir = $(datarootdir)/doc/epanet - -# Compiler and flags -CC = gcc -CFLAGS = -g -O3 -fPIC -CPPFLAGS = -I $(epanetincludedir) -LDFLAGS = -L . -Wl,-rpath,$(libdir) -lm - -# Installer -INSTALL = install -INSTALL_PROGRAM = $(INSTALL) -INSTALL_DATA = $(INSTALL) -m 644 - -# Files for the shared object library -epanet_objs=hash.o hydraul.o inpfile.o input1.o input2.o \ - input3.o mempool.o output.o quality.o report.o \ - rules.o smatrix.o -# Epanet header files -epanet_heads=enumstxt.h funcs.h hash.h mempool.h text.h toolkit.h types.h vars.h -# Epanet main program -epanet_main=epanet -# Epanet main program header files -epanet_main_heads=epanet2.h - -.PHONY: all -all: $(libname) $(exename) - -$(libname): $(epanet_objs) - $(CC) $(CFLAGS) $(CPPFLAGS) -D SOL -c $(epanetsrcdir)/$(epanet_main).c - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $(epanet_main).o $^ - -$(exename): $(libname) $(epanet_main_heads) - $(CC) $(CFLAGS) $(CPPFLAGS) -D CLE -c $(epanetsrcdir)/$(epanet_main).c - $(CC) $(CFLAGS) -o $@ $(epanet_main).o -l$(epanetrootname) $(LDFLAGS) - -$(epanet_objs): $(epanet_heads) - -.PHONY: install -install: - cat $(runcmdtemplate) | sed 's|libdir|$(libdir)|' \ - | sed 's|exename|$(bindir)/$(exename)|' \ - > $(runcmdname) - $(INSTALL_PROGRAM) -D $(exename) $(bindir)/$(exename) - $(INSTALL_PROGRAM) -D $(libname) $(libdir)/$(libname) - $(INSTALL_DATA) -D $(epanetincludedir)/epanet2.h $(includedir)/epanet2.h - $(INSTALL_PROGRAM) -D $(runcmdname) $(bindir)/$(runcmdname) - -.PHONY: uninstall -uninstall: - -.PHONY: check -check: - -.PHONY: clean -clean: - -/bin/rm *.o $(libname) $(exename) $(runcmdname) diff --git a/build/Linux/Makefile_Rev b/build/Linux/Makefile_Rev deleted file mode 100755 index 488e471..0000000 --- a/build/Linux/Makefile_Rev +++ /dev/null @@ -1,111 +0,0 @@ -# Linux Makefile for EPANET - -# This will build EPANET as a shared object library -# (libepanet_gcc_.so) under Linux/Unix, and a standalone -# executable (epanet_gcc_). - -# The following targets are defined: -# make -# -Builds libepanet_gcc_.so, epanet_gcc_ -# make install -# -Creates shell wrapper runepanet_.sh that executes epanet_gcc_.exe. -# The runepanet_.sh wrapper simply exports -# environment variables that help locate the runtime library, -# allowing you to specify your own library locations. -# -Installs epanet_gcc_ and runepanet_.sh -# in /bin, where defaults to ~ (and can be set -# below to something different - see "Install directories") -# -Installs libepanet_gcc_.so in /lib -# -Installs epanet2.h in /include. This is the required -# header file for the EPANET programmer's toolkit, and thus -# /include should be on your CPP include search path -# for subsequent use of the toolkit and linking with the -# library libepanet_gcc_.so -# make clean -# -Removes object and library files, returning the build directory -# to its pristine state. - -# You may wish to change the install path 'prefix', -# or the compiler flags, but these defaults should be fine. - -SHELL = /bin/sh - -# Target filenames -# svnname.sh constructs a name: -# where is the atomic revision number of the svn repo. -epanetsvnpath = ../../.. -epanetrootname := $(shell ../svnname.sh $(epanetsvnpath) "" epanet_gcc_ "") -libname := lib$(epanetrootname).so -exename := $(epanetrootname) -# Shell wrapper -runcmdtemplate = runepanet.sh.template -runcmdname = $(shell ../svnname.sh $(epanetsvnpath) "" runepanet_ .sh) -# Location of EPANET toolkit includes -epanetincludedir = ../../include -# Search path for sources -epanetsrcdir = ../../src -VPATH = $(epanetsrcdir):$(epanetincludedir) - -# Install directories -prefix = ~ -exec_prefix = $(prefix) -libdir = $(exec_prefix)/lib -bindir = $(exec_prefix)/bin -includedir = $(prefix)/include -datarootdir = $(prefix)/share -docdir = $(datarootdir)/doc/epanet - -# Compiler and flags -CC = gcc -CFLAGS = -g -O3 -fPIC -CPPFLAGS = -I $(epanetincludedir) -LDFLAGS = -L . -Wl,-rpath,$(libdir) -lm - -# Installer -INSTALL = install -INSTALL_PROGRAM = $(INSTALL) -INSTALL_DATA = $(INSTALL) -m 644 - -# Files for the shared object library -epanet_objs=hash.o hydraul.o inpfile.o input1.o input2.o \ - input3.o mempool.o output.o quality.o report.o \ - rules.o smatrix.o -# Epanet header files -epanet_heads=enumstxt.h funcs.h hash.h mempool.h text.h toolkit.h types.h vars.h -# Epanet main program -epanet_main=epanet -# Epanet main program header files -epanet_main_heads=epanet2.h - -.PHONY: all -all: $(libname) $(exename) - -$(libname): $(epanet_objs) - $(CC) $(CFLAGS) $(CPPFLAGS) -D SOL -c $(epanetsrcdir)/$(epanet_main).c - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $(epanet_main).o $^ - -$(exename): $(libname) $(epanet_main_heads) - $(CC) $(CFLAGS) $(CPPFLAGS) -D CLE -c $(epanetsrcdir)/$(epanet_main).c - $(CC) $(CFLAGS) -o $@ $(epanet_main).o -l$(epanetrootname) $(LDFLAGS) - -$(epanet_objs): $(epanet_heads) - -.PHONY: install -install: - cat $(runcmdtemplate) | sed 's|libdir|$(libdir)|' \ - | sed 's|exename|$(bindir)/$(exename)|' \ - > $(runcmdname) - $(INSTALL_PROGRAM) -D $(exename) $(bindir)/$(exename) - $(INSTALL_PROGRAM) -D $(libname) $(libdir)/$(libname) - $(INSTALL_DATA) -D $(epanetincludedir)/epanet2.h $(includedir)/epanet2.h - $(INSTALL_PROGRAM) -D $(runcmdname) $(bindir)/$(runcmdname) - -.PHONY: uninstall -uninstall: - -.PHONY: check -check: - -.PHONY: clean -clean: - -/bin/rm *.o $(libname) $(exename) $(runcmdname) diff --git a/build/MSVS/LemonTigerJ.sln b/build/MSVS/LemonTigerJ.sln deleted file mode 100755 index f61001a..0000000 --- a/build/MSVS/LemonTigerJ.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LemonTigerJ", "LemonTigerJ.vcxproj", "{4B66D9F0-407B-4995-B625-1CA1B72662C6}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4B66D9F0-407B-4995-B625-1CA1B72662C6}.Debug|Win32.ActiveCfg = Debug|Win32 - {4B66D9F0-407B-4995-B625-1CA1B72662C6}.Debug|Win32.Build.0 = Debug|Win32 - {4B66D9F0-407B-4995-B625-1CA1B72662C6}.Release|Win32.ActiveCfg = Release|Win32 - {4B66D9F0-407B-4995-B625-1CA1B72662C6}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/build/MSVS/LemonTigerJ.vcxproj b/build/MSVS/LemonTigerJ.vcxproj deleted file mode 100755 index 7ffa87b..0000000 --- a/build/MSVS/LemonTigerJ.vcxproj +++ /dev/null @@ -1,105 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {4B66D9F0-407B-4995-B625-1CA1B72662C6} - Win32Proj - - - - DynamicLibrary - true - v110 - - - Application - false - v110 - - - - - - - - - - - - - true - - - true - - - - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS - MultiThreadedDebugDLL - Level3 - ProgramDatabase - Disabled - .\include - - - MachineX86 - true - Console - - - - - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDLL - Level3 - ProgramDatabase - - - MachineX86 - true - Console - true - true - - - - - - \ No newline at end of file diff --git a/build/WinSDK/Readme.txt b/build/WinSDK/Readme.txt new file mode 100644 index 0000000..c7d5f1c --- /dev/null +++ b/build/WinSDK/Readme.txt @@ -0,0 +1,17 @@ +For compiling EPANET2.DLL : + +Open the EPANET.C file and make sure that the line + #define DLL + is not commented out while the lines + #define CLE + #define SOL + are commented out. + +For compiling EPANET2.EXE : + +Open the EPANET.C file and make sure that the line + #define CLE + is not commented out while the lines + #define DLL + #define SOL + are commented out. diff --git a/build/WinSDK/dll_win_make.bat b/build/WinSDK/dll_win_make.bat new file mode 100644 index 0000000..611b64f --- /dev/null +++ b/build/WinSDK/dll_win_make.bat @@ -0,0 +1,11 @@ +rem : set path to Windows SDK +SET SDK_PATH="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\" + +rem : set path for source EPANET files +SET SRC_PATH="D:\Projects\EPANET\Open Source\Code\owa\EPANET\src" + +CALL %SDK_PATH%SetEnv.cmd /x86 /release +CHDIR /D %SRC_PATH% + +rem : do the magic ... +cl -o epanet2.dll epanet.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /link /DLL /def:epanet2.def /MAP \ No newline at end of file diff --git a/build/WinSDK/exe_win_make.bat b/build/WinSDK/exe_win_make.bat new file mode 100644 index 0000000..d068859 --- /dev/null +++ b/build/WinSDK/exe_win_make.bat @@ -0,0 +1,11 @@ +rem : set path to Windows SDK +SET SDK_PATH="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\" + +rem : set path for source EPANET files +SET SRC_PATH="D:\Projects\EPANET\Open Source\Code\owa\EPANET\src" + +CALL %SDK_PATH%SetEnv.cmd /x86 /release +CHDIR /D %SRC_PATH% + +rem : do the magic ... +cl -o epanet2.exe ..\run\main.c /I ..\include /I ..\run /I ..\src /link \ No newline at end of file diff --git a/build/Xcode/epanet/epanet.xcodeproj/project.pbxproj b/build/Xcode/epanet.xcodeproj/project.pbxproj similarity index 79% rename from build/Xcode/epanet/epanet.xcodeproj/project.pbxproj rename to build/Xcode/epanet.xcodeproj/project.pbxproj index f7a110a..7d48c46 100755 --- a/build/Xcode/epanet/epanet.xcodeproj/project.pbxproj +++ b/build/Xcode/epanet.xcodeproj/project.pbxproj @@ -27,19 +27,6 @@ 22322F961068369500641384 /* text.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F811068369500641384 /* text.h */; }; 22322F981068369500641384 /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F831068369500641384 /* types.h */; }; 22322F991068369500641384 /* vars.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F841068369500641384 /* vars.h */; }; - 22322F9A1068369500641384 /* epanet.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F711068369500641384 /* epanet.c */; }; - 22322F9B1068369500641384 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F731068369500641384 /* hash.c */; }; - 22322F9C1068369500641384 /* hydraul.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F751068369500641384 /* hydraul.c */; }; - 22322F9D1068369500641384 /* inpfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F761068369500641384 /* inpfile.c */; }; - 22322F9E1068369500641384 /* input1.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F771068369500641384 /* input1.c */; }; - 22322F9F1068369500641384 /* input2.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F781068369500641384 /* input2.c */; }; - 22322FA01068369500641384 /* input3.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F791068369500641384 /* input3.c */; }; - 22322FA11068369500641384 /* mempool.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7A1068369500641384 /* mempool.c */; }; - 22322FA21068369500641384 /* output.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7C1068369500641384 /* output.c */; }; - 22322FA31068369500641384 /* quality.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7D1068369500641384 /* quality.c */; }; - 22322FA41068369500641384 /* report.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7E1068369500641384 /* report.c */; }; - 22322FA51068369500641384 /* rules.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7F1068369500641384 /* rules.c */; }; - 22322FA61068369500641384 /* smatrix.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F801068369500641384 /* smatrix.c */; }; 22322FAA106836BC00641384 /* epanet2.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322FA9106836B000641384 /* epanet2.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2255753F17551234009946B1 /* epanet.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F711068369500641384 /* epanet.c */; }; 2255754017551234009946B1 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F731068369500641384 /* hash.c */; }; @@ -55,42 +42,45 @@ 2255754A17551234009946B1 /* rules.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7F1068369500641384 /* rules.c */; }; 2255754B17551234009946B1 /* smatrix.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F801068369500641384 /* smatrix.c */; }; 226537E0179EDEEB00258C60 /* epanet2.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322FA9106836B000641384 /* epanet2.h */; }; + 22CD9A5E1B27898E00B65E83 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 22CD9A5D1B27898E00B65E83 /* main.c */; }; + 22CD9A611B278BB900B65E83 /* libepanet-static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2255753B17551217009946B1 /* libepanet-static.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 22322FAF1068370B00641384 /* PBXContainerItemProxy */ = { + 22CD9A5F1B278B0400B65E83 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = D2AAC0620554660B00DB518D; - remoteInfo = epanet; + remoteGlobalIDString = 2255753A17551217009946B1; + remoteInfo = "epanet-static"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 22322F66106833BB00641384 /* runepanet */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = runepanet; sourceTree = BUILT_PRODUCTS_DIR; }; - 22322F701068369500641384 /* enumstxt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = enumstxt.h; path = ../../../src/enumstxt.h; sourceTree = SOURCE_ROOT; }; - 22322F711068369500641384 /* epanet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = epanet.c; path = ../../../src/epanet.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; }; - 22322F721068369500641384 /* funcs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = funcs.h; path = ../../../src/funcs.h; sourceTree = SOURCE_ROOT; }; - 22322F731068369500641384 /* hash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hash.c; path = ../../../src/hash.c; sourceTree = SOURCE_ROOT; }; - 22322F741068369500641384 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hash.h; path = ../../../src/hash.h; sourceTree = SOURCE_ROOT; }; - 22322F751068369500641384 /* hydraul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hydraul.c; path = ../../../src/hydraul.c; sourceTree = SOURCE_ROOT; }; - 22322F761068369500641384 /* inpfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = inpfile.c; path = ../../../src/inpfile.c; sourceTree = SOURCE_ROOT; }; - 22322F771068369500641384 /* input1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = input1.c; path = ../../../src/input1.c; sourceTree = SOURCE_ROOT; }; - 22322F781068369500641384 /* input2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = input2.c; path = ../../../src/input2.c; sourceTree = SOURCE_ROOT; }; - 22322F791068369500641384 /* input3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = input3.c; path = ../../../src/input3.c; sourceTree = SOURCE_ROOT; }; - 22322F7A1068369500641384 /* mempool.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mempool.c; path = ../../../src/mempool.c; sourceTree = SOURCE_ROOT; }; - 22322F7B1068369500641384 /* mempool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mempool.h; path = ../../../src/mempool.h; sourceTree = SOURCE_ROOT; }; - 22322F7C1068369500641384 /* output.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = output.c; path = ../../../src/output.c; sourceTree = SOURCE_ROOT; }; - 22322F7D1068369500641384 /* quality.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = quality.c; path = ../../../src/quality.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; }; - 22322F7E1068369500641384 /* report.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = report.c; path = ../../../src/report.c; sourceTree = SOURCE_ROOT; }; - 22322F7F1068369500641384 /* rules.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rules.c; path = ../../../src/rules.c; sourceTree = SOURCE_ROOT; }; - 22322F801068369500641384 /* smatrix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = smatrix.c; path = ../../../src/smatrix.c; sourceTree = SOURCE_ROOT; }; - 22322F811068369500641384 /* text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = text.h; path = ../../../src/text.h; sourceTree = SOURCE_ROOT; }; - 22322F831068369500641384 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = types.h; path = ../../../src/types.h; sourceTree = SOURCE_ROOT; }; - 22322F841068369500641384 /* vars.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vars.h; path = ../../../src/vars.h; sourceTree = SOURCE_ROOT; }; - 22322FA9106836B000641384 /* epanet2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 2; name = epanet2.h; path = ../../../include/epanet2.h; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 22322F701068369500641384 /* enumstxt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = enumstxt.h; path = ../../src/enumstxt.h; sourceTree = SOURCE_ROOT; }; + 22322F711068369500641384 /* epanet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = epanet.c; path = ../../src/epanet.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; }; + 22322F721068369500641384 /* funcs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = funcs.h; path = ../../src/funcs.h; sourceTree = SOURCE_ROOT; }; + 22322F731068369500641384 /* hash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hash.c; path = ../../src/hash.c; sourceTree = SOURCE_ROOT; }; + 22322F741068369500641384 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hash.h; path = ../../src/hash.h; sourceTree = SOURCE_ROOT; }; + 22322F751068369500641384 /* hydraul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hydraul.c; path = ../../src/hydraul.c; sourceTree = SOURCE_ROOT; }; + 22322F761068369500641384 /* inpfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = inpfile.c; path = ../../src/inpfile.c; sourceTree = SOURCE_ROOT; }; + 22322F771068369500641384 /* input1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = input1.c; path = ../../src/input1.c; sourceTree = SOURCE_ROOT; }; + 22322F781068369500641384 /* input2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = input2.c; path = ../../src/input2.c; sourceTree = SOURCE_ROOT; }; + 22322F791068369500641384 /* input3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = input3.c; path = ../../src/input3.c; sourceTree = SOURCE_ROOT; }; + 22322F7A1068369500641384 /* mempool.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mempool.c; path = ../../src/mempool.c; sourceTree = SOURCE_ROOT; }; + 22322F7B1068369500641384 /* mempool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mempool.h; path = ../../src/mempool.h; sourceTree = SOURCE_ROOT; }; + 22322F7C1068369500641384 /* output.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = output.c; path = ../../src/output.c; sourceTree = SOURCE_ROOT; }; + 22322F7D1068369500641384 /* quality.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = quality.c; path = ../../src/quality.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; }; + 22322F7E1068369500641384 /* report.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = report.c; path = ../../src/report.c; sourceTree = SOURCE_ROOT; }; + 22322F7F1068369500641384 /* rules.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rules.c; path = ../../src/rules.c; sourceTree = SOURCE_ROOT; }; + 22322F801068369500641384 /* smatrix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = smatrix.c; path = ../../src/smatrix.c; sourceTree = SOURCE_ROOT; }; + 22322F811068369500641384 /* text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = text.h; path = ../../src/text.h; sourceTree = SOURCE_ROOT; }; + 22322F831068369500641384 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = types.h; path = ../../src/types.h; sourceTree = SOURCE_ROOT; }; + 22322F841068369500641384 /* vars.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vars.h; path = ../../src/vars.h; sourceTree = SOURCE_ROOT; }; + 22322FA9106836B000641384 /* epanet2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 2; name = epanet2.h; path = ../../include/epanet2.h; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 2255753B17551217009946B1 /* libepanet-static.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libepanet-static.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 22CD9A5D1B27898E00B65E83 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../../run/main.c; sourceTree = ""; }; D2AAC0630554660B00DB518D /* libepanet.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libepanet.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -99,6 +89,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 22CD9A611B278BB900B65E83 /* libepanet-static.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -122,6 +113,7 @@ 08FB7794FE84155DC02AAC07 /* epanet */ = { isa = PBXGroup; children = ( + 22CD9A5C1B27896200B65E83 /* run epanet */, 22322FA8106836A000641384 /* Include */, 08FB7795FE84155DC02AAC07 /* Source */, 1AB674ADFE9D54B511CA2CBB /* Products */, @@ -174,6 +166,14 @@ name = Include; sourceTree = ""; }; + 22CD9A5C1B27896200B65E83 /* run epanet */ = { + isa = PBXGroup; + children = ( + 22CD9A5D1B27898E00B65E83 /* main.c */, + ); + name = "run epanet"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -213,7 +213,7 @@ buildRules = ( ); dependencies = ( - 22322FB01068370B00641384 /* PBXTargetDependency */, + 22CD9A601B278B0400B65E83 /* PBXTargetDependency */, ); name = runepanet; productName = runepanet; @@ -260,7 +260,7 @@ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0630; }; buildConfigurationList = 1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "epanet" */; compatibilityVersion = "Xcode 3.2"; @@ -288,19 +288,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 22322F9A1068369500641384 /* epanet.c in Sources */, - 22322F9B1068369500641384 /* hash.c in Sources */, - 22322F9C1068369500641384 /* hydraul.c in Sources */, - 22322F9D1068369500641384 /* inpfile.c in Sources */, - 22322F9E1068369500641384 /* input1.c in Sources */, - 22322F9F1068369500641384 /* input2.c in Sources */, - 22322FA01068369500641384 /* input3.c in Sources */, - 22322FA11068369500641384 /* mempool.c in Sources */, - 22322FA21068369500641384 /* output.c in Sources */, - 22322FA31068369500641384 /* quality.c in Sources */, - 22322FA41068369500641384 /* report.c in Sources */, - 22322FA51068369500641384 /* rules.c in Sources */, - 22322FA61068369500641384 /* smatrix.c in Sources */, + 22CD9A5E1B27898E00B65E83 /* main.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -347,10 +335,10 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 22322FB01068370B00641384 /* PBXTargetDependency */ = { + 22CD9A601B278B0400B65E83 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = D2AAC0620554660B00DB518D /* epanet */; - targetProxy = 22322FAF1068370B00641384 /* PBXContainerItemProxy */; + target = 2255753A17551217009946B1 /* epanet-static */; + targetProxy = 22CD9A5F1B278B0400B65E83 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -359,17 +347,11 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; EXECUTABLE_PREFIX = lib; - GCC_DYNAMIC_NO_PIC = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = "EN_API_FLOAT_TYPE=double"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = epanet; - SDKROOT = ""; }; name = Debug; }; @@ -377,28 +359,28 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - COMBINE_HIDPI_IMAGES = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; EXECUTABLE_PREFIX = lib; GCC_MODEL_TUNING = G5; GCC_PREPROCESSOR_DEFINITIONS = "EN_API_FLOAT_TYPE=double"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = epanet; - SDKROOT = ""; }; name = Release; }; 1DEB914F08733D8E0010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = c89; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -407,7 +389,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = macinclude; + HEADER_SEARCH_PATHS = ""; ONLY_ACTIVE_ARCH = YES; SDKROOT = ""; }; @@ -416,13 +398,18 @@ 1DEB915008733D8E0010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = c89; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; @@ -430,7 +417,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = macinclude; + HEADER_SEARCH_PATHS = ""; SDKROOT = ""; }; name = Release; @@ -439,14 +426,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = CLE; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_PREPROCESSOR_DEFINITIONS = ""; - INSTALL_PATH = /usr/local/bin; PRODUCT_NAME = runepanet; }; name = Debug; @@ -455,13 +438,9 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_MODEL_TUNING = G5; GCC_PREPROCESSOR_DEFINITIONS = CLE; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_PREPROCESSOR_DEFINITIONS = ""; - INSTALL_PATH = /usr/local/bin; PRODUCT_NAME = runepanet; ZERO_LINK = NO; }; @@ -471,20 +450,14 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_EMPTY_BODY = YES; - COPY_PHASE_STRIP = NO; + COMBINE_HIDPI_IMAGES = YES; EXECUTABLE_PREFIX = lib; - GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_PREPROCESSOR_DEFINITIONS = "EN_API_FLOAT_TYPE=double"; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - MACOSX_DEPLOYMENT_TARGET = 10.8; PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; }; name = Debug; }; @@ -492,19 +465,13 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_EMPTY_BODY = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + COMBINE_HIDPI_IMAGES = YES; EXECUTABLE_PREFIX = lib; GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_PREPROCESSOR_DEFINITIONS = "EN_API_FLOAT_TYPE=double"; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - MACOSX_DEPLOYMENT_TARGET = 10.8; PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; }; name = Release; }; diff --git a/build/Xcode/epanet/epanet.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/build/Xcode/epanet/epanet.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100755 index 052c6dc..0000000 --- a/build/Xcode/epanet/epanet.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - From 33edb5ba5775182bb6054fc91e121df225ffdd46 Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Fri, 12 Jun 2015 10:34:12 -0400 Subject: [PATCH 002/120] cmake --- build/CMake/CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 build/CMake/CMakeLists.txt diff --git a/build/CMake/CMakeLists.txt b/build/CMake/CMakeLists.txt new file mode 100644 index 0000000..5aaa576 --- /dev/null +++ b/build/CMake/CMakeLists.txt @@ -0,0 +1,18 @@ +## cmake . +## make + +cmake_minimum_required (VERSION 2.6) + +SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) +SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) + +project (EPANET) + +# the library +include_directories(../../include) +add_library(epanet STATIC ../../src/epanet.c ../../src/hydraul.c ../../src/hash.c ../../src/inpfile.c ../../src/input1.c ../../src/input2.c ../../src/input3.c ../../src/mempool.c ../../src/output.c ../../src/quality.c ../../src/report.c ../../src/rules.c ../../src/smatrix.c) + +# the standalone executable +include_directories(../../src) +add_executable(runepanet ../../run/main.c) +target_link_libraries (runepanet LINK_PUBLIC epanet) From dfe879af19fe6609af73ab16c7c0ddf3ed11e86c Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Fri, 12 Jun 2015 10:34:25 -0400 Subject: [PATCH 003/120] standalone utility --- run/main.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 run/main.c diff --git a/run/main.c b/run/main.c new file mode 100644 index 0000000..83949a7 --- /dev/null +++ b/run/main.c @@ -0,0 +1,75 @@ +#include +#include "epanet2.h" +#include "text.h" + +void writeConsole(char *s); + +extern char Warnflag; + +/* +---------------------------------------------------------------- + Entry point used to compile a stand-alone executable. +---------------------------------------------------------------- +*/ + + +int main(int argc, char *argv[]) +/*-------------------------------------------------------------- + ** Input: argc = number of command line arguments + ** *argv[] = array of command line arguments + ** Output: none + ** Purpose: main program segment + ** + ** Command line for stand-alone operation is: + ** progname f1 f2 f3 + ** where progname = name of executable this code was compiled to, + ** f1 = name of input file, f2 = name of report file, and + ** f3 = name of binary output file (optional). + **-------------------------------------------------------------- + */ +{ + char *f1,*f2,*f3; + char blank[] = ""; + int errcode; + + /* Check for proper number of command line arguments */ + if (argc < 3) { + writeConsole(FMT03); + } + else { + /* Call the main control function */ + f1 = argv[1]; + f2 = argv[2]; + if (argc > 3) { + f3 = argv[3]; + } + else { + f3 = blank; + } + writeConsole(FMT01); + errcode = ENepanet(f1,f2,f3,NULL); + if (errcode > 0) { + writeConsole(FMT11); + } + else if (Warnflag > 0) { + writeConsole(FMT10); + } + else { + writeConsole(FMT09); + } + } + return(0); +} /* End of main */ + + +void writeConsole(char *s) +/*---------------------------------------------------------------- + ** Input: text string + ** Output: none + ** Purpose: writes string of characters to console + **---------------------------------------------------------------- + */ +{ + fprintf(stdout,"%s",s); + fflush(stdout); +} From bee95a6ee223ef024575e8cdd10e62c2735a2aff Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Fri, 12 Jun 2015 10:34:40 -0400 Subject: [PATCH 004/120] c89 conformance --- src/quality.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/quality.c b/src/quality.c index be9193d..48b58f2 100755 --- a/src/quality.c +++ b/src/quality.c @@ -222,7 +222,8 @@ int runqual(long *t) long hydtime; /* Hydraulic solution time */ long hydstep; /* Hydraulic time step */ int errcode = 0; - + int i; + /* Update reported simulation time */ *t = Qtime; @@ -240,7 +241,7 @@ int runqual(long *t) QTankVolumes[i-1] = Tank[i].V; } - for (int i=1; i<= Nlinks; ++i) + for (i=1; i<= Nlinks; ++i) { if (LinkStatus[i] <= CLOSED) { QLinkFlow[i-1] = Q[i]; @@ -251,11 +252,11 @@ int runqual(long *t) } else { // stepwise calculation - for (int i=1; i<= Ntanks; ++i) { + for (i=1; i<= Ntanks; ++i) { QTankVolumes[i-1] = Tank[i].V; } - for (int i=1; i<= Nlinks; ++i) + for (i=1; i<= Nlinks; ++i) { if (LinkStatus[i] <= CLOSED) { QLinkFlow[i-1] = Q[i]; @@ -281,7 +282,7 @@ int nextqual(long *tstep) { long hydstep; /* Hydraulic solution time step */ int errcode = 0; - + int i; /* Determine time step */ *tstep = 0; @@ -302,7 +303,7 @@ int nextqual(long *tstep) } // restore the previous step's tank volumes - for (int i=1; i<=Ntanks; i++) { + for (i=1; i<=Ntanks; i++) { if (Tank[i].A != 0) { // skip reservoirs again int n = Tank[i].Node; Tank[i].V = QTankVolumes[i-1]; @@ -311,7 +312,7 @@ int nextqual(long *tstep) } // restore the previous step's pipe link flows - for (int i=1; i<=Nlinks; i++) { + for (i=1; i<=Nlinks; i++) { if (LinkStatus[i] <= CLOSED) { Q[i] = 0.0; } @@ -332,7 +333,7 @@ int nextqual(long *tstep) // restore tank levels to post-runH state, if needed. if (OpenHflag) { - for (int i=1; i<=Ntanks; i++) { + for (i=1; i<=Ntanks; i++) { if (Tank[i].A != 0) { // skip reservoirs again int n = Tank[i].Node; Tank[i].V = tankVolumes[i-1]; @@ -340,7 +341,7 @@ int nextqual(long *tstep) } } - for (int i=1; i<=Nlinks; ++i) { + for (i=1; i<=Nlinks; ++i) { if (LinkStatus[i] <= CLOSED) { Q[i] = QLinkFlow[i-1]; } From 38bb3a57e0a4fe2f93666724905e1a3231a16b2f Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Fri, 12 Jun 2015 10:34:50 -0400 Subject: [PATCH 005/120] remove old files --- src/testLemonTiger.cpp | 332 ----------------------------------------- src/testLemonTiger.h | 15 -- src/toolkit.h | 255 ------------------------------- 3 files changed, 602 deletions(-) delete mode 100755 src/testLemonTiger.cpp delete mode 100755 src/testLemonTiger.h delete mode 100755 src/toolkit.h diff --git a/src/testLemonTiger.cpp b/src/testLemonTiger.cpp deleted file mode 100755 index 0863e9a..0000000 --- a/src/testLemonTiger.cpp +++ /dev/null @@ -1,332 +0,0 @@ -#include -#include -#include -#include -#include -#include "testLemonTiger.h" -#include "toolkit.h" - -#define COLW 15 -#define OUTPRECISION 6 - -using namespace std; - -typedef struct { - double head; - double demand; - double quality; -} nodeState_t; - -typedef struct { - double flow; -} linkState_t; - -typedef map networkNodeState_t; // nodeIndex, state -typedef map networkLinkState_t; // linkIndex, state - -typedef struct { - networkNodeState_t nodeState; - networkLinkState_t linkState; -} networkState_t; -typedef map result_t; // time, networkState -// access results by, for instance, resultsContainer[time][nodeIndex].head - - - -void checkErr(int err, std::string function); -void saveHydResults(networkState_t* networkState); -void saveQualResults(networkState_t* networkState); -void printResults(result_t* state1, result_t* state2, std::ostream& out); -void compare(result_t* results1, result_t* results2, std::ostream &out); - -int main(int argc, char * argv[]) { - - // create storage structures for results. - result_t epanetResults, lemonTigerResults; - - cout << "Lemon Tiger TEST" << endl - << "________________" << endl; - - - long simulationTime = 0; - long nextEventH = 0, nextEventQ = 0; - long simTimeRemaining = 0; - - try { - - /* Batch solver (old epanet) */ - cout << "*****Original EPANET results******" << endl; - checkErr( ENopen(argv[1], argv[2], (char*)""), "ENopen" ); - - checkErr( ENopenH(), "ENopenH" ); - checkErr( ENinitH(EN_SAVE), "ENinitH" ); - - cout << "Running hydraulics..." << endl; - do { - - /* Solve for hydraulics & advance to next time period */ - checkErr( ENrunH(&simulationTime), "ENrunH" ); - checkErr( ENnextH(&nextEventH), "ENnextH" ); - - // gather hydraulic results - saveHydResults(&epanetResults[simulationTime]); - - - - } while (nextEventH > 0); - // hydraulics are done - checkErr( ENcloseH(), "ENcloseH" ); - cout << "\t\t\tdone." << endl; - cout << "Running WQ..." << endl; - - checkErr( ENopenQ(), "ENopenQ" ); - checkErr( ENinitQ(EN_NOSAVE), "ENinitQ" ); - - do { - - checkErr( ENrunQ(&simulationTime), "ENrunQ" ); - checkErr( ENnextQ(&nextEventH), "ENstepQ" ); - - // gather quality results - saveQualResults(&epanetResults[simulationTime]); - - } while (nextEventH > 0); - // water quality is done - checkErr( ENcloseQ(), "ENcloseQ" ); - cout << "\t\t\tdone." << endl; - - // everything is done - checkErr( ENclose(), "ENclose" ); - - - nextEventH = 0; - simTimeRemaining = 0; - simulationTime = 0; - - /* stepwise solver (LemonTiger) */ - cout << "*****LemonTiger results******" << endl; - - checkErr( ENopen(argv[1], argv[2], (char*)""), "ENopen" ); - - checkErr( ENopenH(), "ENopenH" ); - checkErr( ENinitH(EN_NOSAVE), "ENinitH" ); - checkErr( ENopenQ(), "ENopenQ" ); - checkErr( ENinitQ(EN_NOSAVE), "ENinitQ" ); - - cout << "Running stepwise hydraulics and water quality..." << endl; - do { - /* Solve for hydraulics & advance to next time period */ - checkErr( ENrunH(&simulationTime), "ENrunH" ); - checkErr( ENrunQ(&simulationTime), "ENrunQ" ); - - checkErr( ENnextH(&nextEventH), "ENnextH" ); - checkErr( ENnextQ(&nextEventQ), "ENstepQ" ); - - - saveHydResults(&lemonTigerResults[simulationTime]); - saveQualResults(&lemonTigerResults[simulationTime]); - - - } while (nextEventH > 0); - cout << "\t\t\tdone." << endl; - - // all done - checkErr( ENcloseH(), "ENcloseH" ); - checkErr( ENcloseQ(), "ENcloseQ" ); - checkErr( ENclose(), "ENclose" ); - - - // summarize the results - printResults(&epanetResults, &lemonTigerResults, cout); - compare(&epanetResults, &lemonTigerResults, cout); - - } catch (int err) { - cerr << "exiting with error " << err << endl; - } -} - - -void saveHydResults(networkState_t* networkState) { - int nNodes, nLinks; - float head, demand, flow; - ENgetcount(EN_NODECOUNT, &nNodes); - ENgetcount(EN_LINKCOUNT, &nLinks); - for (int iNode = 1; iNode <= nNodes; ++iNode) { - ENgetnodevalue(iNode, EN_HEAD, &head); - ENgetnodevalue(iNode, EN_DEMAND, &demand); - (*networkState).nodeState[iNode].head = head; - (*networkState).nodeState[iNode].demand = demand; - } - for (int iLink = 1; iLink <= nLinks; ++iLink) { - ENgetlinkvalue(iLink, EN_FLOW, &flow); - (*networkState).linkState[iLink].flow = flow; - } -} - - -void saveQualResults(networkState_t* networkState) { - int nNodes; - float quality; - ENgetcount(EN_NODECOUNT, &nNodes); - - for (int iNode = 1; iNode <= nNodes; iNode++) { - ENgetnodevalue(iNode, EN_QUALITY, &quality); - (*networkState).nodeState[iNode].quality = quality; - } -} - - -void printResults(result_t* results1, result_t* results2, std::ostream &out) { - - result_t::const_iterator resultIterator; - - for (resultIterator = (*results1).begin(); resultIterator != (*results1).end(); ++resultIterator) { - // get the current frame - const long time = resultIterator->first; - const networkNodeState_t networkNodeState1= resultIterator->second.nodeState; - //nodeState1 = resultIterator->second.nodeState; - const networkLinkState_t networkLinkState1 = resultIterator->second.linkState; - //linkState1 = resultIterator->second.linkState; - - // see if this time is indexed in the second state container - if ((*results2).find(time) == (*results2).end()) { - // nope. - out << "time " << time << " not found in second result set" << endl; - } - else { - // get the second result set's state - const networkNodeState_t networkNodeState2 = (*results2)[time].nodeState; - const networkLinkState_t networkLinkState2 = (*results2)[time].linkState; - // print the current simulation time - out << left; - out << setfill('*') << setw(100) << "*" << endl; - out << setfill(' '); - out << setw(4) << "T = " << setw(6) << time; - out << "|" << setw(3*COLW) << "EPANET"; - out << "|" << setw(3*COLW) << "LemonTiger" << endl; - out << setw(10) << "Index" << "|"; - out << setw(COLW) << "Demand" << setw(COLW) << "Head" << setw(COLW) << "Quality" << "|"; - out << setw(COLW) << "Demand" << setw(COLW) << "Head" << setw(COLW) << "Quality" << endl; - out << setprecision(OUTPRECISION); - - // loop through the nodes in the networkState objs, and print out the results for this time period - networkNodeState_t::const_iterator networkNodeIterator; - for (networkNodeIterator = networkNodeState1.begin(); networkNodeIterator != networkNodeState1.end(); ++networkNodeIterator) { - int nodeIndex = networkNodeIterator->first; - // trusting that all nodes are present... - const nodeState_t nodeState1 = networkNodeIterator->second; - const nodeState_t nodeState2 = networkNodeState2.at(nodeIndex); - - if (nodeState1.quality != nodeState2.quality ) { - // epanet - out << setw(10) << nodeIndex << "|"; - out << setw(COLW) << nodeState1.demand; - out << setw(COLW) << nodeState1.head; - out << setw(COLW) << nodeState1.quality; - - // lemontiger - out << "|"; - out << setw(COLW) << nodeState2.demand; - out << setw(COLW) << nodeState2.head; - out << setw(COLW) << nodeState2.quality; - out << endl; - } - } - - networkLinkState_t::const_iterator networkLinkIterator; - for (networkLinkIterator = networkLinkState1.begin(); networkLinkIterator != networkLinkState1.end(); ++networkLinkIterator) { - int linkIndex = networkLinkIterator->first; - // trusting that all nodes are present... - const linkState_t linkState1 = networkLinkIterator->second; - const linkState_t linkState2 = networkLinkState2.at(linkIndex); - - if ( linkState1.flow != linkState2.flow ) { - // epanet - out << setw(10) << linkIndex << "|"; - out << setw(COLW) << linkState1.flow; - - // lemontiger - out << "|"; - out << setw(COLW) << linkState2.flow; - out << endl; - } - } - - - } - } - -} - - - -void compare(result_t* results1, result_t* results2, std::ostream &out) { - - double sumHeadDiff=0, sumDemandDiff=0, sumQualDiff=0, sumFlowDiff=0; - - result_t::const_iterator resultIterator; - - for (resultIterator = (*results1).begin(); resultIterator != (*results1).end(); ++resultIterator) { - // get the current frame - const long time = resultIterator->first; - const networkNodeState_t nodeState1 = resultIterator->second.nodeState; - const networkLinkState_t linkState1 = resultIterator->second.linkState; - - // see if this time is indexed in the second state container - if ((*results2).find(time) == (*results2).end()) { - // nope. - out << "time " << time << " not found in second result set" << endl; - } - else { - // get the second result set's state - const networkNodeState_t networkNodeState2 = (*results2)[time].nodeState; - const networkLinkState_t networkLinkState2 = (*results2)[time].linkState; - double qualD=0; - - networkNodeState_t::const_iterator networkNodeIterator; - for (networkNodeIterator = nodeState1.begin(); networkNodeIterator != nodeState1.end(); ++networkNodeIterator) { - int nodeIndex = networkNodeIterator->first; - // trusting that all nodes are present... - const nodeState_t nodeState1 = networkNodeIterator->second; - const nodeState_t nodeState2 = networkNodeState2.at(nodeIndex); - - sumHeadDiff += fabs(nodeState1.head - nodeState2.head); - sumDemandDiff += fabs(nodeState1.demand - nodeState2.demand); - - qualD += fabs(nodeState1.quality - nodeState2.quality); - } - //out << "T: " << time << " dq: " << setprecision(20) << qualD << endl; - sumQualDiff += qualD; - - networkLinkState_t::const_iterator networkLinkIterator; - for (networkLinkIterator = linkState1.begin(); networkLinkIterator != linkState1.end(); ++networkLinkIterator) { - int linkIndex = networkLinkIterator->first; - // trusting that all nodes are present... - const linkState_t linkState1 = networkLinkIterator->second; - const linkState_t linkState2 = networkLinkState2.at(linkIndex); - - sumFlowDiff += fabs(linkState1.flow - linkState2.flow); - } - } - } - - int c1 = 18; - int p = 20; - out << setw(c1) << "Head Diff:" << setprecision(p) << sumHeadDiff << endl; - out << setw(c1) << "Demand Diff:" << setprecision(p) << sumDemandDiff << endl; - out << setw(c1) << "Quality Diff:" << setprecision(p) << sumQualDiff << endl; - out << setw(c1) << "Flow Diff:" << setprecision(p) << sumFlowDiff << endl; - - -} - - -void checkErr(int err, std::string function) { - if (err > 0) { - cerr << "Error in " << function << ": " << err << endl; - char errmsg[1024]; - ENgeterror(err, errmsg, 1024); - cerr << errmsg << endl; - throw err; - } -} diff --git a/src/testLemonTiger.h b/src/testLemonTiger.h deleted file mode 100755 index 5c1cc2f..0000000 --- a/src/testLemonTiger.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// testLemonTiger.h -// epanet -// -// Created by Sam Hatchett on 2/1/13. -// -// - -#ifndef __epanet__testLemonTiger__ -#define __epanet__testLemonTiger__ - -#include -#include - -#endif /* defined(__epanet__testLemonTiger__) */ diff --git a/src/toolkit.h b/src/toolkit.h deleted file mode 100755 index 6078898..0000000 --- a/src/toolkit.h +++ /dev/null @@ -1,255 +0,0 @@ -/* -******************************************************************* - -TOOLKIT.H - Prototypes for EPANET Functions Exported to DLL Toolkit - -VERSION: 2.00 -DATE: 5/8/00 - 10/25/00 - 3/1/01 - 8/15/07 (2.00.11) - 2/14/08 (2.00.12) -AUTHOR: L. Rossman - US EPA - NRMRL - -******************************************************************* -*/ - - -#ifndef DLLEXPORT - #ifdef DLL - #ifdef __cplusplus - #define DLLEXPORT extern "C" __declspec(dllexport) - #else - #define DLLEXPORT __declspec(dllexport) __stdcall - #endif - #elif defined(CYGWIN) - #define DLLEXPORT __stdcall - #else - #ifdef __cplusplus - #define DLLEXPORT - #else - #define DLLEXPORT - #endif - #endif -#endif - -// --- Define the EPANET toolkit constants - -#define EN_ELEVATION 0 /* Node parameters */ -#define EN_BASEDEMAND 1 -#define EN_PATTERN 2 -#define EN_EMITTER 3 -#define EN_INITQUAL 4 -#define EN_SOURCEQUAL 5 -#define EN_SOURCEPAT 6 -#define EN_SOURCETYPE 7 -#define EN_TANKLEVEL 8 -#define EN_DEMAND 9 -#define EN_HEAD 10 -#define EN_PRESSURE 11 -#define EN_QUALITY 12 -#define EN_SOURCEMASS 13 -#define EN_INITVOLUME 14 -#define EN_MIXMODEL 15 -#define EN_MIXZONEVOL 16 - -#define EN_TANKDIAM 17 -#define EN_MINVOLUME 18 -#define EN_VOLCURVE 19 -#define EN_MINLEVEL 20 -#define EN_MAXLEVEL 21 -#define EN_MIXFRACTION 22 -#define EN_TANK_KBULK 23 -#define EN_TANKVOLUME 24 -#define EN_MAXVOLUME 25 - -#define EN_DIAMETER 0 /* Link parameters */ -#define EN_LENGTH 1 -#define EN_ROUGHNESS 2 -#define EN_MINORLOSS 3 -#define EN_INITSTATUS 4 -#define EN_INITSETTING 5 -#define EN_KBULK 6 -#define EN_KWALL 7 -#define EN_FLOW 8 -#define EN_VELOCITY 9 -#define EN_HEADLOSS 10 -#define EN_STATUS 11 -#define EN_SETTING 12 -#define EN_ENERGY 13 -#define EN_LINKQUAL 14 /* TNT */ -#define EN_LINKPATTERN 15 - -#define EN_DURATION 0 /* Time parameters */ -#define EN_HYDSTEP 1 -#define EN_QUALSTEP 2 -#define EN_PATTERNSTEP 3 -#define EN_PATTERNSTART 4 -#define EN_REPORTSTEP 5 -#define EN_REPORTSTART 6 -#define EN_RULESTEP 7 -#define EN_STATISTIC 8 -#define EN_PERIODS 9 -#define EN_STARTTIME 10 /* Added TNT 10/2/2009 */ -#define EN_HTIME 11 -#define EN_HALTFLAG 12 -#define EN_NEXTEVENT 13 - -#define EN_ITERATIONS 0 -#define EN_RELATIVEERROR 1 - -#define EN_NODECOUNT 0 /* Component counts */ -#define EN_TANKCOUNT 1 -#define EN_LINKCOUNT 2 -#define EN_PATCOUNT 3 -#define EN_CURVECOUNT 4 -#define EN_CONTROLCOUNT 5 - -#define EN_JUNCTION 0 /* Node types */ -#define EN_RESERVOIR 1 -#define EN_TANK 2 - -#define EN_CVPIPE 0 /* Link types. */ -#define EN_PIPE 1 /* See LinkType in TYPES.H */ -#define EN_PUMP 2 -#define EN_PRV 3 -#define EN_PSV 4 -#define EN_PBV 5 -#define EN_FCV 6 -#define EN_TCV 7 -#define EN_GPV 8 - -#define EN_NONE 0 /* Quality analysis types. */ -#define EN_CHEM 1 /* See QualType in TYPES.H */ -#define EN_AGE 2 -#define EN_TRACE 3 - -#define EN_CONCEN 0 /* Source quality types. */ -#define EN_MASS 1 /* See SourceType in TYPES.H. */ -#define EN_SETPOINT 2 -#define EN_FLOWPACED 3 - -#define EN_CFS 0 /* Flow units types. */ -#define EN_GPM 1 /* See FlowUnitsType */ -#define EN_MGD 2 /* in TYPES.H. */ -#define EN_IMGD 3 -#define EN_AFD 4 -#define EN_LPS 5 -#define EN_LPM 6 -#define EN_MLD 7 -#define EN_CMH 8 -#define EN_CMD 9 - -#define EN_TRIALS 0 /* Misc. options */ -#define EN_ACCURACY 1 -#define EN_TOLERANCE 2 -#define EN_EMITEXPON 3 -#define EN_DEMANDMULT 4 - -#define EN_LOWLEVEL 0 /* Control types. */ -#define EN_HILEVEL 1 /* See ControlType */ -#define EN_TIMER 2 /* in TYPES.H. */ -#define EN_TIMEOFDAY 3 - -#define EN_AVERAGE 1 /* Time statistic types. */ -#define EN_MINIMUM 2 /* See TstatType in TYPES.H */ -#define EN_MAXIMUM 3 -#define EN_RANGE 4 - -#define EN_MIX1 0 /* Tank mixing models */ -#define EN_MIX2 1 -#define EN_FIFO 2 -#define EN_LIFO 3 - -#define EN_NOSAVE 0 /* Save-results-to-file flag */ -#define EN_SAVE 1 - -#define EN_INITFLOW 10 /* Re-initialize flows flag */ - -#define EN_CONST_HP 0 /* constant horsepower */ -#define EN_POWER_FUNC 1 /* power function */ -#define EN_CUSTOM 2 /* user-defined custom curve */ - -// --- Declare the EPANET toolkit functions -#if defined(__cplusplus) -extern "C" { -#endif - int DLLEXPORT ENepanet(char *, char *, char *, void (*) (char *)); - - int DLLEXPORT ENopen(char *, char *, char *); - int DLLEXPORT ENsaveinpfile(char *); - int DLLEXPORT ENclose(void); - - int DLLEXPORT ENsolveH(void); - int DLLEXPORT ENsaveH(void); - int DLLEXPORT ENopenH(void); - int DLLEXPORT ENinitH(int); - int DLLEXPORT ENrunH(long *); - int DLLEXPORT ENnextH(long *); - int DLLEXPORT ENcloseH(void); - int DLLEXPORT ENsavehydfile(char *); - int DLLEXPORT ENusehydfile(char *); - - int DLLEXPORT ENsolveQ(void); - int DLLEXPORT ENopenQ(void); - int DLLEXPORT ENinitQ(int); - int DLLEXPORT ENrunQ(long *); - int DLLEXPORT ENnextQ(long *); - int DLLEXPORT ENstepQ(long *); - int DLLEXPORT ENcloseQ(void); - - int DLLEXPORT ENwriteline(char *); - int DLLEXPORT ENreport(void); - int DLLEXPORT ENresetreport(void); - int DLLEXPORT ENsetreport(char *); - - int DLLEXPORT ENgetcontrol(int, int *, int *, float *, - int *, float *); - int DLLEXPORT ENgetcount(int, int *); - int DLLEXPORT ENgetoption(int, float *); - int DLLEXPORT ENgettimeparam(int, long *); - int DLLEXPORT ENgetflowunits(int *); - int DLLEXPORT ENgetpatternindex(char *, int *); - int DLLEXPORT ENgetpatternid(int, char *); - int DLLEXPORT ENgetpatternlen(int, int *); - int DLLEXPORT ENgetpatternvalue(int, int, float *); - int DLLEXPORT ENgetqualtype(int *, int *); - int DLLEXPORT ENgeterror(int, char *, int); - int DLLEXPORT ENgetstatistic(int code, int* value); - - int DLLEXPORT ENgetnodeindex(char *, int *); - int DLLEXPORT ENgetnodeid(int, char *); - int DLLEXPORT ENgetnodetype(int, int *); - int DLLEXPORT ENgetnodevalue(int, int, float *); - - int DLLEXPORT ENgetnumdemands(int, int *); - int DLLEXPORT ENgetbasedemand(int, int, float *); - int DLLEXPORT ENgetdemandpattern(int, int, int *); - - int DLLEXPORT ENgetlinkindex(char *, int *); - int DLLEXPORT ENgetlinkid(int, char *); - int DLLEXPORT ENgetlinktype(int, int *); - int DLLEXPORT ENgetlinknodes(int, int *, int *); - int DLLEXPORT ENgetlinkvalue(int, int, float *); - - int DLLEXPORT ENgetcurve(int curveIndex, int *nValues, float **xValues, float **yValues); - int DLLEXPORT ENgetheadcurve(int, char *); - int DLLEXPORT ENgetpumptype(int, int *); - - int DLLEXPORT ENgetversion(int *); - - int DLLEXPORT ENsetcontrol(int, int, int, float, int, float); - int DLLEXPORT ENsetnodevalue(int, int, float); - int DLLEXPORT ENsetlinkvalue(int, int, float); - int DLLEXPORT ENaddpattern(char *); - int DLLEXPORT ENsetpattern(int, float *, int); - int DLLEXPORT ENsetpatternvalue(int, int, float); - int DLLEXPORT ENsettimeparam(int, long); - int DLLEXPORT ENsetoption(int, float); - int DLLEXPORT ENsetstatusreport(int); - int DLLEXPORT ENsetqualtype(int, char *, char *, char *); - -#if defined(__cplusplus) -} -#endif From 16edcea410fb9a2e69a6e8deb623a1bdfdd64677 Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Fri, 12 Jun 2015 10:35:02 -0400 Subject: [PATCH 006/120] fix duplicate symbols --- src/vars.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/vars.h b/src/vars.h index 77b7284..2a4f363 100755 --- a/src/vars.h +++ b/src/vars.h @@ -17,15 +17,15 @@ AUTHOR: L. Rossman #include #include "hash.h" - FILE *InFile, /* Input file pointer */ +EXTERN FILE *InFile, /* Input file pointer */ *OutFile, /* Output file pointer */ *RptFile, /* Report file pointer */ *HydFile, /* Hydraulics file pointer */ *TmpOutFile; /* Temporary file handle */ - long HydOffset, /* Hydraulics file byte offset */ +EXTERN long HydOffset, /* Hydraulics file byte offset */ OutOffset1, /* 1st output file byte offset */ OutOffset2; /* 2nd output file byte offset */ - char Msg[MAXMSG+1], /* Text of output message */ +EXTERN char Msg[MAXMSG+1], /* Text of output message */ InpFname[MAXFNAME+1], /* Input file name */ Rpt1Fname[MAXFNAME+1], /* Primary report file name */ Rpt2Fname[MAXFNAME+1], /* Secondary report file name */ @@ -65,7 +65,7 @@ AUTHOR: L. Rossman OpenQflag, /* Quality system opened flag */ SaveQflag, /* Quality results saved flag */ Saveflag; /* General purpose save flag */ - int MaxNodes, /* Node count from input file */ +EXTERN int MaxNodes, /* Node count from input file */ MaxLinks, /* Link count from input file */ MaxJuncs, /* Junction count */ MaxPipes, /* Pipe count */ @@ -99,7 +99,7 @@ AUTHOR: L. Rossman PageSize, /* Lines/page in output report */ CheckFreq, /* Hydraulics solver parameter */ MaxCheck; /* Hydraulics solver parameter */ - double Ucf[MAXVAR], /* Unit conversion factors */ +EXTERN double Ucf[MAXVAR], /* Unit conversion factors */ Ctol, /* Water quality tolerance */ Htol, /* Hydraulic head tolerance */ Qtol, /* Flow rate tolerance */ @@ -128,7 +128,7 @@ AUTHOR: L. Rossman Wwall, /* Avg. wall reaction rate */ Wtank, /* Avg. tank reaction rate */ Wsource; /* Avg. mass inflow */ - long Tstart, /* Starting time of day (sec) */ +EXTERN long Tstart, /* Starting time of day (sec) */ Hstep, /* Nominal hyd. time step (sec) */ Qstep, /* Quality time step (sec) */ Pstep, /* Time pattern time step (sec) */ @@ -141,12 +141,12 @@ AUTHOR: L. Rossman Hydstep, /* Actual hydraulic time step */ Rulestep, /* Rule evaluation time step */ Dur; /* Duration of simulation (sec) */ - SField Field[MAXVAR]; /* Output reporting fields */ +EXTERN SField Field[MAXVAR]; /* Output reporting fields */ /* Array pointers not allocated and freed in same routine */ - char *LinkStatus, /* Link status */ +EXTERN char *LinkStatus, /* Link status */ *OldStat; /* Previous link/tank status */ - double *NodeDemand, /* Node actual demand */ +EXTERN double *NodeDemand, /* Node actual demand */ *NodeQual, /* Node actual quality */ *E, /* Emitter flows */ *LinkSetting, /* Link settings */ @@ -194,19 +194,19 @@ EXTERN int _iterations; /* Info about hydraulic solution */ ** The following arrays are used to efficiently manage this sparsity: */ - double *Aii, /* Diagonal coeffs. of A */ +EXTERN double *Aii, /* Diagonal coeffs. of A */ *Aij, /* Non-zero, off-diagonal coeffs. of A */ *F; /* Right hand side coeffs. */ - double *P, /* Inverse headloss derivatives */ +EXTERN double *P, /* Inverse headloss derivatives */ *Y; /* Flow correction factors */ - int *Order, /* Node-to-row of A */ +EXTERN int *Order, /* Node-to-row of A */ *Row, /* Row-to-node of A */ *Ndx; /* Index of link's coeff. in Aij */ /* ** The following arrays store the positions of the non-zero coeffs. ** of the lower triangular portion of A whose values are stored in Aij: */ - int *XLNZ, /* Start position of each column in NZSUB */ +EXTERN int *XLNZ, /* Start position of each column in NZSUB */ *NZSUB, /* Row index of each coeff. in each column */ *LNZ; /* Position of each coeff. in Aij array */ From c9e1746a82bbc5143c481f83b5d8db90f9b7b6af Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Fri, 12 Jun 2015 10:35:12 -0400 Subject: [PATCH 007/120] moves example networks --- {test => example-networks}/Net3.inp | 0 {test => example-networks}/sampletown.inp | 0 {test => example-networks}/simplenet.inp | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename {test => example-networks}/Net3.inp (100%) rename {test => example-networks}/sampletown.inp (100%) rename {test => example-networks}/simplenet.inp (100%) diff --git a/test/Net3.inp b/example-networks/Net3.inp similarity index 100% rename from test/Net3.inp rename to example-networks/Net3.inp diff --git a/test/sampletown.inp b/example-networks/sampletown.inp similarity index 100% rename from test/sampletown.inp rename to example-networks/sampletown.inp diff --git a/test/simplenet.inp b/example-networks/simplenet.inp similarity index 100% rename from test/simplenet.inp rename to example-networks/simplenet.inp From 263e9eb3039fedea63caf0c04fcccb91a246c73d Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Fri, 12 Jun 2015 10:35:57 -0400 Subject: [PATCH 008/120] fix compilation defs --- include/epanet2.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/epanet2.h b/include/epanet2.h index 6c3a7fa..38c8561 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -23,15 +23,15 @@ #endif #ifndef DLLEXPORT -#ifdef DLL +#ifdef WINDOWS #ifdef __cplusplus #define DLLEXPORT extern "C" __declspec(dllexport) #else -#define DLLEXPORT __declspec(dllexport) -#endif +#define DLLEXPORT __declspec(dllexport) __stdcall +#endif // __cplusplus #elif defined(CYGWIN) #define DLLEXPORT __stdcall -#else +#elif defined(__APPLE__) #ifdef __cplusplus #define DLLEXPORT #else @@ -83,7 +83,8 @@ #define EN_STATUS 11 #define EN_SETTING 12 #define EN_ENERGY 13 -#define EN_LINKQUAL 14 /* TNT */ +#define EN_LINKQUAL 14 +#define EN_LINKPATTERN 15 #define EN_DURATION 0 /* Time parameters */ #define EN_HYDSTEP 1 From 23865315aa24b5bc7b07b381f26bed059182357e Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Fri, 12 Jun 2015 11:22:04 -0400 Subject: [PATCH 009/120] removing utility code from library source main function should only be in standalone app. also removing inline defs for compile-time directives --- build/Xcode/epanet.xcodeproj/project.pbxproj | 4 +- src/epanet.c | 62 +------------------- 2 files changed, 4 insertions(+), 62 deletions(-) diff --git a/build/Xcode/epanet.xcodeproj/project.pbxproj b/build/Xcode/epanet.xcodeproj/project.pbxproj index 7d48c46..a2c8b20 100755 --- a/build/Xcode/epanet.xcodeproj/project.pbxproj +++ b/build/Xcode/epanet.xcodeproj/project.pbxproj @@ -428,7 +428,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = CLE; + GCC_PREPROCESSOR_DEFINITIONS = ""; INFOPLIST_PREPROCESSOR_DEFINITIONS = ""; PRODUCT_NAME = runepanet; }; @@ -439,7 +439,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = CLE; + GCC_PREPROCESSOR_DEFINITIONS = ""; INFOPLIST_PREPROCESSOR_DEFINITIONS = ""; PRODUCT_NAME = runepanet; ZERO_LINK = NO; diff --git a/src/epanet.c b/src/epanet.c index a4aae2b..a2e6307 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -144,64 +144,6 @@ void (* viewprog) (char *); /* Pointer to progress viewing function */ ---------------------------------------------------------------- */ -/*** This code is no longer required ***** //(2.00.11 - LR) -#ifdef DLL -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* reserved) -{ - viewprog = NULL; - return 1; -} -#endif -*****************************************/ - - -/* ----------------------------------------------------------------- - Entry point used to compile a stand-alone executable. ----------------------------------------------------------------- -*/ - -#ifdef CLE //(2.00.11 - LR) - -int main(int argc, char *argv[]) -/*-------------------------------------------------------------- -** Input: argc = number of command line arguments -** *argv[] = array of command line arguments -** Output: none -** Purpose: main program segment -** -** Command line for stand-alone operation is: -** progname f1 f2 f3 -** where progname = name of executable this code was compiled to, -** f1 = name of input file, f2 = name of report file, and -** f3 = name of binary output file (optional). -**-------------------------------------------------------------- -*/ -{ - char *f1,*f2,*f3; - char blank[] = ""; - int errcode; - -/* Check for proper number of command line arguments */ - if (argc < 3) writecon(FMT03); - else - { - - /* Call the main control function */ - f1 = argv[1]; - f2 = argv[2]; - if (argc > 3) f3 = argv[3]; - else f3 = blank; - writecon(FMT01); - errcode = ENepanet(f1,f2,f3,NULL); - if (errcode > 0) writecon(FMT11); - else if (Warnflag > 0) writecon(FMT10); - else writecon(FMT09); - } - return(0); -} /* End of main */ -#endif - /* ---------------------------------------------------------------- @@ -3295,10 +3237,10 @@ void writecon(char *s) **---------------------------------------------------------------- */ { -#ifdef CLE //(2.00.11 - LR) + //(2.00.11 - LR) fprintf(stdout,s); fflush(stdout); -#endif + } From dd286afe12b6ab175670d31ed84b0d10469a8e5f Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Fri, 12 Jun 2015 23:44:29 +0300 Subject: [PATCH 010/120] update include files --- .gitignore | 8 +++++++- include/epanet2.bas | 35 +++++++++++++++++++++-------------- include/epanet2.h | 38 ++++++++++++++++++++------------------ 3 files changed, 48 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index 9e6c1c7..afda7a6 100755 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,14 @@ *.slo *.lo *.o +*.map +*.exp +*.lib -# Compiled Dynamic libraries +# Compiled Dynamic libraries and executables *.so +*.dll +*.exe # Compiled Static libraries *.lai @@ -95,6 +100,7 @@ ipch/ *.psess *.vsp *.vspx +*.idb # Guidance Automation Toolkit *.gpState diff --git a/include/epanet2.bas b/include/epanet2.bas index 74d0b83..64e1b46 100644 --- a/include/epanet2.bas +++ b/include/epanet2.bas @@ -33,8 +33,8 @@ Global Const EN_MINLEVEL = 20 Global Const EN_MAXLEVEL = 21 Global Const EN_MIXFRACTION = 22 Global Const EN_TANK_KBULK = 23 - -Global Const EN_TANKVOLUME = 24 'ES +Global Const EN_TANKVOLUME = 24 +Global Const EN_MAXVOLUME = 25 Global Const EN_DIAMETER = 0 ' Link parameters Global Const EN_LENGTH = 1 @@ -62,7 +62,14 @@ Global Const EN_REPORTSTART = 6 Global Const EN_RULESTEP = 7 Global Const EN_STATISTIC = 8 Global Const EN_PERIODS = 9 -Global Const EN_STARTTIME = 10 'ES +Global Const EN_STARTTIME = 10 +Global Const EN_HTIME = 11 +Global Const EN_QTIME = 12 +Global Const EN_HALTFLAG = 13 +Global Const EN_NEXTEVENT = 14 + +Global Const EN_ITERATIONS = 0 +Global Const EN_RELATIVEERROR = 1 Global Const EN_NODECOUNT = 0 'Component counts Global Const EN_TANKCOUNT = 1 @@ -132,10 +139,6 @@ Global Const EN_SAVE = 1 Global Const EN_INITFLOW = 10 ' Re-initialize flow flag -Global Const EN_CONST_HP = 0 ' constant horsepower -Global Const EN_POWER_FUNC = 1 ' power function -Global Const EN_CUSTOM = 2 ' user-defined custom curve - 'These are the external functions that comprise the DLL Declare Function ENepanet Lib "epanet2.dll" (ByVal F1 As String, ByVal F2 As String, ByVal F3 As String, ByVal F4 As Any) As Long @@ -175,17 +178,20 @@ Global Const EN_CUSTOM = 2 ' user-defined custom curve Declare Function ENgetpatternid Lib "epanet2.dll" (ByVal Index As Long, ByVal ID As String) As Long Declare Function ENgetpatternlen Lib "epanet2.dll" (ByVal Index As Long, L As Long) As Long Declare Function ENgetpatternvalue Lib "epanet2.dll" (ByVal Index As Long, ByVal Period As Long, Value As Single) As Long + Declare Function ENgetaveragepatternvalue Lib "epanet2.dll" (ByVal Index As Long, Value As Single) As Long Declare Function ENgetqualtype Lib "epanet2.dll" (QualCode As Long, TraceNode As Long) As Long Declare Function ENgeterror Lib "epanet2.dll" (ByVal ErrCode As Long, ByVal ErrMsg As String, ByVal N As Long) + Declare Function ENgetstatistic Lib "epanet2.dll" (ByVal Code As Long, Value As Single) Declare Function ENgetnodeindex Lib "epanet2.dll" (ByVal ID As String, Index As Long) As Long Declare Function ENgetnodeid Lib "epanet2.dll" (ByVal Index As Long, ByVal ID As String) As Long Declare Function ENgetnodetype Lib "epanet2.dll" (ByVal Index As Long, Code As Long) As Long Declare Function ENgetnodevalue Lib "epanet2.dll" (ByVal Index As Long, ByVal Code As Long, Value As Single) As Long + Declare Function ENgetcoord Lib "epanet2.dll" (ByVal Index As Long, X As Single, Y As Single) As Long - Declare Function ENgetnumdemands Lib "epanet2.dll" (ByVal Index As Long, numDemands As Long) As Long 'ES - Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal Index As Long, ByVal DemandIndex As Long, Value As Single) As Long 'ES - Declare Function ENgetdemandpattern Lib "epanet2.dll" (ByVal Index As Long, ByVal DemandIndex As Long, PatIndex As Long) As Long 'ES + Declare Function ENgetnumdemands Lib "epanet2.dll" (ByVal Index As Long, numDemands As Long) As Long + Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal Index As Long, ByVal DemandIndex As Long, Value As Single) As Long + Declare Function ENgetdemandpattern Lib "epanet2.dll" (ByVal Index As Long, ByVal DemandIndex As Long, PatIndex As Long) As Long Declare Function ENgetlinkindex Lib "epanet2.dll" (ByVal ID As String, Index As Long) As Long Declare Function ENgetlinkid Lib "epanet2.dll" (ByVal Index As Long, ByVal ID As String) As Long @@ -193,9 +199,9 @@ Global Const EN_CUSTOM = 2 ' user-defined custom curve Declare Function ENgetlinknodes Lib "epanet2.dll" (ByVal Index As Long, Node1 As Long, Node2 As Long) As Long Declare Function ENgetlinkvalue Lib "epanet2.dll" (ByVal Index As Long, ByVal Code As Long, Value As Single) As Long - Declare Function ENgetcurve Lib "epanet2.dll" (ByVal CurveIndex As Long, nValues As Long, xValues As Any, yValues As Any) As Long 'ES - Declare Function ENgetheadcurve Lib "epanet2.dll" (ByVal Index As Long, ID As String) As Long 'ES - Declare Function ENgetpumptype Lib "epanet2.dll" (ByVal Index As Long, PumpType As Long) As Long 'ES + Declare Function ENgetcurve Lib "epanet2.dll" (ByVal CurveIndex As Long, CurveID As String, nValues As Long, xValues As Any, yValues As Any) As Long + Declare Function ENgetheadcurve Lib "epanet2.dll" (ByVal Index As Long, ID As String) As Long + Declare Function ENgetpumptype Lib "epanet2.dll" (ByVal Index As Long, PumpType As Long) As Long Declare Function ENgetversion Lib "epanet2.dll" (Value As Long) As Long @@ -209,4 +215,5 @@ Global Const EN_CUSTOM = 2 ' user-defined custom curve Declare Function ENsetoption Lib "epanet2.dll" (ByVal Code As Long, ByVal Value As Single) As Long Declare Function ENsetstatusreport Lib "epanet2.dll" (ByVal Code As Long) As Long Declare Function ENsetqualtype Lib "epanet2.dll" (ByVal QualCode As Long, ByVal ChemName As String, ByVal ChemUnits As String, ByVal TraceNode As String) As Long - + Declare Function ENgetqualinfo Lib "epanet2.dll" (QualCode As Long, ChemName As String, ChemUnits As String, TraceNode As Long) As Long + Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal NodeIndex As Long, ByVal DemandIndex As Long, BaseDemand As Single) As Long diff --git a/include/epanet2.h b/include/epanet2.h index 38c8561..2a5b312 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -19,26 +19,27 @@ #define EPANET2_H #ifndef EN_API_FLOAT_TYPE -#define EN_API_FLOAT_TYPE float + #define EN_API_FLOAT_TYPE float #endif #ifndef DLLEXPORT -#ifdef WINDOWS -#ifdef __cplusplus -#define DLLEXPORT extern "C" __declspec(dllexport) -#else -#define DLLEXPORT __declspec(dllexport) __stdcall -#endif // __cplusplus -#elif defined(CYGWIN) -#define DLLEXPORT __stdcall -#elif defined(__APPLE__) -#ifdef __cplusplus -#define DLLEXPORT -#else -#define DLLEXPORT -#endif -#endif + #ifdef WINDOWS + #ifdef __cplusplus + #define DLLEXPORT extern "C" __declspec(dllexport) + #else + #define DLLEXPORT __declspec(dllexport) __stdcall + #endif // __cplusplus + #elif defined(CYGWIN) + #define DLLEXPORT __stdcall + #elif defined(__APPLE__) + #ifdef __cplusplus + #define DLLEXPORT + #else + #define DLLEXPORT + #endif + #endif #endif + // --- Define the EPANET toolkit constants #define EN_ELEVATION 0 /* Node parameters */ @@ -238,7 +239,8 @@ extern "C" { int DLLEXPORT ENgetlinkvalue(int index, int code, EN_API_FLOAT_TYPE *value); int DLLEXPORT ENgetcurve(int curveIndex, char* id, int *nValues, EN_API_FLOAT_TYPE **xValues, EN_API_FLOAT_TYPE **yValues); - + int DLLEXPORT ENgetheadcurve(int, char *); + int DLLEXPORT ENgetpumptype(int, int *); int DLLEXPORT ENgetversion(int *version); @@ -259,4 +261,4 @@ extern "C" { } #endif -#endif //TOOLKIT_H \ No newline at end of file +#endif //EPANET2_H \ No newline at end of file From 79fb7ab9a4ed473093a5d2befe969bc5935ec8e6 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Fri, 12 Jun 2015 23:51:17 +0300 Subject: [PATCH 011/120] update def file --- src/epanet2.def | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/epanet2.def b/src/epanet2.def index a914dfc..fc84da2 100644 --- a/src/epanet2.def +++ b/src/epanet2.def @@ -59,6 +59,11 @@ EXPORTS ENgetnumdemands = _ENgetnumdemands@8 ENgetbasedemand = _ENgetbasedemand@12 ENgetdemandpattern = _ENgetdemandpattern@12 - ENgetcurve = _ENgetcurve@16 + ENgetcurve = _ENgetcurve@20 + ENgetstatistic = _ENgetstatistic@8 + ENgetcoord = _ENgetcoord@12 + ENgetqualinfo = _ENgetqualinfo@16 + ENsetbasedemand = _ENsetbasedemand@12 + ENgetaveragepatternvalue = _ENgetaveragepatternvalue@8 ENgetheadcurve = _ENgetheadcurve@8 ENgetpumptype = _ENgetpumptype@8 \ No newline at end of file From 82da5db7ec346a853520328b76ce60ae97f68bce Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sat, 13 Jun 2015 00:01:30 +0300 Subject: [PATCH 012/120] more c89 conformance variables should be declared at the beginning of functions --- src/epanet.c | 5 +++-- src/hash.c | 3 ++- src/quality.c | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index a2e6307..79a2fc7 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -3329,11 +3329,12 @@ int DLLEXPORT ENgetaveragepatternvalue(int index, EN_API_FLOAT_TYPE *value) ** and pattern **---------------------------------------------------------------- */ -{ *value = 0.0; +{ + int i; + *value = 0.0; if (!Openflag) return(102); if (index < 1 || index > Npats) return(205); //if (period < 1 || period > Pattern[index].Length) return(251); - int i; for (i=0; i Date: Sat, 13 Jun 2015 00:16:30 +0300 Subject: [PATCH 013/120] Check for open file in ENgetcurve and minor fixes --- src/epanet.c | 68 +++++++++++++++++++++++++++++----------------------- src/types.h | 2 +- 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index 79a2fc7..c89608d 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -12,8 +12,8 @@ DATE: 5/30/00 6/24/02 8/15/07 (2.00.11) 2/14/08 (2.00.12) -AUTHOR: L. Rossman - US EPA - NRMRL + AUTHORS: L. Rossman - US EPA - NRMRL + OpenWaterAnalytics members: see git stats for contributors EPANET performs extended period hydraulic and water quality analysis of looped, pressurized piping networks. The program consists of the @@ -37,7 +37,7 @@ The program can be compiled as either a stand-alone console application or as a dynamic link library (DLL) of function calls depending on whether the macro identifier 'DLL' is defined or not. -See TOOLKIT.H for function prototypes of exported DLL functions +See EPANET2.H for function prototypes of exported DLL functions See FUNCS.H for prototypes of all other functions See TYPES.H for declaration of global constants and data structures See VARS.H for declaration of global variables @@ -906,12 +906,11 @@ int DLLEXPORT ENgetversion(int *v) } -int DLLEXPORT ENgetcontrol(int cindex, int *ctype, int *lindex, - EN_API_FLOAT_TYPE *setting, int *nindex, EN_API_FLOAT_TYPE *level) +int DLLEXPORT ENgetcontrol(int cindex, int *ctype, int *lindex, EN_API_FLOAT_TYPE *setting, int *nindex, EN_API_FLOAT_TYPE *level) /*---------------------------------------------------------------- ** Input: cindex = control index (position of control statement ** in the input file, starting from 1) -** Output: *ctype = control type code (see TOOLKIT.H) +** Output: *ctype = control type code (see EPANET2.H) ** *lindex = index of controlled link ** *setting = control setting on link ** *nindex = index of controlling node (0 for TIMER @@ -962,7 +961,7 @@ int DLLEXPORT ENgetcontrol(int cindex, int *ctype, int *lindex, int DLLEXPORT ENgetcount(int code, int *count) /*---------------------------------------------------------------- -** Input: code = component code (see TOOLKIT.H) +** Input: code = component code (see EPANET2.H) ** Output: *count = number of components in network ** Returns: error code ** Purpose: retrieves the number of components of a @@ -988,7 +987,7 @@ int DLLEXPORT ENgetcount(int code, int *count) int DLLEXPORT ENgetoption(int code, EN_API_FLOAT_TYPE *value) /*---------------------------------------------------------------- -** Input: code = option code (see TOOLKIT.H) +** Input: code = option code (see EPANET2.H) ** Output: *value = option value ** Returns: error code ** Purpose: gets value for an analysis option @@ -1019,7 +1018,7 @@ int DLLEXPORT ENgetoption(int code, EN_API_FLOAT_TYPE *value) int DLLEXPORT ENgettimeparam(int code, long *value) /*---------------------------------------------------------------- -** Input: code = time parameter code (see TOOLKIT.H) +** Input: code = time parameter code (see EPANET2.H) ** Output: *value = value of time parameter ** Returns: error code ** Purpose: retrieves value of specific time parameter @@ -1056,7 +1055,7 @@ int DLLEXPORT ENgetflowunits(int *code) /*---------------------------------------------------------------- ** Input: none ** Output: *code = code of flow units in use -** (see TOOLKIT.H or TYPES.H) +** (see EPANET2.H or TYPES.H) ** Returns: error code ** Purpose: retrieves flow units code **---------------------------------------------------------------- @@ -1148,10 +1147,10 @@ int DLLEXPORT ENgetpatternvalue(int index, int period, EN_API_FLOAT_TYPE *value) } -int DLLEXPORT ENgetqualtype(int *qualcode, int *tracenode) +int DLLEXPORT ENgetqualtype(int *qualcode, int *tracenode) /*---------------------------------------------------------------- ** Input: none -** Output: *qualcode = WQ analysis code number (see TOOLKIT.H) +** Output: *qualcode = WQ analysis code number (see EPANET2.H) ** *tracenode = index of node being traced (if ** qualocode = WQ tracing) ** Returns: error code @@ -1272,7 +1271,7 @@ int DLLEXPORT ENgetnodeid(int index, char *id) int DLLEXPORT ENgetnodetype(int index, int *code) /*---------------------------------------------------------------- ** Input: index = node index -** Output: *code = node type code number (see TOOLKIT.H) +** Output: *code = node type code number (see EPANET2.H) ** Returns: error code ** Purpose: retrieves node type of specific node **---------------------------------------------------------------- @@ -1309,7 +1308,7 @@ int DLLEXPORT ENgetcoord(int index, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y) int DLLEXPORT ENgetnodevalue(int index, int code, EN_API_FLOAT_TYPE *value) /*---------------------------------------------------------------- ** Input: index = node index -** code = node parameter code (see TOOLKIT.H) +** code = node parameter code (see EPANET2.H) ** Output: *value = value of node's parameter ** Returns: error code ** Purpose: retrieves parameter value for a node @@ -1530,7 +1529,7 @@ int DLLEXPORT ENgetlinkid(int index, char *id) int DLLEXPORT ENgetlinktype(int index, int *code) /*------------------------------------------------------------------ ** Input: index = link index -** Output: *code = link type code number (see TOOLKIT.H) +** Output: *code = link type code number (see EPANET2.H) ** Returns: error code ** Purpose: retrieves link type of specific link **------------------------------------------------------------------ @@ -1567,7 +1566,7 @@ int DLLEXPORT ENgetlinknodes(int index, int *node1, int *node2) int DLLEXPORT ENgetlinkvalue(int index, int code, EN_API_FLOAT_TYPE *value) /*------------------------------------------------------------------ ** Input: index = link index -** code = link parameter code (see TOOLKIT.H) +** code = link parameter code (see EPANET2.H) ** Output: *value = value of link's parameter ** Returns: error code ** Purpose: retrieves parameter value for a link @@ -1720,21 +1719,29 @@ int DLLEXPORT ENgetcurve(int curveIndex, char* id, int *nValues, EN_API_FLOAT_T /*---------------------------------------------------------------- ** Input: curveIndex = curve index ** Output: *nValues = number of points on curve + ** id = curve ID ** *xValues = values for x ** *yValues = values for y ** Returns: error code - ** Purpose: retrieves end nodes of a specific link + ** Purpose: retrieves curve id, number of values and (x,y) values + ** + ** NOTE: 'id' must be able to hold MAXID characters **---------------------------------------------------------------- */ { - int err = 0; + int iPoint, nPoints; + Scurve curve; + EN_API_FLOAT_TYPE *pointX, *pointY; - Scurve curve = Curve[curveIndex]; - int nPoints = curve.Npts; +/* Check that input file opened */ + if (!Openflag) return(102); + + curve = Curve[curveIndex]; + nPoints = curve.Npts; + + pointX = calloc(nPoints, sizeof(EN_API_FLOAT_TYPE)); + pointY = calloc(nPoints, sizeof(EN_API_FLOAT_TYPE)); - EN_API_FLOAT_TYPE *pointX = calloc(nPoints, sizeof(EN_API_FLOAT_TYPE)); - EN_API_FLOAT_TYPE *pointY = calloc(nPoints, sizeof(EN_API_FLOAT_TYPE)); - int iPoint; for (iPoint = 0; iPoint < nPoints; iPoint++) { double x = curve.X[iPoint] * Ucf[LENGTH]; double y = curve.Y[iPoint] * Ucf[VOLUME]; @@ -1742,12 +1749,13 @@ int DLLEXPORT ENgetcurve(int curveIndex, char* id, int *nValues, EN_API_FLOAT_T pointY[iPoint] = (EN_API_FLOAT_TYPE)y; } + strncpy(id,"", MAXID); strncpy(id, curve.ID, MAXID); *nValues = nPoints; *xValues = pointX; *yValues = pointY; - return err; + return(0); } @@ -1763,7 +1771,7 @@ int DLLEXPORT ENsetcontrol(int cindex, int ctype, int lindex, /*---------------------------------------------------------------- ** Input: cindex = control index (position of control statement ** in the input file, starting from 1) -** ctype = control type code (see TOOLKIT.H) +** ctype = control type code (see EPANET2.H) ** lindex = index of controlled link ** setting = control setting applied to link ** nindex = index of controlling node (0 for TIMER @@ -1850,7 +1858,7 @@ int DLLEXPORT ENsetcontrol(int cindex, int ctype, int lindex, int DLLEXPORT ENsetnodevalue(int index, int code, EN_API_FLOAT_TYPE v) /*---------------------------------------------------------------- ** Input: index = node index -** code = node parameter code (see TOOLKIT.H) +** code = node parameter code (see EPANET2.H) ** value = parameter value ** Output: none ** Returns: error code @@ -2063,7 +2071,7 @@ int DLLEXPORT ENsetnodevalue(int index, int code, EN_API_FLOAT_TYPE v) int DLLEXPORT ENsetlinkvalue(int index, int code, EN_API_FLOAT_TYPE v) /*---------------------------------------------------------------- ** Input: index = link index -** code = link parameter code (see TOOLKIT.H) +** code = link parameter code (see EPANET2.H) ** v = parameter value ** Output: none ** Returns: error code @@ -2297,7 +2305,7 @@ int DLLEXPORT ENsetpatternvalue(int index, int period, EN_API_FLOAT_TYPE value int DLLEXPORT ENsettimeparam(int code, long value) /*---------------------------------------------------------------- -** Input: code = time parameter code (see TOOLKIT.H) +** Input: code = time parameter code (see EPANET2.H) ** value = time parameter value ** Output: none ** Returns: error code @@ -2389,7 +2397,7 @@ int DLLEXPORT ENsettimeparam(int code, long value) int DLLEXPORT ENsetoption(int code, EN_API_FLOAT_TYPE v) /*---------------------------------------------------------------- -** Input: code = option code (see TOOLKIT.H) +** Input: code = option code (see EPANET2.H) ** v = option value ** Output: none ** Returns: error code @@ -2450,7 +2458,7 @@ int DLLEXPORT ENsetstatusreport(int code) int DLLEXPORT ENsetqualtype(int qualcode, char *chemname, char *chemunits, char *tracenode) /*---------------------------------------------------------------- -** Input: qualcode = WQ parameter code (see TOOLKIT.H) +** Input: qualcode = WQ parameter code (see EPANET2.H) ** chemname = name of WQ constituent ** chemunits = concentration units of WQ constituent ** tracenode = ID of node being traced diff --git a/src/types.h b/src/types.h index 3119edd..f422a40 100755 --- a/src/types.h +++ b/src/types.h @@ -28,7 +28,7 @@ AUTHOR: L. Rossman Definition of 4-byte integers & reals ------------------------------------------- */ -typedef double REAL4; //(2.00.11 - LR) +typedef float REAL4; //(2.00.11 - LR) typedef int INT4; //(2.00.12 - LR) /* From 2c81796f7166bf56f12c9dd5fa7dede300f38754 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sat, 13 Jun 2015 00:32:26 +0300 Subject: [PATCH 014/120] One click compilation for Win DLL & EXE --- build/WinSDK/Readme.txt | 17 ----------------- build/WinSDK/dll_win_make.bat | 11 ----------- build/WinSDK/exe_win_make.bat | 11 ----------- build/WinSDK/win_make.bat | 22 ++++++++++++++++++++++ include/epanet2.h | 10 ++++++++++ 5 files changed, 32 insertions(+), 39 deletions(-) delete mode 100644 build/WinSDK/Readme.txt delete mode 100644 build/WinSDK/dll_win_make.bat delete mode 100644 build/WinSDK/exe_win_make.bat create mode 100644 build/WinSDK/win_make.bat diff --git a/build/WinSDK/Readme.txt b/build/WinSDK/Readme.txt deleted file mode 100644 index c7d5f1c..0000000 --- a/build/WinSDK/Readme.txt +++ /dev/null @@ -1,17 +0,0 @@ -For compiling EPANET2.DLL : - -Open the EPANET.C file and make sure that the line - #define DLL - is not commented out while the lines - #define CLE - #define SOL - are commented out. - -For compiling EPANET2.EXE : - -Open the EPANET.C file and make sure that the line - #define CLE - is not commented out while the lines - #define DLL - #define SOL - are commented out. diff --git a/build/WinSDK/dll_win_make.bat b/build/WinSDK/dll_win_make.bat deleted file mode 100644 index 611b64f..0000000 --- a/build/WinSDK/dll_win_make.bat +++ /dev/null @@ -1,11 +0,0 @@ -rem : set path to Windows SDK -SET SDK_PATH="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\" - -rem : set path for source EPANET files -SET SRC_PATH="D:\Projects\EPANET\Open Source\Code\owa\EPANET\src" - -CALL %SDK_PATH%SetEnv.cmd /x86 /release -CHDIR /D %SRC_PATH% - -rem : do the magic ... -cl -o epanet2.dll epanet.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /link /DLL /def:epanet2.def /MAP \ No newline at end of file diff --git a/build/WinSDK/exe_win_make.bat b/build/WinSDK/exe_win_make.bat deleted file mode 100644 index d068859..0000000 --- a/build/WinSDK/exe_win_make.bat +++ /dev/null @@ -1,11 +0,0 @@ -rem : set path to Windows SDK -SET SDK_PATH="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\" - -rem : set path for source EPANET files -SET SRC_PATH="D:\Projects\EPANET\Open Source\Code\owa\EPANET\src" - -CALL %SDK_PATH%SetEnv.cmd /x86 /release -CHDIR /D %SRC_PATH% - -rem : do the magic ... -cl -o epanet2.exe ..\run\main.c /I ..\include /I ..\run /I ..\src /link \ No newline at end of file diff --git a/build/WinSDK/win_make.bat b/build/WinSDK/win_make.bat new file mode 100644 index 0000000..321dd7f --- /dev/null +++ b/build/WinSDK/win_make.bat @@ -0,0 +1,22 @@ +rem : set path to Windows SDK +SET SDK_PATH="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\" + +rem : set path for source EPANET files +SET SRC_PATH="D:\Projects\EPANET\Open Source\Code\owa\EPANET\src" + +CALL %SDK_PATH%SetEnv.cmd /x86 /release +CHDIR /D %SRC_PATH% +del %SRC_PATH%\*.dll +del %SRC_PATH%\*.exe + +rem : do the magic ... + rem : creat EPANET2.DLL + cl -o epanet2.dll epanet.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /link /DLL /def:epanet2.def /MAP + rem : creat EPANET2.EXE + cl -o epanet2.exe epanet.c ..\run\main.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /I ..\src /link + +rem : a bit of housekeeping and cleaning +del %SRC_PATH%\*.obj +del %SRC_PATH%\*.exp +del %SRC_PATH%\*.lib +del %SRC_PATH%\*.map diff --git a/include/epanet2.h b/include/epanet2.h index 2a5b312..8527d83 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -22,6 +22,16 @@ #define EN_API_FLOAT_TYPE float #endif +// --- define WINDOWS +#undef WINDOWS +#ifdef _WIN32 + #define WINDOWS +#endif +#ifdef __WIN32__ + #define WINDOWS +#endif + +// --- define DLLEXPORT #ifndef DLLEXPORT #ifdef WINDOWS #ifdef __cplusplus From 336c87cc910c6d1f5247285d8112b21a1110cd6e Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sat, 13 Jun 2015 00:52:38 +0300 Subject: [PATCH 015/120] fix for include file --- include/epanet2.bas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/epanet2.bas b/include/epanet2.bas index 64e1b46..08e22b8 100644 --- a/include/epanet2.bas +++ b/include/epanet2.bas @@ -199,8 +199,8 @@ Global Const EN_INITFLOW = 10 ' Re-initialize flow flag Declare Function ENgetlinknodes Lib "epanet2.dll" (ByVal Index As Long, Node1 As Long, Node2 As Long) As Long Declare Function ENgetlinkvalue Lib "epanet2.dll" (ByVal Index As Long, ByVal Code As Long, Value As Single) As Long - Declare Function ENgetcurve Lib "epanet2.dll" (ByVal CurveIndex As Long, CurveID As String, nValues As Long, xValues As Any, yValues As Any) As Long - Declare Function ENgetheadcurve Lib "epanet2.dll" (ByVal Index As Long, ID As String) As Long + Declare Function ENgetcurve Lib "epanet2.dll" (ByVal CurveIndex As Long, ByVal CurveID As String, nValues As Long, xValues As Any, yValues As Any) As Long + Declare Function ENgetheadcurve Lib "epanet2.dll" (ByVal Index As Long, ByVal ID As String) As Long Declare Function ENgetpumptype Lib "epanet2.dll" (ByVal Index As Long, PumpType As Long) As Long Declare Function ENgetversion Lib "epanet2.dll" (Value As Long) As Long From fb63b874f86a877963a6dc3f4d4570e5d51c7ad3 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sun, 14 Jun 2015 07:55:42 +0300 Subject: [PATCH 016/120] Moving def file into build --- {src => build/WinSDK}/epanet2.def | 0 build/WinSDK/win_make.bat | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename {src => build/WinSDK}/epanet2.def (100%) diff --git a/src/epanet2.def b/build/WinSDK/epanet2.def similarity index 100% rename from src/epanet2.def rename to build/WinSDK/epanet2.def diff --git a/build/WinSDK/win_make.bat b/build/WinSDK/win_make.bat index 321dd7f..cdfd45b 100644 --- a/build/WinSDK/win_make.bat +++ b/build/WinSDK/win_make.bat @@ -11,7 +11,7 @@ del %SRC_PATH%\*.exe rem : do the magic ... rem : creat EPANET2.DLL - cl -o epanet2.dll epanet.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /link /DLL /def:epanet2.def /MAP + cl -o epanet2.dll epanet.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /link /DLL /def:..\build\winsdk\epanet2.def /MAP rem : creat EPANET2.EXE cl -o epanet2.exe epanet.c ..\run\main.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /I ..\src /link @@ -19,4 +19,4 @@ rem : a bit of housekeeping and cleaning del %SRC_PATH%\*.obj del %SRC_PATH%\*.exp del %SRC_PATH%\*.lib -del %SRC_PATH%\*.map +del %SRC_PATH%\*.map \ No newline at end of file From 82553cc422545fdf9afdb0e9ada8b61c41df7f16 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Mon, 15 Jun 2015 21:01:50 +0300 Subject: [PATCH 017/120] Add header documentation for new functions --- src/epanet.c | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index c89608d..5924c23 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -3270,7 +3270,16 @@ void writewin(char *s) } #endif } + + int DLLEXPORT ENgetnumdemands(int nodeIndex, int *numDemands) +/*---------------------------------------------------------------- + ** Input: nodeIndex = index of node + ** Output: *numDemands = number of demand catagories + ** Returns: error code + ** Purpose: retrieves the number of a demand catagories for a node + **---------------------------------------------------------------- + */ { Pdemand d; int n=0; @@ -3281,7 +3290,17 @@ int DLLEXPORT ENgetnumdemands(int nodeIndex, int *numDemands) *numDemands=n; return 0; } + + int DLLEXPORT ENgetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE *baseDemand) +/*---------------------------------------------------------------- + ** Input: nodeIndex = index of node + ** demandIdx = index of demand catagory + ** Output: *baseDemand = base demand for selected catagory + ** Returns: error code + ** Purpose: retrieves the node's base demand for a catagory + **---------------------------------------------------------------- + */ { Pdemand d; int n=1; @@ -3299,7 +3318,17 @@ int DLLEXPORT ENgetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE * return 0; } + + int DLLEXPORT ENsetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE baseDemand) +/*---------------------------------------------------------------- + ** Input: nodeIndex = index of node + ** demandIdx = index of demand catagory + ** baseDemand = base demand for selected catagory + ** Returns: error code + ** Purpose: sets the node's base demand for a catagory + **---------------------------------------------------------------- + */ { Pdemand d; int n=1; @@ -3314,7 +3343,17 @@ int DLLEXPORT ENsetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE b return 0; } + int DLLEXPORT ENgetdemandpattern(int nodeIndex, int demandIdx, int *pattIdx) +/*---------------------------------------------------------------- + ** Input: nodeIndex = index of node + ** demandIdx = index of demand catagory + ** Output: *pattIdx = demand pattern index + ** Returns: error code + ** Purpose: retrieves the index of a demand pattern for a specific + ** demand catagory of a node + **---------------------------------------------------------------- + */ { Pdemand d; int n=1; @@ -3327,14 +3366,13 @@ int DLLEXPORT ENgetdemandpattern(int nodeIndex, int demandIdx, int *pattIdx) return 0; } + int DLLEXPORT ENgetaveragepatternvalue(int index, EN_API_FLOAT_TYPE *value) /*---------------------------------------------------------------- ** Input: index = index of time pattern - ** period = pattern time period - ** Output: *value = pattern multiplier + ** Output: *value = pattern average value ** Returns: error code - ** Purpose: retrieves multiplier for a specific time period - ** and pattern + ** Purpose: retrieves the average value of a pattern **---------------------------------------------------------------- */ { From 62730e6281ac45f0a86481a729e70ed7df7b33db Mon Sep 17 00:00:00 2001 From: Demetrios Eliades Date: Tue, 16 Jun 2015 09:42:07 +0300 Subject: [PATCH 018/120] Make files with relative paths Based on @eladsal's code. Location of Microsoft SDK is now retrieved from the registry. Also x86 and x64-bit architectures are included. --- build/WinSDK/makeWINx64.bat | 29 +++++++++++++++++++++++++++++ build/WinSDK/makeWINx86.bat | 29 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 build/WinSDK/makeWINx64.bat create mode 100644 build/WinSDK/makeWINx86.bat diff --git a/build/WinSDK/makeWINx64.bat b/build/WinSDK/makeWINx64.bat new file mode 100644 index 0000000..96e8106 --- /dev/null +++ b/build/WinSDK/makeWINx64.bat @@ -0,0 +1,29 @@ +rem : set path to Windows SDK +Set Reg.Key=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows +Set Reg.Val=CurrentInstallFolder + +For /F "Tokens=2*" %%A In ('Reg Query "%Reg.Key%" /v "%Reg.Val%" ^| Find /I "%Reg.Val%"' ) Do Call Set SDK_PATH=%%B +echo %SDK_PATH% + + +CALL "%SDK_PATH%bin\"SetEnv.cmd /x64 /release + +rem : set path for source EPANET files +SET SRC_PATH="D:\Projects\EPANET\Open Source\Code\owa\EPANET\src" +cd ..\..\src +set SRC_PATH=%CD% + +del %SRC_PATH%\*.dll +del %SRC_PATH%\*.exe + +rem : do the magic ... + rem : create EPANET2.DLL + cl -o epanet2.dll epanet.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /link /DLL /def:..\build\winsdk\epanet2.def /MAP + rem : create EPANET2.EXE + cl -o epanet2.exe epanet.c ..\run\main.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /I ..\src /link + +rem : a bit of housekeeping and cleaning +del %SRC_PATH%\*.obj +del %SRC_PATH%\*.exp +del %SRC_PATH%\*.lib +del %SRC_PATH%\*.map \ No newline at end of file diff --git a/build/WinSDK/makeWINx86.bat b/build/WinSDK/makeWINx86.bat new file mode 100644 index 0000000..9382c47 --- /dev/null +++ b/build/WinSDK/makeWINx86.bat @@ -0,0 +1,29 @@ +rem : set path to Windows SDK +Set Reg.Key=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows +Set Reg.Val=CurrentInstallFolder + +For /F "Tokens=2*" %%A In ('Reg Query "%Reg.Key%" /v "%Reg.Val%" ^| Find /I "%Reg.Val%"' ) Do Call Set SDK_PATH=%%B +echo %SDK_PATH% + + +CALL "%SDK_PATH%bin\"SetEnv.cmd /x86 /release + +rem : set path for source EPANET files +SET SRC_PATH="D:\Projects\EPANET\Open Source\Code\owa\EPANET\src" +cd ..\..\src +set SRC_PATH=%CD% + +del %SRC_PATH%\*.dll +del %SRC_PATH%\*.exe + +rem : do the magic ... + rem : create EPANET2.DLL + cl -o epanet2.dll epanet.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /link /DLL /def:..\build\winsdk\epanet2.def /MAP + rem : create EPANET2.EXE + cl -o epanet2.exe epanet.c ..\run\main.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /I ..\src /link + +rem : a bit of housekeeping and cleaning +del %SRC_PATH%\*.obj +del %SRC_PATH%\*.exp +del %SRC_PATH%\*.lib +del %SRC_PATH%\*.map \ No newline at end of file From 91aa538adfeb0f786dba0c8b3f6927b8717460f7 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Thu, 25 Jun 2015 23:46:28 +0300 Subject: [PATCH 019/120] minor fix to VB header module --- include/epanet2.bas | 6 +++--- src/epanet.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/epanet2.bas b/include/epanet2.bas index 08e22b8..8df46c5 100644 --- a/include/epanet2.bas +++ b/include/epanet2.bas @@ -180,8 +180,8 @@ Global Const EN_INITFLOW = 10 ' Re-initialize flow flag Declare Function ENgetpatternvalue Lib "epanet2.dll" (ByVal Index As Long, ByVal Period As Long, Value As Single) As Long Declare Function ENgetaveragepatternvalue Lib "epanet2.dll" (ByVal Index As Long, Value As Single) As Long Declare Function ENgetqualtype Lib "epanet2.dll" (QualCode As Long, TraceNode As Long) As Long - Declare Function ENgeterror Lib "epanet2.dll" (ByVal ErrCode As Long, ByVal ErrMsg As String, ByVal N As Long) - Declare Function ENgetstatistic Lib "epanet2.dll" (ByVal Code As Long, Value As Single) + Declare Function ENgeterror Lib "epanet2.dll" (ByVal ErrCode As Long, ByVal ErrMsg As String, ByVal N As Long) As Long + Declare Function ENgetstatistic Lib "epanet2.dll" (ByVal Code As Long, Value As Single) As Long Declare Function ENgetnodeindex Lib "epanet2.dll" (ByVal ID As String, Index As Long) As Long Declare Function ENgetnodeid Lib "epanet2.dll" (ByVal Index As Long, ByVal ID As String) As Long @@ -216,4 +216,4 @@ Global Const EN_INITFLOW = 10 ' Re-initialize flow flag Declare Function ENsetstatusreport Lib "epanet2.dll" (ByVal Code As Long) As Long Declare Function ENsetqualtype Lib "epanet2.dll" (ByVal QualCode As Long, ByVal ChemName As String, ByVal ChemUnits As String, ByVal TraceNode As String) As Long Declare Function ENgetqualinfo Lib "epanet2.dll" (QualCode As Long, ChemName As String, ChemUnits As String, TraceNode As Long) As Long - Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal NodeIndex As Long, ByVal DemandIndex As Long, BaseDemand As Single) As Long + Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal NodeIndex As Long, ByVal DemandIndex As Long, ByVal BaseDemand As Single) As Long diff --git a/src/epanet.c b/src/epanet.c index 5924c23..c98dd4d 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -3319,7 +3319,6 @@ int DLLEXPORT ENgetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE * } - int DLLEXPORT ENsetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE baseDemand) /*---------------------------------------------------------------- ** Input: nodeIndex = index of node From cdbd08acca1471611b27ce5bff28d2c9175b9862 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Tue, 30 Jun 2015 19:39:06 +0300 Subject: [PATCH 020/120] Added error code and description for wrong demand category index --- src/epanet.c | 23 ++++++++++++----------- src/text.h | 2 ++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index c98dd4d..3d5e7f9 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -3198,7 +3198,8 @@ char *geterrmsg(int errcode) case 241: sprintf(Msg,ERR241,t_FUNCCALL,""); break; case 250: sprintf(Msg,ERR250); break; case 251: sprintf(Msg,ERR251); break; - + case 253: sprintf(Msg,ERR253); break; + /* File Errors */ case 301: strcpy(Msg,ERR301); break; case 302: strcpy(Msg,ERR302); break; @@ -3275,9 +3276,9 @@ void writewin(char *s) int DLLEXPORT ENgetnumdemands(int nodeIndex, int *numDemands) /*---------------------------------------------------------------- ** Input: nodeIndex = index of node - ** Output: *numDemands = number of demand catagories + ** Output: *numDemands = number of demand categories ** Returns: error code - ** Purpose: retrieves the number of a demand catagories for a node + ** Purpose: retrieves the number of a demand categories for a node **---------------------------------------------------------------- */ { @@ -3295,10 +3296,10 @@ int DLLEXPORT ENgetnumdemands(int nodeIndex, int *numDemands) int DLLEXPORT ENgetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE *baseDemand) /*---------------------------------------------------------------- ** Input: nodeIndex = index of node - ** demandIdx = index of demand catagory - ** Output: *baseDemand = base demand for selected catagory + ** demandIdx = index of demand category + ** Output: *baseDemand = base demand for selected category ** Returns: error code - ** Purpose: retrieves the node's base demand for a catagory + ** Purpose: retrieves the node's base demand for a category **---------------------------------------------------------------- */ { @@ -3322,10 +3323,10 @@ int DLLEXPORT ENgetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE * int DLLEXPORT ENsetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE baseDemand) /*---------------------------------------------------------------- ** Input: nodeIndex = index of node - ** demandIdx = index of demand catagory - ** baseDemand = base demand for selected catagory + ** demandIdx = index of demand category + ** baseDemand = base demand for selected category ** Returns: error code - ** Purpose: sets the node's base demand for a catagory + ** Purpose: sets the node's base demand for a category **---------------------------------------------------------------- */ { @@ -3346,11 +3347,11 @@ int DLLEXPORT ENsetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE b int DLLEXPORT ENgetdemandpattern(int nodeIndex, int demandIdx, int *pattIdx) /*---------------------------------------------------------------- ** Input: nodeIndex = index of node - ** demandIdx = index of demand catagory + ** demandIdx = index of demand category ** Output: *pattIdx = demand pattern index ** Returns: error code ** Purpose: retrieves the index of a demand pattern for a specific - ** demand catagory of a node + ** demand category of a node **---------------------------------------------------------------- */ { diff --git a/src/text.h b/src/text.h index 890e099..6d87cd8 100755 --- a/src/text.h +++ b/src/text.h @@ -493,6 +493,8 @@ AUTHOR: L. Rossman #define ERR250 "Input Error 250: function call contains invalid format." #define ERR251 "Input Error 251: function call contains invalid parameter code." +#define ERR253 "Input Error 253: Function call error - No such demand category index." + #define ERR301 "File Error 301: identical file names." #define ERR302 "File Error 302: cannot open input file." #define ERR303 "File Error 303: cannot open report file." From ce633b61bd14b3f8ec7fb72f6cdfa725af91fb10 Mon Sep 17 00:00:00 2001 From: Demetrios Eliades Date: Sat, 4 Jul 2015 15:18:55 +0300 Subject: [PATCH 021/120] Bug correction for Windows x64 compilation code. There seems to be an issue when creating the def file, so this was removed. Also an absolute path which was included by accident was removed. --- build/WinSDK/makeWINx64.bat | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/WinSDK/makeWINx64.bat b/build/WinSDK/makeWINx64.bat index 96e8106..49acc49 100644 --- a/build/WinSDK/makeWINx64.bat +++ b/build/WinSDK/makeWINx64.bat @@ -9,7 +9,6 @@ echo %SDK_PATH% CALL "%SDK_PATH%bin\"SetEnv.cmd /x64 /release rem : set path for source EPANET files -SET SRC_PATH="D:\Projects\EPANET\Open Source\Code\owa\EPANET\src" cd ..\..\src set SRC_PATH=%CD% @@ -18,7 +17,7 @@ del %SRC_PATH%\*.exe rem : do the magic ... rem : create EPANET2.DLL - cl -o epanet2.dll epanet.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /link /DLL /def:..\build\winsdk\epanet2.def /MAP + cl -o epanet2.dll epanet.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /link /DLL rem : create EPANET2.EXE cl -o epanet2.exe epanet.c ..\run\main.c hash.c hydraul.c inpfile.c input1.c input2.c input3.c mempool.c output.c quality.c report.c rules.c smatrix.c /I ..\include /I ..\run /I ..\src /link From fecac0a03f4a8aed24b4f907241aec5cd4b4c81c Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Tue, 21 Jul 2015 21:07:58 +0300 Subject: [PATCH 022/120] module file for VB.Net prepared by Lew Rossman --- include/epanet2.vb | 217 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 include/epanet2.vb diff --git a/include/epanet2.vb b/include/epanet2.vb new file mode 100644 index 0000000..4e8b9f0 --- /dev/null +++ b/include/epanet2.vb @@ -0,0 +1,217 @@ + +'EPANET2.VB +' +'Declarations of functions in the EPANET PROGRAMMERs TOOLKIT +'(EPANET2.DLL) for use with VB.Net. + +'Last updated on 7/19/15 - LR + +Imports System.Runtime.InteropServices +Imports System.Text + +Module Epanet2 + +' These are codes used by the DLL functions +Public Const EN_ELEVATION = 0 ' Node parameters +Public Const EN_BASEDEMAND = 1 +Public Const EN_PATTERN = 2 +Public Const EN_EMITTER = 3 +Public Const EN_INITQUAL = 4 +Public Const EN_SOURCEQUAL = 5 +Public Const EN_SOURCEPAT = 6 +Public Const EN_SOURCETYPE = 7 +Public Const EN_TANKLEVEL = 8 +Public Const EN_DEMAND = 9 +Public Const EN_HEAD = 10 +Public Const EN_PRESSURE = 11 +Public Const EN_QUALITY = 12 +Public Const EN_SOURCEMASS = 13 +Public Const EN_INITVOLUME = 14 +Public Const EN_MIXMODEL = 15 +Public Const EN_MIXZONEVOL = 16 + +Public Const EN_TANKDIAM = 17 +Public Const EN_MINVOLUME = 18 +Public Const EN_VOLCURVE = 19 +Public Const EN_MINLEVEL = 20 +Public Const EN_MAXLEVEL = 21 +Public Const EN_MIXFRACTION = 22 +Public Const EN_TANK_KBULK = 23 + +Public Const EN_TANKVOLUME = 24 'ES + +Public Const EN_DIAMETER = 0 ' Link parameters +Public Const EN_LENGTH = 1 +Public Const EN_ROUGHNESS = 2 +Public Const EN_MINORLOSS = 3 +Public Const EN_INITSTATUS = 4 +Public Const EN_INITSETTING = 5 +Public Const EN_KBULK = 6 +Public Const EN_KWALL = 7 +Public Const EN_FLOW = 8 +Public Const EN_VELOCITY = 9 +Public Const EN_HEADLOSS = 10 +Public Const EN_STATUS = 11 +Public Const EN_SETTING = 12 +Public Const EN_ENERGY = 13 +Public Const EN_LINKQUAL = 14 'ES + +Public Const EN_DURATION = 0 ' Time parameters +Public Const EN_HYDSTEP = 1 +Public Const EN_QUALSTEP = 2 +Public Const EN_PATTERNSTEP = 3 +Public Const EN_PATTERNSTART = 4 +Public Const EN_REPORTSTEP = 5 +Public Const EN_REPORTSTART = 6 +Public Const EN_RULESTEP = 7 +Public Const EN_STATISTIC = 8 +Public Const EN_PERIODS = 9 +Public Const EN_STARTTIME = 10 'ES + +Public Const EN_NODECOUNT = 0 'Component counts +Public Const EN_TANKCOUNT = 1 +Public Const EN_LINKCOUNT = 2 +Public Const EN_PATCOUNT = 3 +Public Const EN_CURVECOUNT = 4 +Public Const EN_CONTROLCOUNT = 5 + +Public Const EN_JUNCTION = 0 ' Node types +Public Const EN_RESERVOIR = 1 +Public Const EN_TANK = 2 + +Public Const EN_CVPIPE = 0 ' Link types +Public Const EN_PIPE = 1 +Public Const EN_PUMP = 2 +Public Const EN_PRV = 3 +Public Const EN_PSV = 4 +Public Const EN_PBV = 5 +Public Const EN_FCV = 6 +Public Const EN_TCV = 7 +Public Const EN_GPV = 8 + +Public Const EN_NONE = 0 ' Quality analysis types +Public Const EN_CHEM = 1 +Public Const EN_AGE = 2 +Public Const EN_TRACE = 3 + +Public Const EN_CONCEN = 0 ' Source quality types +Public Const EN_MASS = 1 +Public Const EN_SETPOINT = 2 +Public Const EN_FLOWPACED = 3 + +Public Const EN_CFS = 0 ' Flow units types +Public Const EN_GPM = 1 +Public Const EN_MGD = 2 +Public Const EN_IMGD = 3 +Public Const EN_AFD = 4 +Public Const EN_LPS = 5 +Public Const EN_LPM = 6 +Public Const EN_MLD = 7 +Public Const EN_CMH = 8 +Public Const EN_CMD = 9 + +Public Const EN_TRIALS = 0 ' Misc. options +Public Const EN_ACCURACY = 1 +Public Const EN_TOLERANCE = 2 +Public Const EN_EMITEXPON = 3 +Public Const EN_DEMANDMULT = 4 + +Public Const EN_LOWLEVEL = 0 ' Control types +Public Const EN_HILEVEL = 1 +Public Const EN_TIMER = 2 +Public Const EN_TIMEOFDAY = 3 + +Public Const EN_AVERAGE = 1 'Time statistic types +Public Const EN_MINIMUM = 2 +Public Const EN_MAXIMUM = 3 +Public Const EN_RANGE = 4 + +Public Const EN_MIX1 = 0 'Tank mixing models +Public Const EN_MIX2 = 1 +Public Const EN_FIFO = 2 +Public Const EN_LIFO = 3 + +Public Const EN_NOSAVE = 0 ' Save-results-to-file flag +Public Const EN_SAVE = 1 +Public Const EN_INITFLOW = 10 ' Re-initialize flow flag + +Public Const EN_CONST_HP = 0 ' constant horsepower +Public Const EN_POWER_FUNC = 1 ' power function +Public Const EN_CUSTOM = 2 ' user-defined custom curve + +'These are the external functions that comprise the DLL + + Declare Function ENepanet Lib "epanet2.dll" (ByVal F1 As String, ByVal F2 As String, ByVal F3 As String, ByVal F4 As String) As Int32 + Declare Function ENopen Lib "epanet2.dll" (ByVal F1 As String, ByVal F2 As String, ByVal F3 As String) As Int32 + Declare Function ENsaveinpfile Lib "epanet2.dll" (ByVal F As String) As Int32 + Declare Function ENclose Lib "epanet2.dll" () As Int32 + + Declare Function ENsolveH Lib "epanet2.dll" () As Int32 + Declare Function ENsaveH Lib "epanet2.dll" () As Int32 + Declare Function ENopenH Lib "epanet2.dll" () As Int32 + Declare Function ENinitH Lib "epanet2.dll" (ByVal SaveFlag As Int32) As Int32 + Declare Function ENrunH Lib "epanet2.dll" (ByRef T As Int32) As Int32 + Declare Function ENnextH Lib "epanet2.dll" (ByRef Tstep As Int32) As Int32 + Declare Function ENcloseH Lib "epanet2.dll" () As Int32 + Declare Function ENsavehydfile Lib "epanet2.dll" (ByVal F As String) As Int32 + Declare Function ENusehydfile Lib "epanet2.dll" (ByVal F As String) As Int32 + + Declare Function ENsolveQ Lib "epanet2.dll" () As Int32 + Declare Function ENopenQ Lib "epanet2.dll" () As Int32 + Declare Function ENinitQ Lib "epanet2.dll" (ByVal SaveFlag As Int32) As Int32 + Declare Function ENrunQ Lib "epanet2.dll" (ByRef T As Int32) As Int32 + Declare Function ENnextQ Lib "epanet2.dll" (ByRef Tstep As Int32) As Int32 + Declare Function ENstepQ Lib "epanet2.dll" (ByRef Tleft As Int32) As Int32 + Declare Function ENcloseQ Lib "epanet2.dll" () As Int32 + + Declare Function ENwriteline Lib "epanet2.dll" (ByVal S As String) As Int32 + Declare Function ENreport Lib "epanet2.dll" () As Int32 + Declare Function ENresetreport Lib "epanet2.dll" () As Int32 + Declare Function ENsetreport Lib "epanet2.dll" (ByVal S As String) As Int32 + + Declare Function ENgetcontrol Lib "epanet2.dll" (ByVal Cindex As Int32, Ctype As Int32, Lindex As Int32, Setting As Single, Nindex As Int32, Level As Single) As Int32 + Declare Function ENgetcount Lib "epanet2.dll" (ByVal Code As Int32, ByRef Value As Int32) As Int32 + Declare Function ENgetoption Lib "epanet2.dll" (ByVal Code As Int32, ByRef Value As Single) As Int32 + Declare Function ENgettimeparam Lib "epanet2.dll" (ByVal Code As Int32, ByRef Value As Int32) As Int32 + Declare Function ENgetflowunits Lib "epanet2.dll" (ByRef Code As Int32) As Int32 + Declare Function ENgetpatternindex Lib "epanet2.dll" (ByVal ID As String, ByRef Index As Int32) As Int32 + Declare Function ENgetpatternid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32 + Declare Function ENgetpatternlen Lib "epanet2.dll" (ByVal Index As Int32, ByRef L As Int32) As Int32 + Declare Function ENgetpatternvalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Period As Int32, ByRef Value As Single) As Int32 + Declare Function ENgetqualtype Lib "epanet2.dll" (ByRef QualCode As Int32, ByRef TraceNode As Int32) As Int32 + Declare Function ENgeterror Lib "epanet2.dll" (ByVal ErrCode As Int32, ByVal ErrMsg As StringBuilder, ByVal N As Int32) + + Declare Function ENgetnodeindex Lib "epanet2.dll" (ByVal ID As String, ByRef Index As Int32) As Int32 + Declare Function ENgetnodeid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32 + Declare Function ENgetnodetype Lib "epanet2.dll" (ByVal Index As Int32, ByRef Code As Int32) As Int32 + Declare Function ENgetnodevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByRef Value As Single) As Int32 + + Declare Function ENgetnumdemands Lib "epanet2.dll" (ByVal Index As Int32, ByRef numDemands As Int32) As Int32 'ES + Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByRef Value As Single) As Int32 'ES + Declare Function ENgetdemandpattern Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByRef PatIndex As Int32) As Int32 'ES + + Declare Function ENgetlinkindex Lib "epanet2.dll" (ByVal ID As String, ByRef Index As Int32) As Int32 + Declare Function ENgetlinkid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32 + Declare Function ENgetlinktype Lib "epanet2.dll" (ByVal Index As Int32, ByRef Code As Int32) As Int32 + Declare Function ENgetlinknodes Lib "epanet2.dll" (ByVal Index As Int32, ByRef Node1 As Int32, ByRef Node2 As Int32) As Int32 + Declare Function ENgetlinkvalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByRef Value As Single) As Int32 + + Declare Function ENgetcurve Lib "epanet2.dll" (ByVal CurveIndex As Int32, ByRef nValues As Int32, ByRef xValues As Single, ByRef yValues As Single) As Int32 'ES + Declare Function ENgetheadcurve Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32 'ES + Declare Function ENgetpumptype Lib "epanet2.dll" (ByVal Index As Int32, ByRef PumpType As Int32) As Int32 'ES + + Declare Function ENgetversion Lib "epanet2.dll" (ByRef Value As Int32) As Int32 + + Declare Function ENsetcontrol Lib "epanet2.dll" (ByVal Cindex As Int32, ByVal Ctype As Int32, ByVal Lindex As Int32, ByVal Setting As Single, ByVal Nindex As Int32, ByVal Level As Single) As Int32 + Declare Function ENsetnodevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByVal Value As Single) As Int32 + Declare Function ENsetlinkvalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByVal Value As Single) As Int32 + Declare Function ENsetpattern Lib "epanet2.dll" (ByVal Index as Int32, ByRef F as Single, ByVal N as Int32) as Int32 + Declare Function ENsetpatternvalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Period As Int32, ByVal Value As Single) As Int32 + Declare Function ENsettimeparam Lib "epanet2.dll" (ByVal Code As Int32, ByVal Value As Int32) As Int32 + Declare Function ENsetoption Lib "epanet2.dll" (ByVal Code As Int32, ByVal Value As Single) As Int32 + Declare Function ENsetstatusreport Lib "epanet2.dll" (ByVal Code As Int32) As Int32 + Declare Function ENsetqualtype Lib "epanet2.dll" (ByVal QualCode As Int32, ByVal ChemName As String, ByVal ChemUnits As String, ByVal TraceNode As String) As Int32 + + Declare Function ENaddpattern Lib "epanet2.dll" (ByVal ID As String) As Int32 + +End Module From ef2763d1550b1d7f99ded1617cd18b614a738a77 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Wed, 22 Jul 2015 20:13:19 +0300 Subject: [PATCH 023/120] Fix to VB.Net include file By Lew Rossman --- include/epanet2.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/epanet2.vb b/include/epanet2.vb index 4e8b9f0..dbb3ed5 100644 --- a/include/epanet2.vb +++ b/include/epanet2.vb @@ -168,8 +168,8 @@ Public Const EN_CUSTOM = 2 ' user-defined custom curve Declare Function ENreport Lib "epanet2.dll" () As Int32 Declare Function ENresetreport Lib "epanet2.dll" () As Int32 Declare Function ENsetreport Lib "epanet2.dll" (ByVal S As String) As Int32 - - Declare Function ENgetcontrol Lib "epanet2.dll" (ByVal Cindex As Int32, Ctype As Int32, Lindex As Int32, Setting As Single, Nindex As Int32, Level As Single) As Int32 + + Declare Function ENgetcontrol Lib "epanet2.dll" (ByVal Cindex As Int32, ByRef CtlType As Int32, ByRef Lindex As Int32, ByRef Setting As Single, ByRef Nindex As Int32, ByRef Level As Single) As Int32 Declare Function ENgetcount Lib "epanet2.dll" (ByVal Code As Int32, ByRef Value As Int32) As Int32 Declare Function ENgetoption Lib "epanet2.dll" (ByVal Code As Int32, ByRef Value As Single) As Int32 Declare Function ENgettimeparam Lib "epanet2.dll" (ByVal Code As Int32, ByRef Value As Int32) As Int32 @@ -202,7 +202,7 @@ Public Const EN_CUSTOM = 2 ' user-defined custom curve Declare Function ENgetversion Lib "epanet2.dll" (ByRef Value As Int32) As Int32 - Declare Function ENsetcontrol Lib "epanet2.dll" (ByVal Cindex As Int32, ByVal Ctype As Int32, ByVal Lindex As Int32, ByVal Setting As Single, ByVal Nindex As Int32, ByVal Level As Single) As Int32 + Declare Function ENsetcontrol Lib "epanet2.dll" (ByVal Cindex As Int32, ByVal CtlType As Int32, ByVal Lindex As Int32, ByVal Setting As Single, ByVal Nindex As Int32, ByVal Level As Single) As Int32 Declare Function ENsetnodevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByVal Value As Single) As Int32 Declare Function ENsetlinkvalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByVal Value As Single) As Int32 Declare Function ENsetpattern Lib "epanet2.dll" (ByVal Index as Int32, ByRef F as Single, ByVal N as Int32) as Int32 From a3c7eaae15b65e2fed520ce8774907dc21387bb7 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Fri, 31 Jul 2015 14:41:18 +0300 Subject: [PATCH 024/120] Minor addition to vb header files --- include/epanet2.bas | 1 + include/epanet2.vb | 1 + 2 files changed, 2 insertions(+) diff --git a/include/epanet2.bas b/include/epanet2.bas index 8df46c5..2c3295c 100644 --- a/include/epanet2.bas +++ b/include/epanet2.bas @@ -51,6 +51,7 @@ Global Const EN_STATUS = 11 Global Const EN_SETTING = 12 Global Const EN_ENERGY = 13 Global Const EN_LINKQUAL = 14 'ES +Global Const EN_LINKPATTERN 15 Global Const EN_DURATION = 0 ' Time parameters Global Const EN_HYDSTEP = 1 diff --git a/include/epanet2.vb b/include/epanet2.vb index dbb3ed5..e74e1a5 100644 --- a/include/epanet2.vb +++ b/include/epanet2.vb @@ -55,6 +55,7 @@ Public Const EN_STATUS = 11 Public Const EN_SETTING = 12 Public Const EN_ENERGY = 13 Public Const EN_LINKQUAL = 14 'ES +Public Const EN_LINKPATTERN 15 Public Const EN_DURATION = 0 ' Time parameters Public Const EN_HYDSTEP = 1 From 0f65c830a37938bae4435a267bd098a0038b3737 Mon Sep 17 00:00:00 2001 From: Will Furnass Date: Fri, 31 Jul 2015 18:49:16 +0100 Subject: [PATCH 025/120] #define DLL_EXPORT as the empty string by default --- include/epanet2.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/epanet2.h b/include/epanet2.h index 8527d83..153fef4 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -47,6 +47,8 @@ #else #define DLLEXPORT #endif + #else + #define DLLEXPORT #endif #endif @@ -271,4 +273,4 @@ extern "C" { } #endif -#endif //EPANET2_H \ No newline at end of file +#endif //EPANET2_H From a35a61ef6dacd4146fe234c18fd607a3d3c4745c Mon Sep 17 00:00:00 2001 From: Will Furnass Date: Fri, 31 Jul 2015 18:50:26 +0100 Subject: [PATCH 026/120] Ensure that libm is linked to in cmake-driven builds --- build/CMake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/CMake/CMakeLists.txt b/build/CMake/CMakeLists.txt index 5aaa576..2edaf20 100644 --- a/build/CMake/CMakeLists.txt +++ b/build/CMake/CMakeLists.txt @@ -15,4 +15,4 @@ add_library(epanet STATIC ../../src/epanet.c ../../src/hydraul.c ../../src/hash # the standalone executable include_directories(../../src) add_executable(runepanet ../../run/main.c) -target_link_libraries (runepanet LINK_PUBLIC epanet) +target_link_libraries (runepanet LINK_PUBLIC epanet m) From d0c3f59f345d69c63c578de0fd7a0453c6c65c83 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Wed, 5 Aug 2015 14:15:27 +0300 Subject: [PATCH 027/120] Added missing parameters in the REPORT section The MESSAGES and FILE options were not saved --- src/inpfile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/inpfile.c b/src/inpfile.c index e21fa98..3e7dcd6 100755 --- a/src/inpfile.c +++ b/src/inpfile.c @@ -558,6 +558,9 @@ int saveinpfile(char *fname) fprintf(f, "\n STATUS %s", RptFlagTxt[Statflag]); fprintf(f, "\n SUMMARY %s", RptFlagTxt[Summaryflag]); fprintf(f, "\n ENERGY %s", RptFlagTxt[Energyflag]); + fprintf(f, "\n MESSAGES %s", RptFlagTxt[Messageflag]); + if (strlen(Rpt2Fname) > 0) + fprintf(f, "\n FILE %s", Rpt2Fname); switch (Nodeflag) { case 0: @@ -610,7 +613,7 @@ int saveinpfile(char *fname) } else fprintf(f, "\n %-20sNO", Field[i].Name); } - fprintf(f, "\n"); + fprintf(f, "\n\n"); /* Save auxilary data to new input file */ From 6878e046ed6dca4d602cd41ea23c962ced459c6c Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Fri, 7 Aug 2015 12:37:05 +0300 Subject: [PATCH 028/120] Removed old and unused code A bit of code cleaning --- src/epanet.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index 3d5e7f9..3ec53e2 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -213,16 +213,6 @@ int DLLEXPORT ENopen(char *f1, char *f2, char *f3) /*** Updated 9/7/00 ***/ Messageflag = TRUE; - -/* If binary output file being used, then */ -/* do not write full results to Report file */ -/* (use it only for status reports). */ - Rptflag = 0; - if (strlen(f3) == 0) Rptflag = 1; - -/*** Updated 9/7/00 ***/ -/*** Previous code segment ignored. ***/ -/*** Rptflag now always set to 1. ***/ Rptflag = 1; /* Initialize global pointers to NULL. */ From f9ea14e57a293e4450afa8150ab8f755198f9432 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Thu, 20 Aug 2015 21:59:12 +0300 Subject: [PATCH 029/120] Fix HEAD and HEADLOSS results in report file --- src/input3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input3.c b/src/input3.c index d0922f6..96a9060 100755 --- a/src/input3.c +++ b/src/input3.c @@ -1370,7 +1370,7 @@ int reportdata() /* Check if input is a reporting criterion. */ /*** Special case needed to distinguish "HEAD" from "HEADLOSS" ***/ //(2.00.11 - LR) - if (strcomp(Tok[0], w_HEADLOSS)) i = HEADLOSS; //(2.00.11 - LR) + if (strcomp(Tok[0], t_HEADLOSS)) i = HEADLOSS; else i = findmatch(Tok[0],Fldname); //(2.00.11 - LR) if (i >= 0) //(2.00.11 - LR) /*****************************************************************/ //(2.00.11 - LR) From 186f21f9a7f39b8acd0bc4c017f5b009d152f798 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sat, 12 Sep 2015 11:54:57 +0300 Subject: [PATCH 030/120] update coord struct --- src/types.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/types.h b/src/types.h index f422a40..f4068fe 100755 --- a/src/types.h +++ b/src/types.h @@ -169,9 +169,10 @@ typedef struct /* CURVE OBJECT */ typedef struct /* Coord OBJECT */ { - char ID[MAXID+1]; /* Coord ID */ - double *X; /* X-values */ - double *Y; /* Y-values */ + char ID[MAXID+1]; /* Coord ID */ + double X; /* X-value */ + double Y; /* Y-value */ + char HaveCoords; /* Coordinates flag */ } Scoord; struct Sdemand /* DEMAND CATEGORY OBJECT */ From 4d6bcef623dfe4d4277e9599154fba6ebb9b8937 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sat, 12 Sep 2015 16:34:52 +0300 Subject: [PATCH 031/120] rewrite the coordinate getter currently controlled from input2.c lines 297-298. will need to add a flag to not load the coordinates. --- src/epanet.c | 26 +++++++------ src/funcs.h | 6 +-- src/input2.c | 105 +-------------------------------------------------- src/input3.c | 50 +++++++----------------- src/text.h | 1 + src/vars.h | 3 -- 6 files changed, 32 insertions(+), 159 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index 3ec53e2..76b9070 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -239,7 +239,6 @@ int DLLEXPORT ENopen(char *f1, char *f2, char *f3) /* Free temporary linked lists used for Patterns & Curves */ freeTmplist(Patlist); freeTmplist(Curvelist); - freeTmplist(Coordlist); /* If using previously saved hydraulics then open its file */ if (Hydflag == USE) ERRCODE(openhydfile()); @@ -1290,9 +1289,14 @@ int DLLEXPORT ENgetcoord(int index, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y) **---------------------------------------------------------------- */ { - *x = Coord[index].X[0]; - *y = Coord[index].Y[0]; - return 0; + if (!Openflag) return(102); + if (index < 1 || index > Nnodes) return(203); + // check if node have coords + if (Coord[index].HaveCoords == 0) return(254); + + *x = Coord[index].X; + *y = Coord[index].Y; + return 0; } int DLLEXPORT ENgetnodevalue(int index, int code, EN_API_FLOAT_TYPE *value) @@ -2770,12 +2774,11 @@ void initpointers() Pattern = NULL; Curve = NULL; Control = NULL; - Coord = NULL; + Coord = NULL; X = NULL; Patlist = NULL; Curvelist = NULL; - Coordlist = NULL; Adjlist = NULL; Aii = NULL; Aij = NULL; @@ -2885,12 +2888,10 @@ int allocdata() { // node demand Node[n].D = NULL; - /* Allocate memory for coord data */ - Coord[n].X = (double *) calloc(1, sizeof(double)); - Coord[n].Y = (double *) calloc(1, sizeof(double)); - if (Coord[n].X == NULL || Coord[n].Y == NULL) return(101); - Coord[n].X[0] = 0; - Coord[n].Y[0] = 0; + /* ini coord data */ + Coord[n].X = 0; + Coord[n].Y = 0; + Coord[n].HaveCoords = 0; } } @@ -3189,6 +3190,7 @@ char *geterrmsg(int errcode) case 250: sprintf(Msg,ERR250); break; case 251: sprintf(Msg,ERR251); break; case 253: sprintf(Msg,ERR253); break; + case 254: sprintf(Msg,ERR254); break; /* File Errors */ case 301: strcpy(Msg,ERR301); break; diff --git a/src/funcs.h b/src/funcs.h index 9847275..51ccc20 100755 --- a/src/funcs.h +++ b/src/funcs.h @@ -65,13 +65,11 @@ int addnodeID(int, char *); /* Adds node ID to data base */ int addlinkID(int, char *); /* Adds link ID to data base */ int addpattern(char *); /* Adds pattern to data base */ int addcurve(char *); /* Adds curve to data base */ -int addcoord(char *); /* Adds coord to data base */ STmplist *findID(char *, STmplist *); /* Locates ID on linked list */ int unlinked(void); /* Checks for unlinked nodes */ int getpumpparams(void); /* Computes pump curve coeffs.*/ int getpatterns(void); /* Gets pattern data from list*/ int getcurves(void); /* Gets curve data from list */ -int getcoords(void); /* Gets coordinate data from list */ int findmatch(char *,char *[]); /* Finds keyword in line */ int match(char *, char *); /* Checks for word match */ int gettokens(char *); /* Tokenizes input line */ @@ -88,7 +86,7 @@ int pumpdata(void); /* Processes pump data */ int valvedata(void); /* Processes valve data */ int patterndata(void); /* Processes pattern data */ int curvedata(void); /* Processes curve data */ -int coordata(void); /* Processes coordinate data */ +int coordata(void); /* Processes coordinate data */ int demanddata(void); /* Processes demand data */ int controldata(void); /* Processes simple controls */ int energydata(void); /* Processes energy data */ @@ -287,4 +285,4 @@ int saveepilog(void); /* Saves output file epilog */ /* ------------ INPFILE.C --------------*/ int saveinpfile(char *); /* Saves network to text file */ -#endif +#endif diff --git a/src/input2.c b/src/input2.c index b372867..4665076 100755 --- a/src/input2.c +++ b/src/input2.c @@ -48,7 +48,6 @@ char *Tok[MAXTOKS]; /* Array of token strings */ /* Used in INPUT3.C: */ STmplist *PrevPat; /* Pointer to pattern list element */ STmplist *PrevCurve; /* Pointer to curve list element */ -STmplist *PrevCoord; /* Pointer to coordinate list element */ /* Defined in enumstxt.h in EPANET.C */ extern char *SectTxt[]; /* Input section keywords */ @@ -79,7 +78,6 @@ int netsize() MaxRules = 0; MaxCurves = 0; sect = -1; - MaxCoords = 0; /* Add a default pattern 0 */ MaxPats = -1; @@ -121,8 +119,6 @@ int netsize() break; case _CURVES: errcode = addcurve(tok); break; -// case _COORDS: errcode = addcoord(tok); //06.02.2010-woohn -// break; } if (errcode) break; } @@ -176,7 +172,6 @@ int readdata() Npats = MaxPats; PrevPat = NULL; PrevCurve = NULL; - PrevCoord = NULL; sect = -1; errsum = 0; @@ -245,7 +240,6 @@ int readdata() /* Get pattern & curve data from temp. lists */ if (!errcode) errcode = getpatterns(); if (!errcode) errcode = getcurves(); - //if (!errcode) errcode = getcoords(); if (!errcode) errcode = getpumpparams(); /* Free input buffer */ @@ -300,7 +294,8 @@ int newline(int sect, char *line) case _OPTIONS: return(optiondata()); /* Data in these sections are not used for any computations */ - case _COORDS: return (0); //return(coordata()); + //case _COORDS: return (0); //uncomment to not load the coordinates + case _COORDS: return(coordata()); //comment out to load the coordinates case _LABELS: return(0); case _TAGS: return(0); case _VERTICES: return(0); @@ -520,43 +515,6 @@ int addcurve(char *id) return(0); } -int addcoord(char *id) -/* - **------------------------------------------------------------- - ** Input: id = curve ID label - ** Output: returns error code - ** Purpose: adds a new curve to the database - **-------------------------------------------------------------- - */ -{ - STmplist *c; - - /* Check if ID is same as last one processed */ - if (Coordlist != NULL && strcmp(id,Coordlist->ID) == 0) return(0); - - /* Check that coordinate was not already created */ - if (findID(id,Coordlist) == NULL) - { - - /* Update coordinate count & create new list element */ - (MaxCoords)++; - c = (STmplist *) malloc(sizeof(STmplist)); - if (c == NULL) { - return(101); - } - else { - /* Initialize list element properties */ - // c->i = MaxCoords; // bug! if coordinates are not in the same order as junctions, then this is a BAD assumption - // do this later: c->i = findnode(id); - strncpy(c->ID,id,MAXID); - c->x = NULL; - c->y = NULL; - c->next = Coordlist; - Coordlist = c; - } - } - return(0); -} STmplist *findID(char *id, STmplist *list) /* @@ -749,65 +707,6 @@ int getcurves(void) return(0); } -int getcoords(void) -/* - **----------------------------------------------------------- - ** Input: none - ** Output: returns error code - ** Purpose: retrieves curve data from temporary linked list - **----------------------------------------------------------- - */ -{ - int i,j,n; - double x; - SFloatlist *xFloatList, *yFloatList; - STmplist *coordinateList; - - /* Start at head of coordinate list */ - coordinateList = Coordlist; - - /* Traverse list of coordinates */ - while (coordinateList != NULL) - { - // BAD! ---> i = coordinateList->i; - i = findnode(coordinateList->ID); - if (i >= 1 && i <= MaxNodes) - { - /* Save coordinate ID */ - strcpy(Coord[i].ID, coordinateList->ID); - - n = 1; //Coord[i].Npts - - /* Traverse list of x,y data */ - x = BIG; - xFloatList = coordinateList->x; - yFloatList = coordinateList->y; - j = n - 1; - while (xFloatList != NULL && yFloatList != NULL && j >= 0) - { - - /* Check that x data is in ascending order */ - if (xFloatList->value >= x) - { - sprintf(Msg,ERR230,coordinateList->ID); - writeline(Msg); - return(200); - } - x = xFloatList->value; - - /* Save x,y data in Curve structure */ - Coord[i].X[j] = xFloatList->value; - xFloatList = xFloatList->next; - Coord[i].Y[j] = yFloatList->value; - yFloatList = yFloatList->next; - j--; - } - } - coordinateList = coordinateList->next; - } - return(0); -} - int findmatch(char *line, char *keyword[]) /* diff --git a/src/input3.c b/src/input3.c index 96a9060..84a3a12 100755 --- a/src/input3.c +++ b/src/input3.c @@ -42,8 +42,6 @@ extern char *Fldname[]; extern char *Tok[MAXTOKS]; extern STmplist *PrevPat; extern STmplist *PrevCurve; - -extern STmplist *PrevCoord; extern int Ntokens; @@ -591,46 +589,24 @@ int coordata() **-------------------------------------------------------------- */ { - double x,y; - SFloatlist *fx, *fy; - STmplist *c; + double x, y; + int j; - /* Check for valid curve ID */ + /* Check for valid node ID */ if (Ntokens < 3) return(201); - if ( - PrevCoord != NULL && - strcmp(Tok[0],PrevCoord->ID) == 0 - ) c = PrevCoord; - else c = findID(Tok[0],Coordlist); - - // c = findID(Tok[0],Coordlist); - if (c == NULL) return(205); - - /* Check for valid data */ + /* Check for valid data */ + if ((j = findnode(Tok[0])) == 0) return(203); if (!getfloat(Tok[1],&x)) return(202); if (!getfloat(Tok[2],&y)) return(202); - - /* Add new data point to curve's linked list */ - fx = (SFloatlist *) malloc(sizeof(SFloatlist)); - fy = (SFloatlist *) malloc(sizeof(SFloatlist)); - if (fx == NULL || fy == NULL) return(101); - fx->value = x; - fx->next = c->x; - c->x = fx; - fy->value = y; - fy->next = c->y; - c->y = fy; - //Curve[c->i].Npts++; - - /* Save the pointer to this curve */ - PrevCoord = c; - return(0); - - /* Save coordn data */ - //Coord[Njuncs].X = x; - //Coord[Njuncs].Y = y; - + + /* Save coord data */ + strncpy(Coord[j].ID, Node[j].ID, MAXID); + Coord[j].X = x; + Coord[j].Y = y; + Coord[j].HaveCoords = 1; + + return(0); } /* end of coordata */ int demanddata() diff --git a/src/text.h b/src/text.h index 6d87cd8..5c77428 100755 --- a/src/text.h +++ b/src/text.h @@ -494,6 +494,7 @@ AUTHOR: L. Rossman #define ERR251 "Input Error 251: function call contains invalid parameter code." #define ERR253 "Input Error 253: Function call error - No such demand category index." +#define ERR254 "Input Error 254: Function call error - Node have no coordinates." #define ERR301 "File Error 301: identical file names." #define ERR302 "File Error 302: cannot open input file." diff --git a/src/vars.h b/src/vars.h index 2a4f363..f4a2cbe 100755 --- a/src/vars.h +++ b/src/vars.h @@ -76,7 +76,6 @@ EXTERN int MaxNodes, /* Node count from input file */ MaxRules, /* Rule count */ MaxPats, /* Pattern count */ MaxCurves, /* Curve count */ - MaxCoords, /* Coords count */ Nnodes, /* Number of network nodes */ Ntanks, /* Number of tanks */ Njuncs, /* Number of junction nodes */ @@ -88,7 +87,6 @@ EXTERN int MaxNodes, /* Node count from input file */ Nrules, /* Number of control rules */ Npats, /* Number of time patterns */ Ncurves, /* Number of data curves */ - Ncoords, /* Number of Coords */ Nperiods, /* Number of reporting periods */ Ncoeffs, /* Number of non-0 matrix coeffs*/ DefPat, /* Default demand pattern */ @@ -159,7 +157,6 @@ EXTERN double *QTankVolumes; EXTERN double *QLinkFlow; EXTERN STmplist *Patlist; /* Temporary time pattern list */ EXTERN STmplist *Curvelist; /* Temporary list of curves */ -EXTERN STmplist *Coordlist; /* Temporary list of coordinates*/ EXTERN Spattern *Pattern; /* Time patterns */ EXTERN Scurve *Curve; /* Curve data */ EXTERN Scoord *Coord; /* Coordinate data */ From c12f901454cb72de0ade48d6db603f0acb07ea26 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sun, 13 Sep 2015 09:53:21 +0300 Subject: [PATCH 032/120] added ENsetcoord function also minor fix to include files --- build/WinSDK/epanet2.def | 1 + include/epanet2.bas | 3 ++- include/epanet2.h | 1 + include/epanet2.vb | 4 +++- src/epanet.c | 24 +++++++++++++++++++++++- 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/build/WinSDK/epanet2.def b/build/WinSDK/epanet2.def index fc84da2..ec3bee9 100644 --- a/build/WinSDK/epanet2.def +++ b/build/WinSDK/epanet2.def @@ -62,6 +62,7 @@ EXPORTS ENgetcurve = _ENgetcurve@20 ENgetstatistic = _ENgetstatistic@8 ENgetcoord = _ENgetcoord@12 + ENsetcoord = _ENsetcoord@12 ENgetqualinfo = _ENgetqualinfo@16 ENsetbasedemand = _ENsetbasedemand@12 ENgetaveragepatternvalue = _ENgetaveragepatternvalue@8 diff --git a/include/epanet2.bas b/include/epanet2.bas index 2c3295c..4260cfb 100644 --- a/include/epanet2.bas +++ b/include/epanet2.bas @@ -51,7 +51,7 @@ Global Const EN_STATUS = 11 Global Const EN_SETTING = 12 Global Const EN_ENERGY = 13 Global Const EN_LINKQUAL = 14 'ES -Global Const EN_LINKPATTERN 15 +Global Const EN_LINKPATTERN = 15 Global Const EN_DURATION = 0 ' Time parameters Global Const EN_HYDSTEP = 1 @@ -189,6 +189,7 @@ Global Const EN_INITFLOW = 10 ' Re-initialize flow flag Declare Function ENgetnodetype Lib "epanet2.dll" (ByVal Index As Long, Code As Long) As Long Declare Function ENgetnodevalue Lib "epanet2.dll" (ByVal Index As Long, ByVal Code As Long, Value As Single) As Long Declare Function ENgetcoord Lib "epanet2.dll" (ByVal Index As Long, X As Single, Y As Single) As Long + Declare Function ENsetcoord Lib "epanet2.dll" (ByVal Index As Long, ByVal X As Single, ByVal Y As Single) As Long Declare Function ENgetnumdemands Lib "epanet2.dll" (ByVal Index As Long, numDemands As Long) As Long Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal Index As Long, ByVal DemandIndex As Long, Value As Single) As Long diff --git a/include/epanet2.h b/include/epanet2.h index 153fef4..b2d730c 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -239,6 +239,7 @@ extern "C" { int DLLEXPORT ENgetnodetype(int index, int *code); int DLLEXPORT ENgetnodevalue(int index, int code, EN_API_FLOAT_TYPE *value); int DLLEXPORT ENgetcoord(int index, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y); + int DLLEXPORT ENsetcoord(int index, EN_API_FLOAT_TYPE x, EN_API_FLOAT_TYPE y); int DLLEXPORT ENgetnumdemands(int nodeIndex, int *numDemands); int DLLEXPORT ENgetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE *baseDemand); diff --git a/include/epanet2.vb b/include/epanet2.vb index e74e1a5..62da5fc 100644 --- a/include/epanet2.vb +++ b/include/epanet2.vb @@ -186,7 +186,9 @@ Public Const EN_CUSTOM = 2 ' user-defined custom curve Declare Function ENgetnodeid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32 Declare Function ENgetnodetype Lib "epanet2.dll" (ByVal Index As Int32, ByRef Code As Int32) As Int32 Declare Function ENgetnodevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Code As Int32, ByRef Value As Single) As Int32 - + Declare Function ENgetcoord Lib "epanet2.dll" (ByVal Index As Int32, ByRef X As Single, ByRef Y As Single) As Int32 + Declare Function ENsetcoord Lib "epanet2.dll" (ByVal Index As Int32, ByVal X As Single, ByVal Y As Single) As Int32 + Declare Function ENgetnumdemands Lib "epanet2.dll" (ByVal Index As Int32, ByRef numDemands As Int32) As Int32 'ES Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByRef Value As Single) As Int32 'ES Declare Function ENgetdemandpattern Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByRef PatIndex As Int32) As Int32 'ES diff --git a/src/epanet.c b/src/epanet.c index 76b9070..dbd9aca 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -1283,7 +1283,7 @@ int DLLEXPORT ENgetcoord(int index, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y) /*---------------------------------------------------------------- ** Input: index = node index ** Output: *x = value of node's coordinate - ** *x = value of node's coordinate + ** *y = value of node's coordinate ** Returns: error code ** Purpose: retrieves coordinate x, y for a node **---------------------------------------------------------------- @@ -1299,6 +1299,28 @@ int DLLEXPORT ENgetcoord(int index, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y) return 0; } + +int DLLEXPORT ENsetcoord(int index, EN_API_FLOAT_TYPE x, EN_API_FLOAT_TYPE y) +/*---------------------------------------------------------------- + ** Input: index = node index + ** *x = value of node's coordinate + ** *y = value of node's coordinate + ** Output: None + ** Returns: error code + ** Purpose: sets coordinate x, y for a node + **---------------------------------------------------------------- + */ +{ + if (!Openflag) return(102); + if (index < 1 || index > Nnodes) return(203); + + Coord[index].X = x; + Coord[index].Y = y; + Coord[index].HaveCoords = 1; + return 0; +} + + int DLLEXPORT ENgetnodevalue(int index, int code, EN_API_FLOAT_TYPE *value) /*---------------------------------------------------------------- ** Input: index = node index From 913f48f11ad2da17195f595d10ae57f844791373 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sun, 13 Sep 2015 09:56:21 +0300 Subject: [PATCH 033/120] minor fix to VB6 & VBA include file --- include/epanet2.bas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/epanet2.bas b/include/epanet2.bas index 2c3295c..71c713c 100644 --- a/include/epanet2.bas +++ b/include/epanet2.bas @@ -51,7 +51,7 @@ Global Const EN_STATUS = 11 Global Const EN_SETTING = 12 Global Const EN_ENERGY = 13 Global Const EN_LINKQUAL = 14 'ES -Global Const EN_LINKPATTERN 15 +Global Const EN_LINKPATTERN = 15 Global Const EN_DURATION = 0 ' Time parameters Global Const EN_HYDSTEP = 1 From 2c46a002ba44a66e79ea1f3151bdd764c4070106 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sun, 13 Sep 2015 12:56:28 +0300 Subject: [PATCH 034/120] Changed coordinates are saved to INP Added a flag which controls the loading of coordinates at epanet.c line 213. When set to TRUE coordinates are loaded and users can use the ENgetcoord and ENsetcoord functions. Changes are then saved when ENsaveinpfile is called. When set to FALSE coordinates are not loaded and can't be retrieved or changed. When saved, the COORD section is copied from the original INP file. --- src/epanet.c | 27 +++++++++++++++++++-------- src/inpfile.c | 27 +++++++++++++++++++++++++-- src/input2.c | 7 +++++-- src/input3.c | 2 +- src/text.h | 1 + src/vars.h | 3 ++- 6 files changed, 53 insertions(+), 14 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index dbd9aca..c27e231 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -210,7 +210,8 @@ int DLLEXPORT ENopen(char *f1, char *f2, char *f3) SaveHflag = FALSE; SaveQflag = FALSE; Warnflag = FALSE; - + Coordflag = TRUE; + /*** Updated 9/7/00 ***/ Messageflag = TRUE; Rptflag = 1; @@ -1291,8 +1292,10 @@ int DLLEXPORT ENgetcoord(int index, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y) { if (!Openflag) return(102); if (index < 1 || index > Nnodes) return(203); + if (!Coordflag) return(255); + // check if node have coords - if (Coord[index].HaveCoords == 0) return(254); + if (Coord[index].HaveCoords == FALSE) return(254); *x = Coord[index].X; *y = Coord[index].Y; @@ -1313,10 +1316,11 @@ int DLLEXPORT ENsetcoord(int index, EN_API_FLOAT_TYPE x, EN_API_FLOAT_TYPE y) { if (!Openflag) return(102); if (index < 1 || index > Nnodes) return(203); + if (!Coordflag) return(255); Coord[index].X = x; Coord[index].Y = y; - Coord[index].HaveCoords = 1; + Coord[index].HaveCoords = TRUE; return 0; } @@ -2880,14 +2884,17 @@ int allocdata() Control = (Scontrol *) calloc(MaxControls+1,sizeof(Scontrol)); Pattern = (Spattern *) calloc(MaxPats+1, sizeof(Spattern)); Curve = (Scurve *) calloc(MaxCurves+1, sizeof(Scurve)); - Coord = (Scoord *) calloc(MaxNodes+1, sizeof(Scoord)); + if (Coordflag == TRUE) + { + Coord = (Scoord *) calloc(MaxNodes+1, sizeof(Scoord)); + } ERRCODE(MEMCHECK(Tank)); ERRCODE(MEMCHECK(Pump)); ERRCODE(MEMCHECK(Valve)); ERRCODE(MEMCHECK(Control)); ERRCODE(MEMCHECK(Pattern)); ERRCODE(MEMCHECK(Curve)); - ERRCODE(MEMCHECK(Coord)); + if (Coordflag == TRUE) ERRCODE(MEMCHECK(Coord)); } /* Initialize pointers used in patterns, curves, and demand category lists */ @@ -2911,9 +2918,12 @@ int allocdata() // node demand Node[n].D = NULL; /* ini coord data */ - Coord[n].X = 0; - Coord[n].Y = 0; - Coord[n].HaveCoords = 0; + if (Coordflag == TRUE) + { + Coord[n].X = 0; + Coord[n].Y = 0; + Coord[n].HaveCoords = FALSE; + } } } @@ -3213,6 +3223,7 @@ char *geterrmsg(int errcode) case 251: sprintf(Msg,ERR251); break; case 253: sprintf(Msg,ERR253); break; case 254: sprintf(Msg,ERR254); break; + case 255: sprintf(Msg,ERR255); break; /* File Errors */ case 301: strcpy(Msg,ERR301); break; diff --git a/src/inpfile.c b/src/inpfile.c index 3e7dcd6..5c06fc0 100755 --- a/src/inpfile.c +++ b/src/inpfile.c @@ -77,7 +77,11 @@ void saveauxdata(FILE *f) / switch(sect) { case _RULES: - case _COORDS: + case _COORDS: if (Coordflag == FALSE) + { + fprintf(f, "%s", line); + } + break; case _VERTICES: case _LABELS: case _BACKDROP: @@ -92,7 +96,11 @@ void saveauxdata(FILE *f) / switch(sect) { case _RULES: - case _COORDS: + case _COORDS: if (Coordflag == FALSE) + { + fprintf(f, "%s", line); + } + break; case _VERTICES: case _LABELS: case _BACKDROP: @@ -615,6 +623,21 @@ int saveinpfile(char *fname) } fprintf(f, "\n\n"); +/* Write [COORDINATES] section */ + + if (Coordflag == TRUE) + { + fprintf(f, "\n\n[COORDINATES]"); + for (i=1; i<=Nnodes; i++) + { + if (Coord[i].HaveCoords == TRUE) + { + fprintf(f,"\n %-31s %14.6f %14.6f",Node[i].ID,Coord[i].X,Coord[i].Y); + } + } + fprintf(f, "\n\n"); + } + /* Save auxilary data to new input file */ saveauxdata(f); diff --git a/src/input2.c b/src/input2.c index 4665076..6ac3202 100755 --- a/src/input2.c +++ b/src/input2.c @@ -294,8 +294,11 @@ int newline(int sect, char *line) case _OPTIONS: return(optiondata()); /* Data in these sections are not used for any computations */ - //case _COORDS: return (0); //uncomment to not load the coordinates - case _COORDS: return(coordata()); //comment out to load the coordinates + case _COORDS: if (Coordflag == TRUE) + { + return(coordata()); + } + else return(0); case _LABELS: return(0); case _TAGS: return(0); case _VERTICES: return(0); diff --git a/src/input3.c b/src/input3.c index 84a3a12..4ab3487 100755 --- a/src/input3.c +++ b/src/input3.c @@ -604,7 +604,7 @@ int coordata() strncpy(Coord[j].ID, Node[j].ID, MAXID); Coord[j].X = x; Coord[j].Y = y; - Coord[j].HaveCoords = 1; + Coord[j].HaveCoords = TRUE; return(0); } /* end of coordata */ diff --git a/src/text.h b/src/text.h index 5c77428..abbd817 100755 --- a/src/text.h +++ b/src/text.h @@ -495,6 +495,7 @@ AUTHOR: L. Rossman #define ERR253 "Input Error 253: Function call error - No such demand category index." #define ERR254 "Input Error 254: Function call error - Node have no coordinates." +#define ERR255 "Input Error 255: Function call error - Coordinates were not loaded." #define ERR301 "File Error 301: identical file names." #define ERR302 "File Error 302: cannot open input file." diff --git a/src/vars.h b/src/vars.h index f4a2cbe..1b95d1a 100755 --- a/src/vars.h +++ b/src/vars.h @@ -64,7 +64,8 @@ EXTERN char Msg[MAXMSG+1], /* Text of output message */ SaveHflag, /* Hydraul. results saved flag */ OpenQflag, /* Quality system opened flag */ SaveQflag, /* Quality results saved flag */ - Saveflag; /* General purpose save flag */ + Saveflag, /* General purpose save flag */ + Coordflag; /* Load coordinates flag */ EXTERN int MaxNodes, /* Node count from input file */ MaxLinks, /* Link count from input file */ MaxJuncs, /* Junction count */ From 13f57413106d6098542143faf8f40d2bc84441fe Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Tue, 15 Sep 2015 10:02:00 -0400 Subject: [PATCH 035/120] moving Xcode build files --- .gitignore | 11 +- .../epanet/epanet.xcodeproj/project.pbxproj | 553 ------------------ .../contents.xcworkspacedata | 7 - 3 files changed, 8 insertions(+), 563 deletions(-) delete mode 100755 build/Xcode/epanet/epanet.xcodeproj/project.pbxproj delete mode 100755 build/Xcode/epanet/epanet.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/.gitignore b/.gitignore index 9e6c1c7..1bf6273 100755 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,11 @@ xcuserdata *.dat *.dep +*.xcodeproj/ +!*.xcodeproj/project.pbxproj + + + ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. @@ -52,6 +57,7 @@ xcuserdata [Dd]ebug/ [Rr]elease/ x64/ +build/ [Bb]in/ [Oo]bj/ @@ -184,6 +190,5 @@ Desktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ -# CMake temp files -build/CMake/* -!build/CMake/CMakeLists.txt + +*.xcuserstate diff --git a/build/Xcode/epanet/epanet.xcodeproj/project.pbxproj b/build/Xcode/epanet/epanet.xcodeproj/project.pbxproj deleted file mode 100755 index f7a110a..0000000 --- a/build/Xcode/epanet/epanet.xcodeproj/project.pbxproj +++ /dev/null @@ -1,553 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 22322F851068369500641384 /* enumstxt.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F701068369500641384 /* enumstxt.h */; }; - 22322F861068369500641384 /* epanet.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F711068369500641384 /* epanet.c */; }; - 22322F871068369500641384 /* funcs.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F721068369500641384 /* funcs.h */; }; - 22322F881068369500641384 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F731068369500641384 /* hash.c */; }; - 22322F891068369500641384 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F741068369500641384 /* hash.h */; }; - 22322F8A1068369500641384 /* hydraul.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F751068369500641384 /* hydraul.c */; }; - 22322F8B1068369500641384 /* inpfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F761068369500641384 /* inpfile.c */; }; - 22322F8C1068369500641384 /* input1.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F771068369500641384 /* input1.c */; }; - 22322F8D1068369500641384 /* input2.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F781068369500641384 /* input2.c */; }; - 22322F8E1068369500641384 /* input3.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F791068369500641384 /* input3.c */; }; - 22322F8F1068369500641384 /* mempool.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7A1068369500641384 /* mempool.c */; }; - 22322F901068369500641384 /* mempool.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F7B1068369500641384 /* mempool.h */; }; - 22322F911068369500641384 /* output.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7C1068369500641384 /* output.c */; }; - 22322F921068369500641384 /* quality.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7D1068369500641384 /* quality.c */; }; - 22322F931068369500641384 /* report.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7E1068369500641384 /* report.c */; }; - 22322F941068369500641384 /* rules.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7F1068369500641384 /* rules.c */; }; - 22322F951068369500641384 /* smatrix.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F801068369500641384 /* smatrix.c */; }; - 22322F961068369500641384 /* text.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F811068369500641384 /* text.h */; }; - 22322F981068369500641384 /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F831068369500641384 /* types.h */; }; - 22322F991068369500641384 /* vars.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F841068369500641384 /* vars.h */; }; - 22322F9A1068369500641384 /* epanet.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F711068369500641384 /* epanet.c */; }; - 22322F9B1068369500641384 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F731068369500641384 /* hash.c */; }; - 22322F9C1068369500641384 /* hydraul.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F751068369500641384 /* hydraul.c */; }; - 22322F9D1068369500641384 /* inpfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F761068369500641384 /* inpfile.c */; }; - 22322F9E1068369500641384 /* input1.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F771068369500641384 /* input1.c */; }; - 22322F9F1068369500641384 /* input2.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F781068369500641384 /* input2.c */; }; - 22322FA01068369500641384 /* input3.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F791068369500641384 /* input3.c */; }; - 22322FA11068369500641384 /* mempool.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7A1068369500641384 /* mempool.c */; }; - 22322FA21068369500641384 /* output.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7C1068369500641384 /* output.c */; }; - 22322FA31068369500641384 /* quality.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7D1068369500641384 /* quality.c */; }; - 22322FA41068369500641384 /* report.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7E1068369500641384 /* report.c */; }; - 22322FA51068369500641384 /* rules.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7F1068369500641384 /* rules.c */; }; - 22322FA61068369500641384 /* smatrix.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F801068369500641384 /* smatrix.c */; }; - 22322FAA106836BC00641384 /* epanet2.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322FA9106836B000641384 /* epanet2.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2255753F17551234009946B1 /* epanet.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F711068369500641384 /* epanet.c */; }; - 2255754017551234009946B1 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F731068369500641384 /* hash.c */; }; - 2255754117551234009946B1 /* hydraul.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F751068369500641384 /* hydraul.c */; }; - 2255754217551234009946B1 /* inpfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F761068369500641384 /* inpfile.c */; }; - 2255754317551234009946B1 /* input1.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F771068369500641384 /* input1.c */; }; - 2255754417551234009946B1 /* input2.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F781068369500641384 /* input2.c */; }; - 2255754517551234009946B1 /* input3.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F791068369500641384 /* input3.c */; }; - 2255754617551234009946B1 /* mempool.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7A1068369500641384 /* mempool.c */; }; - 2255754717551234009946B1 /* output.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7C1068369500641384 /* output.c */; }; - 2255754817551234009946B1 /* quality.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7D1068369500641384 /* quality.c */; }; - 2255754917551234009946B1 /* report.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7E1068369500641384 /* report.c */; }; - 2255754A17551234009946B1 /* rules.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7F1068369500641384 /* rules.c */; }; - 2255754B17551234009946B1 /* smatrix.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F801068369500641384 /* smatrix.c */; }; - 226537E0179EDEEB00258C60 /* epanet2.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322FA9106836B000641384 /* epanet2.h */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 22322FAF1068370B00641384 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = D2AAC0620554660B00DB518D; - remoteInfo = epanet; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 22322F66106833BB00641384 /* runepanet */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = runepanet; sourceTree = BUILT_PRODUCTS_DIR; }; - 22322F701068369500641384 /* enumstxt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = enumstxt.h; path = ../../../src/enumstxt.h; sourceTree = SOURCE_ROOT; }; - 22322F711068369500641384 /* epanet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = epanet.c; path = ../../../src/epanet.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; }; - 22322F721068369500641384 /* funcs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = funcs.h; path = ../../../src/funcs.h; sourceTree = SOURCE_ROOT; }; - 22322F731068369500641384 /* hash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hash.c; path = ../../../src/hash.c; sourceTree = SOURCE_ROOT; }; - 22322F741068369500641384 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hash.h; path = ../../../src/hash.h; sourceTree = SOURCE_ROOT; }; - 22322F751068369500641384 /* hydraul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hydraul.c; path = ../../../src/hydraul.c; sourceTree = SOURCE_ROOT; }; - 22322F761068369500641384 /* inpfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = inpfile.c; path = ../../../src/inpfile.c; sourceTree = SOURCE_ROOT; }; - 22322F771068369500641384 /* input1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = input1.c; path = ../../../src/input1.c; sourceTree = SOURCE_ROOT; }; - 22322F781068369500641384 /* input2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = input2.c; path = ../../../src/input2.c; sourceTree = SOURCE_ROOT; }; - 22322F791068369500641384 /* input3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = input3.c; path = ../../../src/input3.c; sourceTree = SOURCE_ROOT; }; - 22322F7A1068369500641384 /* mempool.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mempool.c; path = ../../../src/mempool.c; sourceTree = SOURCE_ROOT; }; - 22322F7B1068369500641384 /* mempool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mempool.h; path = ../../../src/mempool.h; sourceTree = SOURCE_ROOT; }; - 22322F7C1068369500641384 /* output.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = output.c; path = ../../../src/output.c; sourceTree = SOURCE_ROOT; }; - 22322F7D1068369500641384 /* quality.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = quality.c; path = ../../../src/quality.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; }; - 22322F7E1068369500641384 /* report.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = report.c; path = ../../../src/report.c; sourceTree = SOURCE_ROOT; }; - 22322F7F1068369500641384 /* rules.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rules.c; path = ../../../src/rules.c; sourceTree = SOURCE_ROOT; }; - 22322F801068369500641384 /* smatrix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = smatrix.c; path = ../../../src/smatrix.c; sourceTree = SOURCE_ROOT; }; - 22322F811068369500641384 /* text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = text.h; path = ../../../src/text.h; sourceTree = SOURCE_ROOT; }; - 22322F831068369500641384 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = types.h; path = ../../../src/types.h; sourceTree = SOURCE_ROOT; }; - 22322F841068369500641384 /* vars.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vars.h; path = ../../../src/vars.h; sourceTree = SOURCE_ROOT; }; - 22322FA9106836B000641384 /* epanet2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 2; name = epanet2.h; path = ../../../include/epanet2.h; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 2255753B17551217009946B1 /* libepanet-static.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libepanet-static.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - D2AAC0630554660B00DB518D /* libepanet.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libepanet.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 22322F64106833BB00641384 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2255753817551217009946B1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D289988505E68E00004EDB86 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* epanet */ = { - isa = PBXGroup; - children = ( - 22322FA8106836A000641384 /* Include */, - 08FB7795FE84155DC02AAC07 /* Source */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - ); - name = epanet; - sourceTree = ""; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 22322F711068369500641384 /* epanet.c */, - 22322F751068369500641384 /* hydraul.c */, - 22322F701068369500641384 /* enumstxt.h */, - 22322F721068369500641384 /* funcs.h */, - 22322F731068369500641384 /* hash.c */, - 22322F741068369500641384 /* hash.h */, - 22322F761068369500641384 /* inpfile.c */, - 22322F771068369500641384 /* input1.c */, - 22322F781068369500641384 /* input2.c */, - 22322F791068369500641384 /* input3.c */, - 22322F7A1068369500641384 /* mempool.c */, - 22322F7B1068369500641384 /* mempool.h */, - 22322F7C1068369500641384 /* output.c */, - 22322F7D1068369500641384 /* quality.c */, - 22322F7E1068369500641384 /* report.c */, - 22322F7F1068369500641384 /* rules.c */, - 22322F801068369500641384 /* smatrix.c */, - 22322F811068369500641384 /* text.h */, - 22322F831068369500641384 /* types.h */, - 22322F841068369500641384 /* vars.h */, - ); - name = Source; - sourceTree = ""; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - D2AAC0630554660B00DB518D /* libepanet.dylib */, - 22322F66106833BB00641384 /* runepanet */, - 2255753B17551217009946B1 /* libepanet-static.a */, - ); - name = Products; - sourceTree = ""; - }; - 22322FA8106836A000641384 /* Include */ = { - isa = PBXGroup; - children = ( - 22322FA9106836B000641384 /* epanet2.h */, - ); - name = Include; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 2255753917551217009946B1 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 226537E0179EDEEB00258C60 /* epanet2.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D2AAC0600554660B00DB518D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 22322FAA106836BC00641384 /* epanet2.h in Headers */, - 22322F851068369500641384 /* enumstxt.h in Headers */, - 22322F871068369500641384 /* funcs.h in Headers */, - 22322F891068369500641384 /* hash.h in Headers */, - 22322F901068369500641384 /* mempool.h in Headers */, - 22322F961068369500641384 /* text.h in Headers */, - 22322F981068369500641384 /* types.h in Headers */, - 22322F991068369500641384 /* vars.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 22322F65106833BB00641384 /* runepanet */ = { - isa = PBXNativeTarget; - buildConfigurationList = 22322F6A106833E600641384 /* Build configuration list for PBXNativeTarget "runepanet" */; - buildPhases = ( - 22322F63106833BB00641384 /* Sources */, - 22322F64106833BB00641384 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 22322FB01068370B00641384 /* PBXTargetDependency */, - ); - name = runepanet; - productName = runepanet; - productReference = 22322F66106833BB00641384 /* runepanet */; - productType = "com.apple.product-type.tool"; - }; - 2255753A17551217009946B1 /* epanet-static */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2255753E17551217009946B1 /* Build configuration list for PBXNativeTarget "epanet-static" */; - buildPhases = ( - 2255753717551217009946B1 /* Sources */, - 2255753817551217009946B1 /* Frameworks */, - 2255753917551217009946B1 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "epanet-static"; - productName = "epanet-static"; - productReference = 2255753B17551217009946B1 /* libepanet-static.a */; - productType = "com.apple.product-type.library.static"; - }; - D2AAC0620554660B00DB518D /* epanet */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB914A08733D8E0010E9CD /* Build configuration list for PBXNativeTarget "epanet" */; - buildPhases = ( - D2AAC0600554660B00DB518D /* Headers */, - D2AAC0610554660B00DB518D /* Sources */, - D289988505E68E00004EDB86 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = epanet; - productName = epanet; - productReference = D2AAC0630554660B00DB518D /* libepanet.dylib */; - productType = "com.apple.product-type.library.dynamic"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - }; - buildConfigurationList = 1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "epanet" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 08FB7794FE84155DC02AAC07 /* epanet */; - projectDirPath = ""; - projectRoot = ../../..; - targets = ( - D2AAC0620554660B00DB518D /* epanet */, - 22322F65106833BB00641384 /* runepanet */, - 2255753A17551217009946B1 /* epanet-static */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 22322F63106833BB00641384 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 22322F9A1068369500641384 /* epanet.c in Sources */, - 22322F9B1068369500641384 /* hash.c in Sources */, - 22322F9C1068369500641384 /* hydraul.c in Sources */, - 22322F9D1068369500641384 /* inpfile.c in Sources */, - 22322F9E1068369500641384 /* input1.c in Sources */, - 22322F9F1068369500641384 /* input2.c in Sources */, - 22322FA01068369500641384 /* input3.c in Sources */, - 22322FA11068369500641384 /* mempool.c in Sources */, - 22322FA21068369500641384 /* output.c in Sources */, - 22322FA31068369500641384 /* quality.c in Sources */, - 22322FA41068369500641384 /* report.c in Sources */, - 22322FA51068369500641384 /* rules.c in Sources */, - 22322FA61068369500641384 /* smatrix.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2255753717551217009946B1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2255753F17551234009946B1 /* epanet.c in Sources */, - 2255754017551234009946B1 /* hash.c in Sources */, - 2255754117551234009946B1 /* hydraul.c in Sources */, - 2255754217551234009946B1 /* inpfile.c in Sources */, - 2255754317551234009946B1 /* input1.c in Sources */, - 2255754417551234009946B1 /* input2.c in Sources */, - 2255754517551234009946B1 /* input3.c in Sources */, - 2255754617551234009946B1 /* mempool.c in Sources */, - 2255754717551234009946B1 /* output.c in Sources */, - 2255754817551234009946B1 /* quality.c in Sources */, - 2255754917551234009946B1 /* report.c in Sources */, - 2255754A17551234009946B1 /* rules.c in Sources */, - 2255754B17551234009946B1 /* smatrix.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D2AAC0610554660B00DB518D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 22322F861068369500641384 /* epanet.c in Sources */, - 22322F881068369500641384 /* hash.c in Sources */, - 22322F8A1068369500641384 /* hydraul.c in Sources */, - 22322F8B1068369500641384 /* inpfile.c in Sources */, - 22322F8C1068369500641384 /* input1.c in Sources */, - 22322F8D1068369500641384 /* input2.c in Sources */, - 22322F8E1068369500641384 /* input3.c in Sources */, - 22322F8F1068369500641384 /* mempool.c in Sources */, - 22322F911068369500641384 /* output.c in Sources */, - 22322F921068369500641384 /* quality.c in Sources */, - 22322F931068369500641384 /* report.c in Sources */, - 22322F941068369500641384 /* rules.c in Sources */, - 22322F951068369500641384 /* smatrix.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 22322FB01068370B00641384 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D2AAC0620554660B00DB518D /* epanet */; - targetProxy = 22322FAF1068370B00641384 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1DEB914B08733D8E0010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - EXECUTABLE_PREFIX = lib; - GCC_DYNAMIC_NO_PIC = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = "EN_API_FLOAT_TYPE=double"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = epanet; - SDKROOT = ""; - }; - name = Debug; - }; - 1DEB914C08733D8E0010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COMBINE_HIDPI_IMAGES = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - EXECUTABLE_PREFIX = lib; - GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = "EN_API_FLOAT_TYPE=double"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = epanet; - SDKROOT = ""; - }; - name = Release; - }; - 1DEB914F08733D8E0010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = macinclude; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = ""; - }; - name = Debug; - }; - 1DEB915008733D8E0010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = macinclude; - SDKROOT = ""; - }; - name = Release; - }; - 22322F68106833BC00641384 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = CLE; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INFOPLIST_PREPROCESSOR_DEFINITIONS = ""; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = runepanet; - }; - name = Debug; - }; - 22322F69106833BC00641384 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = CLE; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INFOPLIST_PREPROCESSOR_DEFINITIONS = ""; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = runepanet; - ZERO_LINK = NO; - }; - name = Release; - }; - 2255753C17551217009946B1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_EMPTY_BODY = YES; - COPY_PHASE_STRIP = NO; - EXECUTABLE_PREFIX = lib; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PREPROCESSOR_DEFINITIONS = "EN_API_FLOAT_TYPE=double"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - MACOSX_DEPLOYMENT_TARGET = 10.8; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 2255753D17551217009946B1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_EMPTY_BODY = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - EXECUTABLE_PREFIX = lib; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PREPROCESSOR_DEFINITIONS = "EN_API_FLOAT_TYPE=double"; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - MACOSX_DEPLOYMENT_TARGET = 10.8; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB914A08733D8E0010E9CD /* Build configuration list for PBXNativeTarget "epanet" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB914B08733D8E0010E9CD /* Debug */, - 1DEB914C08733D8E0010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "epanet" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB914F08733D8E0010E9CD /* Debug */, - 1DEB915008733D8E0010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 22322F6A106833E600641384 /* Build configuration list for PBXNativeTarget "runepanet" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 22322F68106833BC00641384 /* Debug */, - 22322F69106833BC00641384 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2255753E17551217009946B1 /* Build configuration list for PBXNativeTarget "epanet-static" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2255753C17551217009946B1 /* Debug */, - 2255753D17551217009946B1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/build/Xcode/epanet/epanet.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/build/Xcode/epanet/epanet.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100755 index 052c6dc..0000000 --- a/build/Xcode/epanet/epanet.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - From 3fde235ab7c8f031dfbbd1763e42c74a59f979ee Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Tue, 15 Sep 2015 10:12:07 -0400 Subject: [PATCH 036/120] fixing string copy action for hash table insertion --- src/hash.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hash.c b/src/hash.c index 4323f01..453c41b 100755 --- a/src/hash.c +++ b/src/hash.c @@ -53,6 +53,7 @@ ENHashTable *ENHashTableCreate() int ENHashTableInsert(ENHashTable *ht, char *key, int data) { + size_t len; unsigned int i = _enHash(key); ENHashEntry *entry; if ( i >= ENHASHTABLEMAXSIZE ) { @@ -62,7 +63,9 @@ int ENHashTableInsert(ENHashTable *ht, char *key, int data) if (entry == NULL) { return(0); } - entry->key = key; + len = strlen(key) + 1; + entry->key = calloc(len, sizeof(char)); + strlcpy(entry->key, key, len); entry->data = data; entry->next = ht[i]; ht[i] = entry; From 3c8d8d721126f102bb872cdd5c2f6daca5bb1082 Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Tue, 15 Sep 2015 10:33:20 -0400 Subject: [PATCH 037/120] free allocated char* for hash table entry key --- src/hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hash.c b/src/hash.c index 453c41b..117de13 100755 --- a/src/hash.c +++ b/src/hash.c @@ -118,6 +118,7 @@ void ENHashTableFree(ENHashTable *ht) while (entry != NULL) { nextentry = entry->next; + free(entry->key); free(entry); entry = nextentry; } From c9839c0eb33b2446ac0c6413d23c70b57d027f55 Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Tue, 15 Sep 2015 10:45:51 -0400 Subject: [PATCH 038/120] adding authors listing tool and initial AUTHORS file --- AUTHORS | 24 ++++++++++++++++++++++++ tools/update-authors.sh | 22 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 AUTHORS create mode 100755 tools/update-authors.sh diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..6738417 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,24 @@ +# Authors ordered by first contribution. + +Jessica Orquina +Michael Tryby +sam hatchett +Feng Shang +James Uber +Sam Hatchett +Tom Taxon +Hyoungmin Woo +Mickey +JinduanChen +mickey +yuniersoad +jamesuber +Mike Kane +eldemet +Will Furnass +Steffen Macke +Mariosmsk +Elad Salomons +Demetrios Eliades + +# Generated by tools/update-authors.sh diff --git a/tools/update-authors.sh b/tools/update-authors.sh new file mode 100755 index 0000000..17ea7a6 --- /dev/null +++ b/tools/update-authors.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +git log --reverse --format='%aN <%aE>' | perl -we ' + +BEGIN { + %seen = (), @authors = (); +} + +while (<>) { + next if $seen{$_}; + next if /\@chromium.org/; + next if //; + $seen{$_} = push @authors, $_; +} + +END { + print "# Authors ordered by first contribution.\n"; + print "\n", @authors, "\n"; + print "# Generated by tools/update-authors.sh\n"; +} + +' > ../AUTHORS \ No newline at end of file From 7336d7a69d4bde409dc84d4df00a8068f610737a Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Tue, 15 Sep 2015 10:46:06 -0400 Subject: [PATCH 039/120] resolve git conflict --- include/epanet2.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/epanet2.h b/include/epanet2.h index e447d85..b2d730c 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -274,8 +274,4 @@ extern "C" { } #endif -<<<<<<< HEAD -#endif //TOOLKIT_H -======= #endif //EPANET2_H ->>>>>>> coordinates-getter From cb8dc35cae570c7412d69c99e30db8fc3755a8b0 Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Tue, 15 Sep 2015 10:46:18 -0400 Subject: [PATCH 040/120] fixes version numbering --- src/epanet.c | 4 ++-- src/text.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index c27e231..bdc0236 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -886,8 +886,8 @@ int DLLEXPORT ENgetversion(int *v) ** Returns: error code (should always be 0) ** Purpose: retrieves a number assigned to the most recent ** update of the source code. This number, set by the -** constant CODEVERSION found in TYPES.H, began with -** 20001 and increases by 1 with each new update. +** constant CODEVERSION found in TYPES.H, is to be +** interpreted with implied decimals, i.e., "20100" == "2(.)01(.)00" **---------------------------------------------------------------- */ { diff --git a/src/text.h b/src/text.h index abbd817..85ec164 100755 --- a/src/text.h +++ b/src/text.h @@ -332,10 +332,10 @@ AUTHOR: L. Rossman #define LOGO4 \ "* Analysis for Pipe Networks *" #define LOGO5 \ -"* Version 2.00.12 *" //(2.00.12 - LR) +"* Version 2.1 *" #define LOGO6 \ "******************************************************************" -#define FMT01 "\n... EPANET Version 2.0\n" +#define FMT01 "\n... EPANET Version 2.1\n" #define FMT02 "\n o Retrieving network data" #define FMT03 "\n Correct syntax is:\n epanet \n" #define FMT04 "\n Cannot use duplicate file names." From 7dfd7f748d8ff2e24163c0f7a28325667614152e Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Tue, 15 Sep 2015 10:46:37 -0400 Subject: [PATCH 041/120] fixes mac compilation, adds sample networks and debug schema --- build/Xcode/epanet.xcodeproj/project.pbxproj | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/build/Xcode/epanet.xcodeproj/project.pbxproj b/build/Xcode/epanet.xcodeproj/project.pbxproj index a2c8b20..f13950a 100755 --- a/build/Xcode/epanet.xcodeproj/project.pbxproj +++ b/build/Xcode/epanet.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 223109E61BA865930030AAE8 /* Net3.inp in CopyFiles */ = {isa = PBXBuildFile; fileRef = 223109E31BA8658A0030AAE8 /* Net3.inp */; }; 22322F851068369500641384 /* enumstxt.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F701068369500641384 /* enumstxt.h */; }; 22322F861068369500641384 /* epanet.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F711068369500641384 /* epanet.c */; }; 22322F871068369500641384 /* funcs.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F721068369500641384 /* funcs.h */; }; @@ -56,7 +57,23 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 223109E11BA865690030AAE8 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 6; + files = ( + 223109E61BA865930030AAE8 /* Net3.inp in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ + 223109E31BA8658A0030AAE8 /* Net3.inp */ = {isa = PBXFileReference; lastKnownFileType = text; name = Net3.inp; path = "../../example-networks/Net3.inp"; sourceTree = ""; }; + 223109E41BA8658A0030AAE8 /* sampletown.inp */ = {isa = PBXFileReference; lastKnownFileType = text; name = sampletown.inp; path = "../../example-networks/sampletown.inp"; sourceTree = ""; }; + 223109E51BA8658A0030AAE8 /* simplenet.inp */ = {isa = PBXFileReference; lastKnownFileType = text; name = simplenet.inp; path = "../../example-networks/simplenet.inp"; sourceTree = ""; }; 22322F66106833BB00641384 /* runepanet */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = runepanet; sourceTree = BUILT_PRODUCTS_DIR; }; 22322F701068369500641384 /* enumstxt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = enumstxt.h; path = ../../src/enumstxt.h; sourceTree = SOURCE_ROOT; }; 22322F711068369500641384 /* epanet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = epanet.c; path = ../../src/epanet.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; }; @@ -113,6 +130,7 @@ 08FB7794FE84155DC02AAC07 /* epanet */ = { isa = PBXGroup; children = ( + 223109E21BA865790030AAE8 /* sample networks */, 22CD9A5C1B27896200B65E83 /* run epanet */, 22322FA8106836A000641384 /* Include */, 08FB7795FE84155DC02AAC07 /* Source */, @@ -158,6 +176,16 @@ name = Products; sourceTree = ""; }; + 223109E21BA865790030AAE8 /* sample networks */ = { + isa = PBXGroup; + children = ( + 223109E31BA8658A0030AAE8 /* Net3.inp */, + 223109E41BA8658A0030AAE8 /* sampletown.inp */, + 223109E51BA8658A0030AAE8 /* simplenet.inp */, + ); + name = "sample networks"; + sourceTree = ""; + }; 22322FA8106836A000641384 /* Include */ = { isa = PBXGroup; children = ( @@ -209,6 +237,7 @@ buildPhases = ( 22322F63106833BB00641384 /* Sources */, 22322F64106833BB00641384 /* Frameworks */, + 223109E11BA865690030AAE8 /* CopyFiles */, ); buildRules = ( ); From b62f179e9640985157d7669d3daa102a2d64a1c5 Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Tue, 15 Sep 2015 11:42:07 -0400 Subject: [PATCH 042/120] more build file targets related to float-precision builds, and comments about the use of that define --- build/Xcode/epanet.xcodeproj/project.pbxproj | 200 +++++++++++++++++++ include/epanet2.h | 2 + 2 files changed, 202 insertions(+) diff --git a/build/Xcode/epanet.xcodeproj/project.pbxproj b/build/Xcode/epanet.xcodeproj/project.pbxproj index f13950a..02864fd 100755 --- a/build/Xcode/epanet.xcodeproj/project.pbxproj +++ b/build/Xcode/epanet.xcodeproj/project.pbxproj @@ -8,6 +8,23 @@ /* Begin PBXBuildFile section */ 223109E61BA865930030AAE8 /* Net3.inp in CopyFiles */ = {isa = PBXBuildFile; fileRef = 223109E31BA8658A0030AAE8 /* Net3.inp */; }; + 223109EB1BA869DA0030AAE8 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 22CD9A5D1B27898E00B65E83 /* main.c */; }; + 223109ED1BA869DA0030AAE8 /* libepanet-static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2255753B17551217009946B1 /* libepanet-static.a */; }; + 223109EF1BA869DA0030AAE8 /* Net3.inp in CopyFiles */ = {isa = PBXBuildFile; fileRef = 223109E31BA8658A0030AAE8 /* Net3.inp */; }; + 223109F61BA869F30030AAE8 /* epanet.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F711068369500641384 /* epanet.c */; }; + 223109F71BA869F30030AAE8 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F731068369500641384 /* hash.c */; }; + 223109F81BA869F30030AAE8 /* hydraul.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F751068369500641384 /* hydraul.c */; }; + 223109F91BA869F30030AAE8 /* inpfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F761068369500641384 /* inpfile.c */; }; + 223109FA1BA869F30030AAE8 /* input1.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F771068369500641384 /* input1.c */; }; + 223109FB1BA869F30030AAE8 /* input2.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F781068369500641384 /* input2.c */; }; + 223109FC1BA869F30030AAE8 /* input3.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F791068369500641384 /* input3.c */; }; + 223109FD1BA869F30030AAE8 /* mempool.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7A1068369500641384 /* mempool.c */; }; + 223109FE1BA869F30030AAE8 /* output.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7C1068369500641384 /* output.c */; }; + 223109FF1BA869F30030AAE8 /* quality.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7D1068369500641384 /* quality.c */; }; + 22310A001BA869F30030AAE8 /* report.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7E1068369500641384 /* report.c */; }; + 22310A011BA869F30030AAE8 /* rules.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7F1068369500641384 /* rules.c */; }; + 22310A021BA869F30030AAE8 /* smatrix.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F801068369500641384 /* smatrix.c */; }; + 22310A051BA869F30030AAE8 /* epanet2.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322FA9106836B000641384 /* epanet2.h */; }; 22322F851068369500641384 /* enumstxt.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F701068369500641384 /* enumstxt.h */; }; 22322F861068369500641384 /* epanet.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F711068369500641384 /* epanet.c */; }; 22322F871068369500641384 /* funcs.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322F721068369500641384 /* funcs.h */; }; @@ -48,6 +65,13 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 223109E91BA869DA0030AAE8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2255753A17551217009946B1; + remoteInfo = "epanet-static"; + }; 22CD9A5F1B278B0400B65E83 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; @@ -68,12 +92,24 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 223109EE1BA869DA0030AAE8 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 6; + files = ( + 223109EF1BA869DA0030AAE8 /* Net3.inp in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 223109E31BA8658A0030AAE8 /* Net3.inp */ = {isa = PBXFileReference; lastKnownFileType = text; name = Net3.inp; path = "../../example-networks/Net3.inp"; sourceTree = ""; }; 223109E41BA8658A0030AAE8 /* sampletown.inp */ = {isa = PBXFileReference; lastKnownFileType = text; name = sampletown.inp; path = "../../example-networks/sampletown.inp"; sourceTree = ""; }; 223109E51BA8658A0030AAE8 /* simplenet.inp */ = {isa = PBXFileReference; lastKnownFileType = text; name = simplenet.inp; path = "../../example-networks/simplenet.inp"; sourceTree = ""; }; + 223109F31BA869DA0030AAE8 /* runepanet copy */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "runepanet copy"; sourceTree = BUILT_PRODUCTS_DIR; }; + 22310A091BA869F30030AAE8 /* libepanet-static copy.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libepanet-static copy.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 22322F66106833BB00641384 /* runepanet */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = runepanet; sourceTree = BUILT_PRODUCTS_DIR; }; 22322F701068369500641384 /* enumstxt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = enumstxt.h; path = ../../src/enumstxt.h; sourceTree = SOURCE_ROOT; }; 22322F711068369500641384 /* epanet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = epanet.c; path = ../../src/epanet.c; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.c; }; @@ -102,6 +138,21 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 223109EC1BA869DA0030AAE8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 223109ED1BA869DA0030AAE8 /* libepanet-static.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 22310A031BA869F30030AAE8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 22322F64106833BB00641384 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -172,6 +223,8 @@ D2AAC0630554660B00DB518D /* libepanet.dylib */, 22322F66106833BB00641384 /* runepanet */, 2255753B17551217009946B1 /* libepanet-static.a */, + 223109F31BA869DA0030AAE8 /* runepanet copy */, + 22310A091BA869F30030AAE8 /* libepanet-static copy.a */, ); name = Products; sourceTree = ""; @@ -205,6 +258,14 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 22310A041BA869F30030AAE8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 22310A051BA869F30030AAE8 /* epanet2.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 2255753917551217009946B1 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -231,6 +292,41 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 223109E71BA869DA0030AAE8 /* runepanet float-precision */ = { + isa = PBXNativeTarget; + buildConfigurationList = 223109F01BA869DA0030AAE8 /* Build configuration list for PBXNativeTarget "runepanet float-precision" */; + buildPhases = ( + 223109EA1BA869DA0030AAE8 /* Sources */, + 223109EC1BA869DA0030AAE8 /* Frameworks */, + 223109EE1BA869DA0030AAE8 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 223109E81BA869DA0030AAE8 /* PBXTargetDependency */, + ); + name = "runepanet float-precision"; + productName = runepanet; + productReference = 223109F31BA869DA0030AAE8 /* runepanet copy */; + productType = "com.apple.product-type.tool"; + }; + 223109F41BA869F30030AAE8 /* epanet-static float-precision */ = { + isa = PBXNativeTarget; + buildConfigurationList = 22310A061BA869F30030AAE8 /* Build configuration list for PBXNativeTarget "epanet-static float-precision" */; + buildPhases = ( + 223109F51BA869F30030AAE8 /* Sources */, + 22310A031BA869F30030AAE8 /* Frameworks */, + 22310A041BA869F30030AAE8 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "epanet-static float-precision"; + productName = "epanet-static"; + productReference = 22310A091BA869F30030AAE8 /* libepanet-static copy.a */; + productType = "com.apple.product-type.library.static"; + }; 22322F65106833BB00641384 /* runepanet */ = { isa = PBXNativeTarget; buildConfigurationList = 22322F6A106833E600641384 /* Build configuration list for PBXNativeTarget "runepanet" */; @@ -308,11 +404,41 @@ D2AAC0620554660B00DB518D /* epanet */, 22322F65106833BB00641384 /* runepanet */, 2255753A17551217009946B1 /* epanet-static */, + 223109E71BA869DA0030AAE8 /* runepanet float-precision */, + 223109F41BA869F30030AAE8 /* epanet-static float-precision */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ + 223109EA1BA869DA0030AAE8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 223109EB1BA869DA0030AAE8 /* main.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 223109F51BA869F30030AAE8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 223109F61BA869F30030AAE8 /* epanet.c in Sources */, + 223109F71BA869F30030AAE8 /* hash.c in Sources */, + 223109F81BA869F30030AAE8 /* hydraul.c in Sources */, + 223109F91BA869F30030AAE8 /* inpfile.c in Sources */, + 223109FA1BA869F30030AAE8 /* input1.c in Sources */, + 223109FB1BA869F30030AAE8 /* input2.c in Sources */, + 223109FC1BA869F30030AAE8 /* input3.c in Sources */, + 223109FD1BA869F30030AAE8 /* mempool.c in Sources */, + 223109FE1BA869F30030AAE8 /* output.c in Sources */, + 223109FF1BA869F30030AAE8 /* quality.c in Sources */, + 22310A001BA869F30030AAE8 /* report.c in Sources */, + 22310A011BA869F30030AAE8 /* rules.c in Sources */, + 22310A021BA869F30030AAE8 /* smatrix.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 22322F63106833BB00641384 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -364,6 +490,11 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 223109E81BA869DA0030AAE8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2255753A17551217009946B1 /* epanet-static */; + targetProxy = 223109E91BA869DA0030AAE8 /* PBXContainerItemProxy */; + }; 22CD9A601B278B0400B65E83 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 2255753A17551217009946B1 /* epanet-static */; @@ -451,6 +582,57 @@ }; name = Release; }; + 223109F11BA869DA0030AAE8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ""; + INFOPLIST_PREPROCESSOR_DEFINITIONS = ""; + PRODUCT_NAME = "runepanet copy"; + }; + name = Debug; + }; + 223109F21BA869DA0030AAE8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + GCC_MODEL_TUNING = G5; + GCC_PREPROCESSOR_DEFINITIONS = ""; + INFOPLIST_PREPROCESSOR_DEFINITIONS = ""; + PRODUCT_NAME = "runepanet copy"; + ZERO_LINK = NO; + }; + name = Release; + }; + 22310A071BA869F30030AAE8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_EMPTY_BODY = YES; + COMBINE_HIDPI_IMAGES = YES; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + PRODUCT_NAME = "epanet-static copy"; + }; + name = Debug; + }; + 22310A081BA869F30030AAE8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_EMPTY_BODY = YES; + COMBINE_HIDPI_IMAGES = YES; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + PRODUCT_NAME = "epanet-static copy"; + }; + name = Release; + }; 22322F68106833BC00641384 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -525,6 +707,24 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 223109F01BA869DA0030AAE8 /* Build configuration list for PBXNativeTarget "runepanet float-precision" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 223109F11BA869DA0030AAE8 /* Debug */, + 223109F21BA869DA0030AAE8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 22310A061BA869F30030AAE8 /* Build configuration list for PBXNativeTarget "epanet-static float-precision" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 22310A071BA869F30030AAE8 /* Debug */, + 22310A081BA869F30030AAE8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 22322F6A106833E600641384 /* Build configuration list for PBXNativeTarget "runepanet" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/include/epanet2.h b/include/epanet2.h index b2d730c..5380dbb 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -18,6 +18,8 @@ #ifndef EPANET2_H #define EPANET2_H +// the toolkit can be compiled with support for double-precision as well. +// just make sure that you use the correct #define in your client code. #ifndef EN_API_FLOAT_TYPE #define EN_API_FLOAT_TYPE float #endif From c23c846cd897b14e85561fe2f5eeea0c33a7e0e8 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Tue, 15 Sep 2015 22:38:13 +0300 Subject: [PATCH 043/120] replace strlcpy with strncpy --- src/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hash.c b/src/hash.c index 117de13..425031f 100755 --- a/src/hash.c +++ b/src/hash.c @@ -65,7 +65,7 @@ int ENHashTableInsert(ENHashTable *ht, char *key, int data) } len = strlen(key) + 1; entry->key = calloc(len, sizeof(char)); - strlcpy(entry->key, key, len); + strncpy(entry->key, key, len); entry->data = data; entry->next = ht[i]; ht[i] = entry; From c4abd61b1f5822b4153d98703457cd599e67ac7e Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Wed, 16 Sep 2015 16:06:31 -0400 Subject: [PATCH 044/120] cleans up the AUTHORS file generation script and mailmap fixes #28 --- .mailmap | 7 +++++++ AUTHORS | 20 +++++++------------- tools/update-authors.sh | 15 ++++++++++++--- 3 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 .mailmap diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..e9efe6a --- /dev/null +++ b/.mailmap @@ -0,0 +1,7 @@ +Sam Hatchett +James Uber +Demetrios Eliades +Hyoungmin Woo Mickey +Hyoungmin Woo Hyoungmin Woo +Yunier Soad +Jinduan Chen \ No newline at end of file diff --git a/AUTHORS b/AUTHORS index 6738417..df0b6bf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,24 +1,18 @@ # Authors ordered by first contribution. +# Generated by tools/update-authors.sh -Jessica Orquina +Lew Rossman Michael Tryby -sam hatchett +Sam Hatchett Feng Shang James Uber -Sam Hatchett Tom Taxon -Hyoungmin Woo -Mickey -JinduanChen -mickey -yuniersoad -jamesuber +Hyoungmin Woo +Jinduan Chen +Yunier Soad Mike Kane -eldemet +Demetrios Eliades Will Furnass Steffen Macke Mariosmsk Elad Salomons -Demetrios Eliades - -# Generated by tools/update-authors.sh diff --git a/tools/update-authors.sh b/tools/update-authors.sh index 17ea7a6..b259e56 100755 --- a/tools/update-authors.sh +++ b/tools/update-authors.sh @@ -1,22 +1,31 @@ #!/bin/sh +## +## This script will auto-generate the AUTHORS attribution file. +## If your name does not display correctly, then please +## update the .mailmap file in the root repo directory +## + git log --reverse --format='%aN <%aE>' | perl -we ' BEGIN { %seen = (), @authors = (); } +## must manually add Lew first, since he generated the code prior to CVS +push @authors, "Lew Rossman \n"; + while (<>) { next if $seen{$_}; - next if /\@chromium.org/; - next if //; + next if /orquina.jessica\@epa.gov/; ## this individual never authored code; just init-ed the repo $seen{$_} = push @authors, $_; } END { print "# Authors ordered by first contribution.\n"; - print "\n", @authors, "\n"; print "# Generated by tools/update-authors.sh\n"; + print "\n", @authors; + } ' > ../AUTHORS \ No newline at end of file From a31e4242f36ca6bb7de0211835fc54f283e21abc Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Wed, 16 Sep 2015 23:31:50 +0300 Subject: [PATCH 045/120] Update sample networks --- example-networks/Net1.inp | 178 ++++++++++++++++++ example-networks/Net2.inp | 309 ++++++++++++++++++++++++++++++++ example-networks/Net3.inp | 4 +- example-networks/sampletown.inp | 150 ---------------- example-networks/simplenet.inp | 123 ------------- 5 files changed, 489 insertions(+), 275 deletions(-) create mode 100644 example-networks/Net1.inp create mode 100644 example-networks/Net2.inp delete mode 100755 example-networks/sampletown.inp delete mode 100755 example-networks/simplenet.inp diff --git a/example-networks/Net1.inp b/example-networks/Net1.inp new file mode 100644 index 0000000..4df5bbf --- /dev/null +++ b/example-networks/Net1.inp @@ -0,0 +1,178 @@ +[TITLE] + EPANET Example Network 1 +A simple example of modeling chlorine decay. Both bulk and +wall reactions are included. + +[JUNCTIONS] +;ID Elev Demand Pattern + 10 710 0 ; + 11 710 150 ; + 12 700 150 ; + 13 695 100 ; + 21 700 150 ; + 22 695 200 ; + 23 690 150 ; + 31 700 100 ; + 32 710 100 ; + +[RESERVOIRS] +;ID Head Pattern + 9 800 ; + +[TANKS] +;ID Elevation InitLevel MinLevel MaxLevel Diameter MinVol VolCurve + 2 850 120 100 150 50.5 0 ; + +[PIPES] +;ID Node1 Node2 Length Diameter Roughness MinorLoss Status + 10 10 11 10530 18 100 0 Open ; + 11 11 12 5280 14 100 0 Open ; + 12 12 13 5280 10 100 0 Open ; + 21 21 22 5280 10 100 0 Open ; + 22 22 23 5280 12 100 0 Open ; + 31 31 32 5280 6 100 0 Open ; + 110 2 12 200 18 100 0 Open ; + 111 11 21 5280 10 100 0 Open ; + 112 12 22 5280 12 100 0 Open ; + 113 13 23 5280 8 100 0 Open ; + 121 21 31 5280 8 100 0 Open ; + 122 22 32 5280 6 100 0 Open ; + +[PUMPS] +;ID Node1 Node2 Parameters + 9 9 10 HEAD 1 ; + +[VALVES] +;ID Node1 Node2 Diameter Type Setting MinorLoss + +[TAGS] + +[DEMANDS] +;Junction Demand Pattern Category + +[STATUS] +;ID Status/Setting + +[PATTERNS] +;ID Multipliers +;Demand Pattern + 1 1.0 1.2 1.4 1.6 1.4 1.2 + 1 1.0 0.8 0.6 0.4 0.6 0.8 + +[CURVES] +;ID X-Value Y-Value +;PUMP: Pump Curve for Pump 9 + 1 1500 250 + +[CONTROLS] + LINK 9 OPEN IF NODE 2 BELOW 110 + LINK 9 CLOSED IF NODE 2 ABOVE 140 + + +[RULES] + +[ENERGY] + Global Efficiency 75 + Global Price 0.0 + Demand Charge 0.0 + +[EMITTERS] +;Junction Coefficient + +[QUALITY] +;Node InitQual + 10 0.5 + 11 0.5 + 12 0.5 + 13 0.5 + 21 0.5 + 22 0.5 + 23 0.5 + 31 0.5 + 32 0.5 + 9 1.0 + 2 1.0 + +[SOURCES] +;Node Type Quality Pattern + +[REACTIONS] +;Type Pipe/Tank Coefficient + + +[REACTIONS] + Order Bulk 1 + Order Tank 1 + Order Wall 1 + Global Bulk -.5 + Global Wall -1 + Limiting Potential 0.0 + Roughness Correlation 0.0 + +[MIXING] +;Tank Model + +[TIMES] + Duration 24:00 + Hydraulic Timestep 1:00 + Quality Timestep 0:05 + Pattern Timestep 2:00 + Pattern Start 0:00 + Report Timestep 1:00 + Report Start 0:00 + Start ClockTime 12 am + Statistic None + +[REPORT] + Status Yes + Summary No + Page 0 + +[OPTIONS] + Units GPM + Headloss H-W + Specific Gravity 1.0 + Viscosity 1.0 + Trials 40 + Accuracy 0.001 + CHECKFREQ 2 + MAXCHECK 10 + DAMPLIMIT 0 + Unbalanced Continue 10 + Pattern 1 + Demand Multiplier 1.0 + Emitter Exponent 0.5 + Quality Chlorine mg/L + Diffusivity 1.0 + Tolerance 0.01 + +[COORDINATES] +;Node X-Coord Y-Coord + 10 20.00 70.00 + 11 30.00 70.00 + 12 50.00 70.00 + 13 70.00 70.00 + 21 30.00 40.00 + 22 50.00 40.00 + 23 70.00 40.00 + 31 30.00 10.00 + 32 50.00 10.00 + 9 10.00 70.00 + 2 50.00 90.00 + +[VERTICES] +;Link X-Coord Y-Coord + +[LABELS] +;X-Coord Y-Coord Label & Anchor Node + 6.99 73.63 "Source" + 13.48 68.13 "Pump" + 43.85 91.21 "Tank" + +[BACKDROP] + DIMENSIONS 7.00 6.00 73.00 94.00 + UNITS None + FILE + OFFSET 0.00 0.00 + +[END] diff --git a/example-networks/Net2.inp b/example-networks/Net2.inp new file mode 100644 index 0000000..9f53e62 --- /dev/null +++ b/example-networks/Net2.inp @@ -0,0 +1,309 @@ +[TITLE] +EPANET Example Network 2 +Example of modeling a 55-hour fluoride tracer study. +Measured fluoride data is contained in the file Net2-FL.dat +and should be registered with the project to produce a +Calibration Report (select Calibration Data from the Project +menu). + +[JUNCTIONS] +;ID Elev Demand Pattern + 1 50 -694.4 2 ; + 2 100 8 ; + 3 60 14 ; + 4 60 8 ; + 5 100 8 ; + 6 125 5 ; + 7 160 4 ; + 8 110 9 ; + 9 180 14 ; + 10 130 5 ; + 11 185 34.78 ; + 12 210 16 ; + 13 210 2 ; + 14 200 2 ; + 15 190 2 ; + 16 150 20 ; + 17 180 20 ; + 18 100 20 ; + 19 150 5 ; + 20 170 19 ; + 21 150 16 ; + 22 200 10 ; + 23 230 8 ; + 24 190 11 ; + 25 230 6 ; + 27 130 8 ; + 28 110 0 ; + 29 110 7 ; + 30 130 3 ; + 31 190 17 ; + 32 110 17 ; + 33 180 1.5 ; + 34 190 1.5 ; + 35 110 0 ; + 36 110 1 ; + +[RESERVOIRS] +;ID Head Pattern + +[TANKS] +;ID Elevation InitLevel MinLevel MaxLevel Diameter MinVol VolCurve + 26 235 56.7 50 70 50 0 ; + +[PIPES] +;ID Node1 Node2 Length Diameter Roughness MinorLoss Status + 1 1 2 2400 12 100 0 Open ; + 2 2 5 800 12 100 0 Open ; + 3 2 3 1300 8 100 0 Open ; + 4 3 4 1200 8 100 0 Open ; + 5 4 5 1000 12 100 0 Open ; + 6 5 6 1200 12 100 0 Open ; + 7 6 7 2700 12 100 0 Open ; + 8 7 8 1200 12 140 0 Open ; + 9 7 9 400 12 100 0 Open ; + 10 8 10 1000 8 140 0 Open ; + 11 9 11 700 12 100 0 Open ; + 12 11 12 1900 12 100 0 Open ; + 13 12 13 600 12 100 0 Open ; + 14 13 14 400 12 100 0 Open ; + 15 14 15 300 12 100 0 Open ; + 16 13 16 1500 8 100 0 Open ; + 17 15 17 1500 8 100 0 Open ; + 18 16 17 600 8 100 0 Open ; + 19 17 18 700 12 100 0 Open ; + 20 18 32 350 12 100 0 Open ; + 21 16 19 1400 8 100 0 Open ; + 22 14 20 1100 12 100 0 Open ; + 23 20 21 1300 8 100 0 Open ; + 24 21 22 1300 8 100 0 Open ; + 25 20 22 1300 8 100 0 Open ; + 26 24 23 600 12 100 0 Open ; + 27 15 24 250 12 100 0 Open ; + 28 23 25 300 12 100 0 Open ; + 29 25 26 200 12 100 0 Open ; + 30 25 31 600 12 100 0 Open ; + 31 31 27 400 8 100 0 Open ; + 32 27 29 400 8 100 0 Open ; + 34 29 28 700 8 100 0 Open ; + 35 22 33 1000 8 100 0 Open ; + 36 33 34 400 8 100 0 Open ; + 37 32 19 500 8 100 0 Open ; + 38 29 35 500 8 100 0 Open ; + 39 35 30 1000 8 100 0 Open ; + 40 28 35 700 8 100 0 Open ; + 41 28 36 300 8 100 0 Open ; + +[PUMPS] +;ID Node1 Node2 Parameters + +[VALVES] +;ID Node1 Node2 Diameter Type Setting MinorLoss + +[TAGS] + +[DEMANDS] +;Junction Demand Pattern Category + +[STATUS] +;ID Status/Setting + +[PATTERNS] +;ID Multipliers +;Demand Pattern + 1 1.26 1.04 .97 .97 .89 1.19 + 1 1.28 .67 .67 1.34 2.46 .97 + 1 .92 .68 1.43 .61 .31 .78 + 1 .37 .67 1.26 1.56 1.19 1.26 + 1 .6 1.1 1.03 .73 .88 1.06 + 1 .99 1.72 1.12 1.34 1.12 .97 + 1 1.04 1.15 .91 .61 .68 .46 + 1 .51 .74 1.12 1.34 1.26 .97 + 1 .82 1.37 1.03 .81 .88 .81 + 1 .81 +;Pump Station Outflow Pattern + 2 .96 .96 .96 .96 .96 .96 + 2 .62 0 0 0 0 0 + 2 .8 1 1 1 1 .15 + 2 0 0 0 0 0 0 + 2 .55 .92 .92 .92 .92 .9 + 2 .9 .45 0 0 0 0 + 2 0 .7 1 1 1 1 + 2 .2 0 0 0 0 0 + 2 0 .74 .92 .92 .92 .92 + 2 .92 +;Pump Station Fluoride Pattern + 3 .98 1.02 1.05 .99 .64 .46 + 3 .35 .35 .35 .35 .35 .35 + 3 .17 .17 .13 .13 .13 .15 + 3 .15 .15 .15 .15 .15 .15 + 3 .15 .12 .1 .08 .11 .09 + 3 .09 .08 .08 .08 .08 .08 + 3 .08 .09 .07 .07 .09 .09 + 3 .09 .09 .09 .09 .09 .09 + 3 .09 .08 .35 .72 .82 .92 + 3 1 + +[CURVES] +;ID X-Value Y-Value + +[CONTROLS] + +[RULES] + +[ENERGY] + Global Efficiency 75 + Global Price 0.0 + Demand Charge 0.0 + +[EMITTERS] +;Junction Coefficient + +[QUALITY] +;Node InitQual + 1 1.0 + 2 1.0 + 3 1.0 + 4 1.0 + 5 1.0 + 6 1.0 + 7 1.0 + 8 1.0 + 9 1.0 + 10 1.0 + 11 1.0 + 12 1.0 + 13 1.0 + 14 1.0 + 15 1.0 + 16 1.0 + 17 1.0 + 18 1.0 + 19 1.0 + 20 1.0 + 21 1.0 + 22 1.0 + 23 1.0 + 24 1.0 + 25 1.0 + 27 1.0 + 28 1.0 + 29 1.0 + 30 1.0 + 31 1.0 + 32 1.0 + 33 1.0 + 34 1.0 + 35 1.0 + 36 1.0 + 26 1.0 + +[SOURCES] +;Node Type Quality Pattern + 1 CONCEN 1.0 3 + +[REACTIONS] +;Type Pipe/Tank Coefficient + + +[REACTIONS] + Order Bulk 1 + Order Tank 1 + Order Wall 1 + Global Bulk 0.0 + Global Wall 0.0 + Limiting Potential 0.0 + Roughness Correlation 0.0 + +[MIXING] +;Tank Model + +[TIMES] + Duration 55:00 + Hydraulic Timestep 1:00 + Quality Timestep 0:05 + Pattern Timestep 1:00 + Pattern Start 0:00 + Report Timestep 1:00 + Report Start 0:00 + Start ClockTime 8 am + Statistic None + +[REPORT] + Status No + Summary No + Page 0 + +[OPTIONS] + Units GPM + Headloss H-W + Specific Gravity 1.0 + Viscosity 1.0 + Trials 40 + Accuracy 0.001 + CHECKFREQ 2 + MAXCHECK 10 + DAMPLIMIT 0 + Unbalanced Continue 10 + Pattern 1 + Demand Multiplier 1.0 + Emitter Exponent 0.5 + Quality Fluoride mg/L + Diffusivity 1.0 + Tolerance 0.01 + +[COORDINATES] +;Node X-Coord Y-Coord + 1 21.00 4.00 + 2 19.00 20.00 + 3 11.00 21.00 + 4 14.00 28.00 + 5 19.00 25.00 + 6 28.00 23.00 + 7 36.00 39.00 + 8 38.00 30.00 + 9 36.00 42.00 + 10 37.00 23.00 + 11 37.00 49.00 + 12 39.00 60.00 + 13 38.00 64.00 + 14 38.00 66.00 + 15 37.00 69.00 + 16 27.00 65.00 + 17 27.00 69.00 + 18 23.00 68.00 + 19 21.00 59.00 + 20 45.00 68.00 + 21 51.00 62.00 + 22 54.00 69.00 + 23 35.00 74.00 + 24 37.00 71.00 + 25 35.00 76.00 + 27 39.00 87.00 + 28 49.00 85.00 + 29 42.00 86.00 + 30 47.00 80.00 + 31 37.00 80.00 + 32 23.00 64.00 + 33 56.00 73.00 + 34 56.00 77.00 + 35 43.00 81.00 + 36 53.00 87.00 + 26 33.00 76.00 + +[VERTICES] +;Link X-Coord Y-Coord + +[LABELS] +;X-Coord Y-Coord Label & Anchor Node + 24.00 7.00 "Pump" + 24.00 4.00 "Station" + 26.76 77.42 "Tank" + +[BACKDROP] + DIMENSIONS 8.75 -0.15 58.25 91.15 + UNITS None + FILE + OFFSET 0.00 0.00 + +[END] diff --git a/example-networks/Net3.inp b/example-networks/Net3.inp index 8e39dd1..3be1e96 100755 --- a/example-networks/Net3.inp +++ b/example-networks/Net3.inp @@ -311,7 +311,6 @@ Link 330 OPEN IF Node 1 ABOVE 19.1 [QUALITY] ;Node InitQual - [SOURCES] ;Node Type Quality Pattern @@ -333,7 +332,7 @@ Link 330 OPEN IF Node 1 ABOVE 19.1 [TIMES] Duration 24:00 - Hydraulic Timestep 1:00 + Hydraulic Timestep 1:00 Quality Timestep 0:05 Pattern Timestep 1:00 Pattern Start 0:00 @@ -411,6 +410,7 @@ Link 330 OPEN IF Node 1 ABOVE 19.1 169 25.68 12.74 171 26.65 11.80 173 26.87 11.59 + 177 25.92 10.59 179 25.71 10.40 181 25.72 10.74 183 25.45 10.18 diff --git a/example-networks/sampletown.inp b/example-networks/sampletown.inp deleted file mode 100755 index 787f689..0000000 --- a/example-networks/sampletown.inp +++ /dev/null @@ -1,150 +0,0 @@ -[TITLE] - - -[JUNCTIONS] -;ID Elev Demand Pattern - TreatmentPlant 0 0 ; - Montgomery 0 80 ; - Tennessee 0 250 ; - Reading 0 100 ; - Mills 0 1000 stepdemand ; - Vine 0 50 ; - -[RESERVOIRS] -;ID Head Pattern - Resr 100 ; - -[TANKS] -;ID Elevation InitLevel MinLevel MaxLevel Diameter MinVol VolCurve - NewportTank 50 40 0 80 20 0 ; - -[PIPES] -;ID Node1 Node2 Length Diameter Roughness MinorLoss Status - ReservoirCheckValve Resr TreatmentPlant 10 4 100 0 CV ; - 2 TreatmentPlant Montgomery 3 6 100 0 Open ; - 3 Montgomery Tennessee 6 6 100 0 Open ; - 4 Tennessee Reading 12 6 100 0 Open ; - 5 Reading Mills 24 6 100 0 Open ; - NewportTankPipe Tennessee NewportTank 50 3 100 0 Open ; - 1 Reading Vine 50 6 100 0 Open ; - -[PUMPS] -;ID Node1 Node2 Parameters - -[VALVES] -;ID Node1 Node2 Diameter Type Setting MinorLoss - -[TAGS] - -[DEMANDS] -;Junction Demand Pattern Category - -[STATUS] -;ID Status/Setting - -[PATTERNS] -;ID Multipliers -; - stepdemand 1 1 1 1 1 1 - stepdemand 0 0 0 0 0 0 - -[CURVES] -;ID X-Value Y-Value - -[CONTROLS] - - - - -[RULES] - - - -[ENERGY] - Global Efficiency 75 - Global Price 0 - Demand Charge 0 - -[EMITTERS] -;Junction Coefficient - -[QUALITY] -;Node InitQual - -[SOURCES] -;Node Type Quality Pattern - -[REACTIONS] -;Type Pipe/Tank Coefficient - - -[REACTIONS] - Order Bulk 1 - Order Tank 1 - Order Wall 1 - Global Bulk 0 - Global Wall 0 - Limiting Potential 0 - Roughness Correlation 0 - -[MIXING] -;Tank Model - -[TIMES] - Duration 24:00 - Hydraulic Timestep 0:10 - Quality Timestep 0:01 - Pattern Timestep 1:00 - Pattern Start 0:00 - Report Timestep 1:00 - Report Start 0:00 - Start ClockTime 12 am - Statistic NONE - -[REPORT] - Status No - Summary No - Page 0 - -[OPTIONS] - Units GPM - Headloss H-W - Specific Gravity 1 - Viscosity 1 - Trials 40 - Accuracy 0.001 - CHECKFREQ 2 - MAXCHECK 10 - DAMPLIMIT 0 - Unbalanced Continue 10 - Pattern 1 - Demand Multiplier 1.0 - Emitter Exponent 0.5 - Quality Trace Resr - Diffusivity 1 - Tolerance 0.01 - -[COORDINATES] -;Node X-Coord Y-Coord - TreatmentPlant -1075.95 6943.94 - Montgomery 1273.73 6946.20 - Tennessee 3204.11 6946.20 - Reading 6352.85 6946.20 - Mills 10226.04 6943.94 - Vine 6356.24 5063.29 - Resr -2414.20 6923.08 - NewportTank 3209.76 8318.26 - -[VERTICES] -;Link X-Coord Y-Coord - -[LABELS] -;X-Coord Y-Coord Label & Anchor Node - -[BACKDROP] - DIMENSIONS 0.00 0.00 10000.00 10000.00 - UNITS Meters - FILE - OFFSET 0.00 0.00 - -[END] diff --git a/example-networks/simplenet.inp b/example-networks/simplenet.inp deleted file mode 100755 index a0ccdc0..0000000 --- a/example-networks/simplenet.inp +++ /dev/null @@ -1,123 +0,0 @@ -[TITLE] -EPANET Example Network 3 -Example showing how the percent of Lake water in a dual-source -system changes over time. - -[JUNCTIONS] -;ID Elev Demand Pattern - node1 147 1 1 ; - node2 147 1 1 - -[RESERVOIRS] -;ID Head Pattern - reservoir 220.0 ; - -[TANKS] -;ID Elevation InitLevel MinLevel MaxLevel Diameter MinVol VolCurve - -[PIPES] -;ID Node1 Node2 Length Diameter Roughness MinorLoss Status - pipe1 reservoir node1 100 12 100 0 Open ; - pipe2 node1 node2 100 12 100 0 Open ; - -[PUMPS] -;ID Node1 Node2 Parameters - -[VALVES] -;ID Node1 Node2 Diameter Type Setting MinorLoss - -[TAGS] - -[DEMANDS] -;Junction Demand Pattern Category - -[STATUS] -;ID Status/Setting - 10 Closed - -[PATTERNS] -;ID Multipliers -;General Default Demand Pattern - 1 1 - -[CURVES] -;ID X-Value Y-Value - - -[CONTROLS] - -[RULES] - -[ENERGY] - Global Efficiency 75 - Global Price 0.0 - Demand Charge 0.0 - -[EMITTERS] -;Junction Coefficient - -[QUALITY] -;Node InitQual - - -[SOURCES] -;Node Type Quality Pattern - -[REACTIONS] -;Type Pipe/Tank Coefficient - - -[REACTIONS] - Order Bulk 1 - Order Tank 1 - Order Wall 1 - Global Bulk 0.0 - Global Wall 0.0 - Limiting Potential 0.0 - Roughness Correlation 0.0 - -[MIXING] -;Tank Model - -[TIMES] - Duration 24:00 - Hydraulic Timestep 0:05 - Quality Timestep 0:05 - Pattern Timestep 1:00 - Pattern Start 0:00 - Report Timestep 1:00 - Report Start 0:00 - Start ClockTime 12 am - Statistic None - -[REPORT] - Status Yes - Summary No - Page 0 - -[OPTIONS] - Units GPM - Headloss H-W - Specific Gravity 1.0 - Viscosity 1.0 - Trials 40 - Accuracy 0.001 - CHECKFREQ 2 - MAXCHECK 10 - DAMPLIMIT 0 - Unbalanced Continue 10 - Pattern 1 - Demand Multiplier 1.0 - Emitter Exponent 0.5 - Quality Trace reservoir - Diffusivity 1.0 - Tolerance 0.01 - -[COORDINATES] -;Node X-Coord Y-Coord - - -[VERTICES] -;Link X-Coord Y-Coord - -[END] From 02a42fe16bebd502cdfc1573b5a6d6324f750d65 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Fri, 18 Sep 2015 13:03:53 +0300 Subject: [PATCH 046/120] Added curve GET functions ENgetcurveindex, ENgetcurveid, ENgetcurvelen and ENgetcurvevalue. This is for issue #9 --- build/WinSDK/epanet2.def | 6 ++- include/epanet2.bas | 5 +++ include/epanet2.h | 7 +++- include/epanet2.vb | 5 +++ src/epanet.c | 83 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 104 insertions(+), 2 deletions(-) diff --git a/build/WinSDK/epanet2.def b/build/WinSDK/epanet2.def index ec3bee9..1e34a59 100644 --- a/build/WinSDK/epanet2.def +++ b/build/WinSDK/epanet2.def @@ -67,4 +67,8 @@ EXPORTS ENsetbasedemand = _ENsetbasedemand@12 ENgetaveragepatternvalue = _ENgetaveragepatternvalue@8 ENgetheadcurve = _ENgetheadcurve@8 - ENgetpumptype = _ENgetpumptype@8 \ No newline at end of file + ENgetpumptype = _ENgetpumptype@8 + ENgetcurveindex = _ENgetcurveindex@8 + ENgetcurveid = _ENgetcurveid@8 + ENgetcurvelen = _ENgetcurvelen@8 + ENgetcurvevalue = _ENgetcurvevalue@16 \ No newline at end of file diff --git a/include/epanet2.bas b/include/epanet2.bas index 4260cfb..2d804f8 100644 --- a/include/epanet2.bas +++ b/include/epanet2.bas @@ -219,3 +219,8 @@ Global Const EN_INITFLOW = 10 ' Re-initialize flow flag Declare Function ENsetqualtype Lib "epanet2.dll" (ByVal QualCode As Long, ByVal ChemName As String, ByVal ChemUnits As String, ByVal TraceNode As String) As Long Declare Function ENgetqualinfo Lib "epanet2.dll" (QualCode As Long, ChemName As String, ChemUnits As String, TraceNode As Long) As Long Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal NodeIndex As Long, ByVal DemandIndex As Long, ByVal BaseDemand As Single) As Long + + Declare Function ENgetcurveindex Lib "epanet2.dll" (ByVal ID As String, Index As Long) As Long + Declare Function ENgetcurveid Lib "epanet2.dll" (ByVal Index As Long, ByVal ID As String) As Long + Declare Function ENgetcurvelen Lib "epanet2.dll" (ByVal Index As Long, L As Long) As Long + Declare Function ENgetcurvevalue Lib "epanet2.dll" (ByVal Index As Long, ByVal Ptn As Long, X As Single, Y As Single) As Long \ No newline at end of file diff --git a/include/epanet2.h b/include/epanet2.h index 5380dbb..dab5ce2 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -271,7 +271,12 @@ extern "C" { int DLLEXPORT ENsetqualtype(int qualcode, char *chemname, char *chemunits, char *tracenode); int DLLEXPORT ENgetqualinfo(int *qualcode, char *chemname, char *chemunits, int *tracenode); int DLLEXPORT ENsetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE baseDemand); - + + int DLLEXPORT ENgetcurveindex(char *id, int *index); + int DLLEXPORT ENgetcurveid(int index, char *id); + int DLLEXPORT ENgetcurvelen(int index, int *len); + int DLLEXPORT ENgetcurvevalue(int index, int pnt, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y); + #if defined(__cplusplus) } #endif diff --git a/include/epanet2.vb b/include/epanet2.vb index 62da5fc..5a219ad 100644 --- a/include/epanet2.vb +++ b/include/epanet2.vb @@ -217,4 +217,9 @@ Public Const EN_CUSTOM = 2 ' user-defined custom curve Declare Function ENaddpattern Lib "epanet2.dll" (ByVal ID As String) As Int32 + Declare Function ENgetcurveindex Lib "epanet2.dll" (ByVal ID As String, ByRef Index As Int32) As Int32 + Declare Function ENgetcurveid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32 + Declare Function ENgetcurvelen Lib "epanet2.dll" (ByVal Index As Int32, ByRef L As Int32) As Int32 + Declare Function ENgetcurvevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Pnt As Int32, ByRef X As Single, ByRef Y As Single) As Int32 + End Module diff --git a/src/epanet.c b/src/epanet.c index bdc0236..5c682ab 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -1137,6 +1137,89 @@ int DLLEXPORT ENgetpatternvalue(int index, int period, EN_API_FLOAT_TYPE *value) } +int DLLEXPORT ENgetcurveindex(char *id, int *index) +/*---------------------------------------------------------------- +** Input: id = curve ID +** Output: *index = index of curve in list of curves +** Returns: error code +** Purpose: retrieves index of curve with specific ID +**---------------------------------------------------------------- +*/ +{ + int i; + *index = 0; + if (!Openflag) return(102); + for (i=1; i<=Ncurves; i++) + { + if (strcmp(id, Curve[i].ID) == 0) + { + *index = i; + return(0); + } + } + *index = 0; + return(206); +} + + +int DLLEXPORT ENgetcurveid(int index, char *id) +/*---------------------------------------------------------------- +** Input: index = index of curve +** Output: id = curve ID +** Returns: error code +** Purpose: retrieves ID of a curve with specific index +** +** NOTE: 'id' must be able to hold MAXID characters +**---------------------------------------------------------------- +*/ +{ + strcpy(id,""); + if (!Openflag) return(102); + if (index < 1 || index > Ncurves) return(206); + strcpy(id,Curve[index].ID); + return(0); +} + + +int DLLEXPORT ENgetcurvelen(int index, int *len) +/*---------------------------------------------------------------- +** Input: index = index of curve +** Output: *len = curve length (number of points in curve) +** Returns: error code +** Purpose: retrieves number of points in a curve +**---------------------------------------------------------------- +*/ +{ + if (!Openflag) return(102); + if (index < 1 || index > Ncurves) return(206); + *len = Curve[index].Npts; + return(0); +} + + +int DLLEXPORT ENgetcurvevalue(int index, int pnt, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y) +/*---------------------------------------------------------------- +** Input: index = index of curve +** pnt = curve's point number +** Output: *x = curve x value +** curve y value +** Returns: error code +** Purpose: retrieves x,y point for a specific point number +** and curve +**---------------------------------------------------------------- +*/ +{ + *x = 0.0; + *y = 0.0; + if (!Openflag) return(102); + if (index < 1 || index > Ncurves) return(206); + if (pnt < 1 || pnt > Curve[index].Npts) return(251); + *x = (EN_API_FLOAT_TYPE)Curve[index].X[pnt-1]; + *y = (EN_API_FLOAT_TYPE)Curve[index].Y[pnt-1]; + return(0); +} + + int DLLEXPORT ENgetqualtype(int *qualcode, int *tracenode) /*---------------------------------------------------------------- ** Input: none From 472d9dd35b3f2c5d2281c7cc74ffe0e421cd2a32 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Fri, 18 Sep 2015 14:54:43 +0300 Subject: [PATCH 047/120] Added curves SET functions ENsetcurvevalue, ENsetcurve and ENaddcurve This should close issue #9 --- build/WinSDK/epanet2.def | 5 +- include/epanet2.bas | 5 +- include/epanet2.h | 5 +- include/epanet2.vb | 3 + src/epanet.c | 146 ++++++++++++++++++++++++++++++++++++++- 5 files changed, 160 insertions(+), 4 deletions(-) diff --git a/build/WinSDK/epanet2.def b/build/WinSDK/epanet2.def index 1e34a59..1e2bd35 100644 --- a/build/WinSDK/epanet2.def +++ b/build/WinSDK/epanet2.def @@ -71,4 +71,7 @@ EXPORTS ENgetcurveindex = _ENgetcurveindex@8 ENgetcurveid = _ENgetcurveid@8 ENgetcurvelen = _ENgetcurvelen@8 - ENgetcurvevalue = _ENgetcurvevalue@16 \ No newline at end of file + ENgetcurvevalue = _ENgetcurvevalue@16 + ENsetcurvevalue = _ENsetcurvevalue@16 + ENsetcurve = _ENsetcurve@16 + ENaddcurve = _ENaddcurve@4 \ No newline at end of file diff --git a/include/epanet2.bas b/include/epanet2.bas index 2d804f8..86e8c38 100644 --- a/include/epanet2.bas +++ b/include/epanet2.bas @@ -223,4 +223,7 @@ Global Const EN_INITFLOW = 10 ' Re-initialize flow flag Declare Function ENgetcurveindex Lib "epanet2.dll" (ByVal ID As String, Index As Long) As Long Declare Function ENgetcurveid Lib "epanet2.dll" (ByVal Index As Long, ByVal ID As String) As Long Declare Function ENgetcurvelen Lib "epanet2.dll" (ByVal Index As Long, L As Long) As Long - Declare Function ENgetcurvevalue Lib "epanet2.dll" (ByVal Index As Long, ByVal Ptn As Long, X As Single, Y As Single) As Long \ No newline at end of file + Declare Function ENgetcurvevalue Lib "epanet2.dll" (ByVal Index As Long, ByVal Ptn As Long, X As Single, Y As Single) As Long + Declare Function ENsetcurvevalue Lib "epanet2.dll" (ByVal Index As Long, ByVal Ptn As Long, ByVal X As Single, ByVal Y As Single) As Long + Declare Function ENsetcurve Lib "epanet2.dll" (ByVal Index As Long, X As Any, Y As Any, ByVal N As Long) As Long + Declare Function ENaddcurve Lib "epanet2.dll" (ByVal ID As String) As Long \ No newline at end of file diff --git a/include/epanet2.h b/include/epanet2.h index dab5ce2..03b1244 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -276,7 +276,10 @@ extern "C" { int DLLEXPORT ENgetcurveid(int index, char *id); int DLLEXPORT ENgetcurvelen(int index, int *len); int DLLEXPORT ENgetcurvevalue(int index, int pnt, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y); - + int DLLEXPORT ENsetcurvevalue(int index, int pnt, EN_API_FLOAT_TYPE x, EN_API_FLOAT_TYPE x); + int DLLEXPORT ENsetcurve(int index, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y, int len); + int DLLEXPORT ENaddcurve(char *id); + #if defined(__cplusplus) } #endif diff --git a/include/epanet2.vb b/include/epanet2.vb index 5a219ad..ed0e116 100644 --- a/include/epanet2.vb +++ b/include/epanet2.vb @@ -221,5 +221,8 @@ Public Const EN_CUSTOM = 2 ' user-defined custom curve Declare Function ENgetcurveid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32 Declare Function ENgetcurvelen Lib "epanet2.dll" (ByVal Index As Int32, ByRef L As Int32) As Int32 Declare Function ENgetcurvevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Pnt As Int32, ByRef X As Single, ByRef Y As Single) As Int32 + Declare Function ENsetcurvevalue Lib "epanet2.dll" (ByVal Index As Int32, ByVal Pnt As Int32, ByVal X As Single, ByVal Y As Single) As Int32 + Declare Function ENsetcurve Lib "epanet2.dll" (ByVal Index as Int32, ByRef X as Single, ByRef Y as Single, ByVal N as Int32) as Int32 + Declare Function ENaddcurve Lib "epanet2.dll" (ByVal ID As String) As Int32 End Module diff --git a/src/epanet.c b/src/epanet.c index 5c682ab..c350434 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -2386,7 +2386,7 @@ int DLLEXPORT ENsetpattern(int index, EN_API_FLOAT_TYPE *f, int n) return(0); } - + int DLLEXPORT ENsetpatternvalue(int index, int period, EN_API_FLOAT_TYPE value) /*---------------------------------------------------------------- ** Input: index = time pattern index @@ -2406,6 +2406,150 @@ int DLLEXPORT ENsetpatternvalue(int index, int period, EN_API_FLOAT_TYPE value } +int DLLEXPORT ENaddcurve(char *id) +/*---------------------------------------------------------------- +** Input: id = ID name of the new curve +** Output: none +** Returns: error code +** Purpose: adds a new curve appended to the end of the +** existing curves. +**---------------------------------------------------------------- +*/ +{ + int i, j, n, err = 0; + Scurve *tmpCur; + +/* Check if a curve with same id already exists */ + + if ( !Openflag ) return(102); + if ( ENgetcurveindex(id, &i) == 0 ) return(215); + +/* Check that id name is not too long */ + + if (strlen(id) > MAXID) return(250); + +/* Allocate memory for a new array of curves */ + + n = Ncurves + 1; + tmpCur = (Scurve *) calloc(n+1, sizeof(Scurve)); + if ( tmpCur == NULL ) return(101); + +/* Copy contents of old curve array to new one */ + + for (i=0; i<=Ncurves; i++) + { + strcpy(tmpCur[i].ID, Curve[i].ID); + tmpCur[i].Npts = Curve[i].Npts; + tmpCur[i].X = (double *) calloc(Curve[i].Npts, sizeof(double)); + tmpCur[i].Y = (double *) calloc(Curve[i].Npts, sizeof(double)); + if (tmpCur[i].X == NULL) err = 1; + else if (tmpCur[i].Y == NULL) err = 1; + else for (j=0; j Ncurves) return(206); + if (n <= 0) return(202); + +/* Re-set number of points & reallocate memory for values */ + Curve[index].Npts = n; + Curve[index].X = (double *) realloc(Curve[index].X, n*sizeof(double)); + Curve[index].Y = (double *) realloc(Curve[index].Y, n*sizeof(double)); + if (Curve[index].X == NULL) return(101); + if (Curve[index].Y == NULL) return(101); + +/* Load values into curve */ + for (j=0; j Ncurves) return(206); + if (pnt <= 0 || pnt > Curve[index].Npts) return(251); + Curve[index].X[pnt-1] = x; + Curve[index].Y[pnt-1] = y; + return(0); +} + + int DLLEXPORT ENsettimeparam(int code, long value) /*---------------------------------------------------------------- ** Input: code = time parameter code (see EPANET2.H) From bdcf3d77d5f3e699ac565cf531daaeedbd1f098a Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sun, 20 Sep 2015 21:57:09 +0300 Subject: [PATCH 048/120] Fix header typo --- include/epanet2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/epanet2.h b/include/epanet2.h index 03b1244..606bf1b 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -276,7 +276,7 @@ extern "C" { int DLLEXPORT ENgetcurveid(int index, char *id); int DLLEXPORT ENgetcurvelen(int index, int *len); int DLLEXPORT ENgetcurvevalue(int index, int pnt, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y); - int DLLEXPORT ENsetcurvevalue(int index, int pnt, EN_API_FLOAT_TYPE x, EN_API_FLOAT_TYPE x); + int DLLEXPORT ENsetcurvevalue(int index, int pnt, EN_API_FLOAT_TYPE x, EN_API_FLOAT_TYPE y); int DLLEXPORT ENsetcurve(int index, EN_API_FLOAT_TYPE *x, EN_API_FLOAT_TYPE *y, int len); int DLLEXPORT ENaddcurve(char *id); From f894ade5eea19fbae121188974ada4db125bf8b1 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Sun, 20 Sep 2015 22:44:31 +0300 Subject: [PATCH 049/120] Fix case when no section at top of input file This fixes issue #13 --- src/input2.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/input2.c b/src/input2.c index 6ac3202..aa03cdc 100755 --- a/src/input2.c +++ b/src/input2.c @@ -218,11 +218,19 @@ int readdata() /* Otherwise process next line of input in current section */ else { - inperr = newline(sect,line); - if (inperr > 0) + if (sect >=0) //for cases were no section is present on the top of the input file { - inperrmsg(inperr,sect,line); - errsum++; + inperr = newline(sect,line); + if (inperr > 0) + { + inperrmsg(inperr,sect,line); + errsum++; + } + } + else + { + errcode = 200; + break; } } From 322a3cb46382bfe7172e2574003c6c277fcd2a43 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Wed, 23 Sep 2015 15:31:29 +0300 Subject: [PATCH 050/120] Added pump's type constants to header files --- include/epanet2.bas | 4 ++++ include/epanet2.h | 3 +++ src/epanet.c | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/epanet2.bas b/include/epanet2.bas index 86e8c38..9ceeb2b 100644 --- a/include/epanet2.bas +++ b/include/epanet2.bas @@ -140,6 +140,10 @@ Global Const EN_SAVE = 1 Global Const EN_INITFLOW = 10 ' Re-initialize flow flag +Global Const EN_CONST_HP = 0 ' constant horsepower +Global Const EN_POWER_FUNC = 1 ' power function +Global Const EN_CUSTOM = 2 ' user-defined custom curve + 'These are the external functions that comprise the DLL Declare Function ENepanet Lib "epanet2.dll" (ByVal F1 As String, ByVal F2 As String, ByVal F3 As String, ByVal F4 As Any) As Long diff --git a/include/epanet2.h b/include/epanet2.h index 606bf1b..7bab95e 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -188,6 +188,9 @@ #define EN_INITFLOW 10 /* Re-initialize flows flag */ +#define EN_CONST_HP 0 /* constant horsepower */ +#define EN_POWER_FUNC 1 /* power function */ +#define EN_CUSTOM 2 /* user-defined custom curve */ // --- Declare the EPANET toolkit functions #if defined(__cplusplus) diff --git a/src/epanet.c b/src/epanet.c index c350434..571bdc5 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -2785,7 +2785,7 @@ int DLLEXPORT ENgetheadcurve(int index, char *id) int DLLEXPORT ENgetpumptype(int index, int *type) /*---------------------------------------------------------------- ** Input: index = index of pump in list of links -** Output: type = PumpType +** Output: type = Pump type ** Returns: error code ** Purpose: retrieves type of a pump for specific link index ** From f6d3d08030169d8e6a3e044c3a68723b900955e7 Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Wed, 23 Sep 2015 16:17:27 -0400 Subject: [PATCH 051/120] trying doxygen markup and config --- README.md | 2 +- doc/doxyfile | 2457 +++++++++++++++++++++++++++++++++++++++++++++ doc/main.md | 3 + include/epanet2.h | 81 +- 4 files changed, 2541 insertions(+), 2 deletions(-) create mode 100644 doc/doxyfile create mode 100644 doc/main.md diff --git a/README.md b/README.md index d36a517..4e00036 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -EPANET +EPANET {#epanet_readme} ====== The EPANET Library is a pressurized pipe network hydraulic and water quality analysis toolkit written in C. diff --git a/doc/doxyfile b/doc/doxyfile new file mode 100644 index 0000000..6b668d6 --- /dev/null +++ b/doc/doxyfile @@ -0,0 +1,2457 @@ +# Doxyfile 1.8.10 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = EPANET + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = 2.1 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = ../../epanet-owa-dox + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = YES + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = ../ \ + ../include \ + ../src \ + ../doc + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, +# *.vhdl, *.ucf, *.qsf, *.as and *.js. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf \ + *.as \ + *.js + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# compiled with the --with-libclang option. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /