Network building enhancements

This commit is contained in:
Lew Rossman
2020-02-04 10:01:23 -05:00
parent 77243b1607
commit 80f9acfe4d
16 changed files with 188 additions and 93 deletions

View File

@@ -7,7 +7,7 @@ Description: implements EPANET's water quality engine
Authors: see AUTHORS
Copyright: see AUTHORS
License: see LICENSE
Last Updated: 05/15/2019
Last Updated: 02/03/2020
******************************************************************************
*/
@@ -63,8 +63,16 @@ int openqual(Project *pr)
// Build nodal adjacency lists if they don't already exist
if (net->Adjlist == NULL)
{
// Check for too few nodes & no fixed grade nodes
if (net->Nnodes < 2) return 223;
if (net->Ntanks == 0) return 224;
// Build adjacency lists
errcode = buildadjlists(net);
if (errcode ) return errcode;
// Check for unconnected nodes
if (errcode = unlinked(pr)) return errcode;
}
// Create a memory pool for water quality segments