Commit Graph

50 Commits

Author SHA1 Message Date
Sam Hatchett
6674997789 Merge pull request #5 from eldemet/patch-1
compiler issue - for loop var declaration
2013-07-16 06:13:42 -07:00
eldemet
2b7f91980a Update epanet.c
Problem when compiling the DLL using the MSVC++ 2010 Express. 

Proposed change: Define `int iPoint;' before the for-loop

Error message reference: 
1>epanet.c(1767): error C2143: syntax error : missing ';' before 'type'
1>epanet.c(1767): error C2143: syntax error : missing ';' before 'type'
1>epanet.c(1767): error C2143: syntax error : missing ')' before 'type'
1>epanet.c(1767): error C2143: syntax error : missing ';' before 'type'
1>epanet.c(1767): error C2065: 'iPoint' : undeclared identifier
1>epanet.c(1767): warning C4552: '<' : operator has no effect; expected operator with side-effect
1>epanet.c(1767): error C2065: 'iPoint' : undeclared identifier
1>epanet.c(1767): error C2059: syntax error : ')'
1>epanet.c(1767): error C2143: syntax error : missing ';' before '{'
1>epanet.c(1768): error C2065: 'iPoint' : undeclared identifier
1>epanet.c(1769): error C2065: 'iPoint' : undeclared identifier
1>epanet.c(1770): error C2065: 'iPoint' : undeclared identifier
1>epanet.c(1771): error C2065: 'iPoint' : undeclared identifier
2013-07-16 15:14:38 +03:00
Sam Hatchett
b09492b7e2 Merge pull request #4 from thisIsMikeKane/patch-1
Update output.c
2013-07-09 07:04:27 -07:00
Mike Kane
43bb601022 Update output.c
Fixed memory leak in saveoutput() where temporary array "x" was allocated but never freed
2013-07-08 21:22:03 -04:00
Sam Hatchett
e0f262629c Create README.md 2013-05-14 17:37:18 -03:00
Sam Hatchett
ac272cfece Merge pull request #3 from yuniersoad/patch-1
Fixing conversion error in ENgetnodevalue EN_TANKDIAM
2013-05-14 12:59:21 -07:00
yuniersoad
e0582a8bff Fixing conversion error in ENgetnodevalue EN_TANKDIAM
The Tank.A(area) is calculated as:
 Tank[j].A = PI*SQR(Tank[j].A/Ucf[ELEV])/4.0; //diameter is stored in Tank[j].A
so the right equation to get the diameter back is  sqrt(4.0/PI*Tank[index-Njuncs].A)*Ucf[ELEV];
2013-05-14 19:38:40 +00:00
Mickey
21de4d7ad9 base sdk changed to 'current os x' 2013-01-21 17:53:48 -05:00
Sam Hatchett
f8e843d584 adding rtx modifications
- get volume curves
- get relative error / n iterations from last solution
- get more tank characteristics
- modify sim duration during active simulation
2013-01-08 12:41:48 -05:00
Sam Hatchett
ad97233410 project settings (mac) 2013-01-08 12:16:45 -05:00
Sam Hatchett
566eb53eb4 added getcurve function 2013-01-08 12:16:34 -05:00
Sam Hatchett
e3615b9244 removed nonessential build files 2013-01-08 11:34:22 -05:00
Sam Hatchett
6efc88963e removed msx mac build files 2013-01-08 11:33:40 -05:00
sam hatchett
d84d759e93 gitignore 2013-01-07 12:32:23 -05:00
Tom Taxon
34d271eb7c Moved EPANET and EPANET_MSX from packages/sim to tpl/epanet.
Also added appropriate svn:ignore settings


git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@428 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2012-01-16 20:46:05 +00:00
Tom Taxon
e37bfd44eb Removed extra text inadvertently added
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@426 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-12-08 19:57:55 +00:00
Tom Taxon
7766a874cb Fixed so that the extern "C" was not just for linux
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@425 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-12-06 19:00:39 +00:00
Tom Taxon
3336c4119c All files in this commit: Added ifdef for Apple compilation - it does not have a malloc.h include file.
epanet.c
reset file variables to NULL so if the code is executed again without termination, the variables will be in a valid initial state.

Added retrieval of EN_STARTTIME to ENgettimeparam.
Added retrieval of EN_TANKVOLUME to ENgetnodevalue
Added retrieval of EN_LINKQUAL to ENgetlinkvalue
Fixed the check for identical filenames so it now allows for an empty (not generated) report file and outfile.
Added ENgetbasedemand and ENgetdemandpattern functions

input2.c
Fixed some compiler warnings


git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@424 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-12-06 18:25:02 +00:00
Tom Taxon
a41cdbd540 Added a call to fflush on the hydraulic file when it is written to because it caused issues with the subsequent use of the hydraulic file related to MSX.
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@423 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-12-06 18:06:01 +00:00
Tom Taxon
eb60c488db Added DLLEXPORT definition to Alloc routines so that MSX could see them
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@422 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-12-06 18:00:57 +00:00
Tom Taxon
242c03f579 Found and fixed an issue that occurred on 32-bit linux. When using 5 minutes for a quality timestep, the timestep computed was 299 seconds, not 300. I traced it to an apparent truncation issue in the hour() function in input3.c. The time string is converted into a double value representing the timestep which is then later converted into seconds and cast to a long. it appears that during the cast, the value is truncated to 299, not 300.
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@421 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-12-06 17:57:57 +00:00
Sam Hatchett
594bda341f final tweaks for Xcode
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@415 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-10-04 20:44:23 +00:00
Hyoungmin Woo
8e3ddb1738 added MSX compilation under MacOSX Xcode
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@389 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-03-24 00:18:52 +00:00
Tom Taxon
85e1e67775 Added License file
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@378 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-01-21 16:27:27 +00:00
Sam Hatchett
80b484df16 roll back to known version. i messed this up unintentionally with a previous commit
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@377 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-01-12 18:24:05 +00:00
Sam Hatchett
3f3b6efb93 fixing epanet repository
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@376 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-01-12 18:10:58 +00:00
Sam Hatchett
0c567015bb attempting to roll back to a working version
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@375 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2011-01-12 18:03:53 +00:00
Sam Hatchett
e0b9ee5feb changed old RTX to "KF-DAL", the Kalman Filter Demand Allocation Library
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@348 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2010-07-28 14:40:30 +00:00
Sam Hatchett
02a8fc4af8 change project root. this is mostly a test of scm.
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@342 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-09-21 23:37:27 +00:00
Sam Hatchett
56816ee88e more intermediates.
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@341 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-09-21 23:29:00 +00:00
Sam Hatchett
1bce67fea6 intermediate files
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@340 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-09-21 23:28:34 +00:00
Sam Hatchett
8f87b8afd2 woops - removing intermediate files?
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@339 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-09-21 23:00:41 +00:00
Sam Hatchett
8dd067b834 adding mac build files.
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@338 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-09-21 22:46:07 +00:00
Sam Hatchett
e4e5e83b1d mac build files directory
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@337 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-09-21 19:44:17 +00:00
James Uber
5efa30508b update vc project file for epanet dll
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@330 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-09-18 08:26:04 +00:00
James Uber
95d57ceae2 After much thought and deliberation... a change in EPANET repo
policy regarding Makefiles and their output targets.  
Used to create library and executable file names that included
the compiler (e.g., *_gcc_*) and the SVN rev (*_309_*).  This
was to allow development along the trunk while keeping clean track
of the SVN versions that objects were made from.  

Maybe a good idea in part, but no longer.  It collapsed under its
own complexity.  The need to keep track of all the specific
file names became more burdensome that the need to keep track
of which source actually built an object.

As of now, Makefiles produce unadorned file names:

Linux:
lib<name>.so
<name>
Cygwin:
cyg<name>.dll
cyg<name>.exe
libcyg<name>.dll.a
MSVC:
<name>.dll
<name>.exe
<name>.lib
MinGW:
Same as MSVC
Darwin:
Don't know about this, but I think they already were produced
with just dy extensions

Under this scheme MinGW looks just like MSVC, but I guess that's 
the whole point...



git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@314 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-08-18 08:17:28 +00:00
James Uber
c9920ba7db Changed EPANET makefiles to use -O3 optimization level.
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@303 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-08-10 06:59:52 +00:00
James Uber
d95a8273ae Modified epanet/base build/MSVC structure to include just sln and vcproj files for
vs2008.



git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@291 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-08-06 03:53:38 +00:00
James Uber
1cd52c85ed Removed existing MSVC epanet solution/project files, making room for new structure
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@288 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2009-08-05 08:50:47 +00:00
James Uber
38acdb8c30 ERD
---
Modified erd/src/erdinternal.c because Cygwin appears to define
fpos_t as a long (it is not a structure, as with Linux)

BASE/MSX/ERD/WDSSIM
-------------------
Cygwin makefiles had been building code using MingW.  This was
confusing, as one might expect such makefiles to produce 
cygwin DLLs and executables and not native windows (i.e. MingW) 
DLLs and executables.  

Also, this was a problem because sometimes one would prefer
to have Cygwin DLLs because one wants to produce Cygwin
executables using them.  Practically, it can be more
convenient to produce Cygwin executables for a Windows
target machine, just because the Cygwin environment is closer
to a complete Unix environment.  In fact the motivation for this
was the need to build WDSSim for a windows target, and this led
to annoying complications with libxml2 libraries and include
files when trying to build everything as native Windows using
MingW.

Now, build/Cygwin makefiles are producing Cygwin DLLs/executables
and NOT native windows DLLs/executables.  The old Cygwin-MingW 
makefiles have been retained, but placed in new MingW build 
subdirectories for those cases when one really wants to use MingW
to build for a native windows target.

FILE NAME CONVENTIONS
---------------------
All this is terribly confusing, and we wish for a plain old 
Linux environment.  With regard to file and library names, 
there is significant potential to confuse things. Accordingly
we have defined the following standard naming convention that
eventually everything in ENGCVS should use.

If one has a library called "mylib", the names of the various 
files should be the following, BY CONVENTION (i.e. they don't 
have to be these names, but if they aren't, then you'll just 
confuse the heck out of the rest of us).

CYGWIN DLL (shared library)
  cygmylib.dll (DLL) (note 'cyg' prefix indicates it is a cygwin object)
  cygmylib.def (DEF)
  libcygmylib.dll.a (import lib) (note '.dll' indicates it is an import library pointing to a DLL)

CYGWIN ARCHIVE
  libcygmylib.a (object archive) (note the absence of '.dll' indicates it is an object archive an not a DLL import lib)

MINGW DLL (shared library)
  mylib.dll (DLL) (note this is a native windows DLL, and the absence of 'cyg' shows that)
  mylib.def (DEF)
  libmylib.dll.a  (gcc import lib)
  mylib.lib (LIB) (msvc import lib, pointing to same DLL - produced using msvc LIB.EXE)

MINGW ARCHIVE
  libmylib.a (object archive)

LINUX SO (shared library)
  libmylib.so (SO - shared object library, Linux analogue to windows DLL)
  (No DEF or import library required)

LINUX ARCHIVE
  libmylib.a (object archive)

Note how these names uniquely specify the target (cygwin, windows, Linux) as well as the
file type (DLL, SO, DEF, import lib, object archive).  Or at least mostly uniquely - note
that the object archive is the same name on Linux and under MinGW.  This shouldn't be
problem since Linux object archives shouldn't ever be present on Windows machines, and
vice-versa.  And if they are (by mistake/accident), the codes won't link or run so there
will be definitive identification of the error.

Finally, for an executable code "mycommand" we have the following
CONVENTION:

mycommand.exe (Windows/MingW or Windows/MSVC)
cygmycommand.exe (Windows/Cygwin)
mycommand (Linux)



git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@221 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2008-12-07 19:32:20 +00:00
James Uber
f658e02f8b Makefile changed to build executable using all *.o instead of using DLL,
because of changes in epanet.c at 2.00.12.
epanet.c changed to comment out definition of DLL, allowing DLL, SOL, or 
CLE to be defined at compilation.


git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@220 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2008-12-07 01:37:51 +00:00
Feng Shang
5abc3875fa A big that exists only in 2.00.12 is fixed. It is at function ENgetnodevalue for EN_SOURCEQUAL. A break statement rather than return should correspond to case.
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@112 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2008-05-07 20:04:14 +00:00
Feng Shang
c38b8d0ac8 Commit the EPANET2.00.12 to trunk, the changes are summarized at \EPANET\BASE\trunk\doc\changes.txt.
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@95 c320cabd-cc23-0410-96d8-e60fbf53ed7f
2008-03-06 20:06:03 +00:00
sam hatchett
48d806d9da remove CRT secure def for full OWA parity 2014-09-18 17:28:57 -04:00
sam hatchett
523d34bd93 parity with OWA root 2.00.12 2014-09-18 17:27:54 -04:00
Michael Tryby
78238083d1 Updating project description 2014-06-27 09:14:11 -04:00
Michael Tryby
6d3e790b58 Suppressing secure string related deprecation warnings 2014-05-20 17:06:53 -04:00
Michael Tryby
0cd38fd697 New features and bug fixes 2014-05-05 18:07:03 -04:00
Michael Tryby
993cfce8a4 Initial commit 2014-05-05 18:00:25 -04:00
Jessica Orquina
1672e9332a Initial commit 2014-03-14 10:18:46 -07:00