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:
@@ -63,7 +63,8 @@ typedef enum {
|
|||||||
EN_TANKVOLUME = 24, //!< Current computed tank volume (read only)
|
EN_TANKVOLUME = 24, //!< Current computed tank volume (read only)
|
||||||
EN_MAXVOLUME = 25, //!< Tank maximum volume (read only)
|
EN_MAXVOLUME = 25, //!< Tank maximum volume (read only)
|
||||||
EN_CANOVERFLOW = 26, //!< Tank can overflow (= 1) or not (= 0)
|
EN_CANOVERFLOW = 26, //!< Tank can overflow (= 1) or not (= 0)
|
||||||
EN_DEMANDDEFICIT = 27 //!< Amount that full demand is reduced under PDA (read only)
|
EN_DEMANDDEFICIT = 27,//!< Amount that full demand is reduced under PDA (read only)
|
||||||
|
EN_NODE_INCONTROL = 28 //!< Is present in any simple or rule-based control (= 1) or not (= 0)
|
||||||
} EN_NodeProperty;
|
} EN_NodeProperty;
|
||||||
|
|
||||||
/// Link properties
|
/// Link properties
|
||||||
@@ -94,7 +95,8 @@ typedef enum {
|
|||||||
EN_PUMP_HCURVE = 19, //!< Pump head v. flow curve index
|
EN_PUMP_HCURVE = 19, //!< Pump head v. flow curve index
|
||||||
EN_PUMP_ECURVE = 20, //!< Pump efficiency v. flow curve index
|
EN_PUMP_ECURVE = 20, //!< Pump efficiency v. flow curve index
|
||||||
EN_PUMP_ECOST = 21, //!< Pump average energy price
|
EN_PUMP_ECOST = 21, //!< Pump average energy price
|
||||||
EN_PUMP_EPAT = 22 //!< Pump energy price time pattern index
|
EN_PUMP_EPAT = 22, //!< Pump energy price time pattern index
|
||||||
|
EN_LINK_INCONTROL = 23 //!< Is present in any simple or rule-based control (= 1) or not (= 0)
|
||||||
} EN_LinkProperty;
|
} EN_LinkProperty;
|
||||||
|
|
||||||
/// Time parameters
|
/// Time parameters
|
||||||
|
|||||||
@@ -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];
|
(hyd->NodeDemand[index] - hyd->EmitterFlow[index])) * Ucf[FLOW];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EN_NODE_INCONTROL:
|
||||||
|
v = (double)incontrols(p, NODE, index);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 251;
|
return 251;
|
||||||
}
|
}
|
||||||
@@ -3787,6 +3791,10 @@ int DLLEXPORT EN_getlinkvalue(EN_Project p, int index, int property, double *val
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EN_LINK_INCONTROL:
|
||||||
|
v = (double)incontrols(p, LINK, index);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 251;
|
return 251;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user