API access to incontrols() for information about node/link controls participation

allowing access to incontrols() for getting information about whether a node or link participates in a simple or rule-based control.
This commit is contained in:
james uber
2020-05-22 11:45:52 -04:00
parent 6af72fd6d1
commit 949022ed49
2 changed files with 12 additions and 2 deletions

View File

@@ -2254,6 +2254,10 @@ int DLLEXPORT EN_getnodevalue(EN_Project p, int index, int property, double *val
(hyd->NodeDemand[index] - hyd->EmitterFlow[index])) * Ucf[FLOW];
break;
case EN_NODE_INCONTROL:
v = (double)incontrols(p, NODE, index);
break;
default:
return 251;
}
@@ -3787,6 +3791,10 @@ int DLLEXPORT EN_getlinkvalue(EN_Project p, int index, int property, double *val
}
break;
case EN_LINK_INCONTROL:
v = (double)incontrols(p, LINK, index);
break;
default:
return 251;
}