Merge pull request #242 from Mariosmsk/pr86
add ENsetdemandpattern. Closes #241
This commit is contained in:
@@ -254,6 +254,7 @@ Public Const EN_G_CURVE = 4 ' General\default curve
|
||||
Declare Function ENsetqualtype Lib "epanet2.dll" (ByVal QualCode As Long, ByVal ChemName As String, ByVal ChemUnits As String, ByVal TraceNode As String) As Long
|
||||
Declare Function ENgetqualinfo Lib "epanet2.dll" (QualCode As Long, ByVal ChemName As String, ByVal ChemUnits As String, TraceNode As Long) As Long
|
||||
Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal nodeIndex As Long, ByVal DemandIndex As Long, ByVal BaseDemand As Single) As Long
|
||||
Declare Function ENsetdemandpattern Lib "epanet2.dll" (ByVal Index As Long, ByVal DemandIndex As Long, ByVal PatIndex As Long) As Long
|
||||
|
||||
Declare Function ENgetcurveindex Lib "epanet2.dll" (ByVal id As String, index As Long) As Long
|
||||
Declare Function ENgetcurveid Lib "epanet2.dll" (ByVal index As Long, ByVal id As String) As Long
|
||||
|
||||
@@ -932,6 +932,15 @@ extern "C" {
|
||||
@see ENgetbasedemand
|
||||
*/
|
||||
int DLLEXPORT ENsetbasedemand(int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE baseDemand);
|
||||
|
||||
/**
|
||||
@brief Sets the index of the demand pattern assigned to a node for a category index.
|
||||
@param nodeIndex The index of a node (first node is index 1).
|
||||
@param demandIndex The index of a category (first category is index 1).
|
||||
@param pattIndex The index of the pattern for this node and category.
|
||||
@return Error code
|
||||
*/
|
||||
int DLLEXPORT ENsetdemandpattern(int nodeIndex, int demandIdx, int patIndex);
|
||||
|
||||
/**
|
||||
@brief Retrieves index of curve with specific ID.
|
||||
@@ -1266,6 +1275,7 @@ extern "C" {
|
||||
|
||||
int DLLEXPORT EN_getqualinfo(EN_ProjectHandle ph, int *qualcode, char *chemname, char *chemunits, int *tracenode);
|
||||
int DLLEXPORT EN_setbasedemand(EN_ProjectHandle ph, int nodeIndex, int demandIdx, EN_API_FLOAT_TYPE baseDemand);
|
||||
int DLLEXPORT EN_setdemandpattern(EN_ProjectHandle ph, int nodeIndex, int demandIdx, int patIndex);
|
||||
int DLLEXPORT EN_getcurveindex(EN_ProjectHandle ph, char *id, int *index);
|
||||
int DLLEXPORT EN_getcurveid(EN_ProjectHandle ph, int index, char *id);
|
||||
int DLLEXPORT EN_getcurvelen(EN_ProjectHandle ph, int index, int *len);
|
||||
|
||||
@@ -197,8 +197,10 @@ Public Const EN_CUSTOM = 2 ' user-defined custom curve
|
||||
Declare Function ENsetcoord Lib "epanet2.dll" (ByVal Index As Int32, ByVal X As Single, ByVal Y As Single) As Int32
|
||||
|
||||
Declare Function ENgetnumdemands Lib "epanet2.dll" (ByVal Index As Int32, ByRef numDemands As Int32) As Int32 'ES
|
||||
Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByRef Value As Single) As Int32 'ES
|
||||
Declare Function ENgetbasedemand Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByRef BaseDemand As Single) As Int32 'ES
|
||||
Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByVal BaseDemand As Single) As Int32 'ES
|
||||
Declare Function ENgetdemandpattern Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByRef PatIndex As Int32) As Int32 'ES
|
||||
Declare Function ENsetdemandpattern Lib "epanet2.dll" (ByVal Index As Int32, ByVal DemandIndex As Int32, ByVal PatIndex As Int32) As Int32 'ES
|
||||
|
||||
Declare Function ENgetlinkindex Lib "epanet2.dll" (ByVal ID As String, ByRef Index As Int32) As Int32
|
||||
Declare Function ENgetlinkid Lib "epanet2.dll" (ByVal Index As Int32, ByVal ID As StringBuilder) As Int32
|
||||
|
||||
Reference in New Issue
Block a user