Fixes to implement issue #161

This commit is contained in:
Lew Rossman
2018-06-19 10:30:02 -04:00
parent d5194ffb81
commit e9303de078
6 changed files with 25 additions and 1394 deletions

View File

@@ -192,12 +192,18 @@ void linkcoeffs(EN_Project *pr)
// Examine each link of network */
for (k = 1; k <= net->Nlinks; k++)
{
if (sol->P[k] == 0.0) continue;
// if (sol->P[k] == 0.0) continue;
link = &net->Link[k];
switch (link->Type) {
case EN_PRV:
case EN_PSV:
case EN_FCV:
if (hyd->LinkSetting[k] != MISSING) continue;
}
n1 = link->N1; // Start node of link
n2 = link->N2; // End node of link
// Update net nodal inflows (X), solution matrix (A) and RHS array (F)
// (Use covention that flow out of node is (-), flow into node is (+))
hyd->X_tmp[n1] -= hyd->LinkFlows[k];