SWMM-Docs
5.2.0.dev5
Stormwater Management Model
|
Functions | |
int DLLEXPORT | swmm_getCurrentDateTimeStr (char *dtimestr) |
Get the simulation current datetime as a string. More... | |
int DLLEXPORT | swmm_getNodeResult (int index, int type, double *result) |
Get a result value for specified node. More... | |
int DLLEXPORT | swmm_getLinkResult (int index, int type, double *result) |
Get a result value for specified link. More... | |
int DLLEXPORT | swmm_getSubcatchResult (int index, int type, double *result) |
Get a result value for specified subcatchment. More... | |
int DLLEXPORT | swmm_getNodeStats (int index, SM_NodeStats *nodeStats) |
Get a node statistics. More... | |
int DLLEXPORT | swmm_getNodeTotalInflow (int index, double *value) |
Get the cumulative inflow for a node. More... | |
int DLLEXPORT | swmm_getStorageStats (int index, SM_StorageStats *storageStats) |
Get a storage statistics. More... | |
int DLLEXPORT | swmm_getOutfallStats (int index, SM_OutfallStats *outfallStats) |
Get outfall statistics. More... | |
void DLLEXPORT | swmm_freeOutfallStats (SM_OutfallStats *outfallStats) |
Free outfall statistics structure. More... | |
int DLLEXPORT | swmm_getLinkStats (int index, SM_LinkStats *linkStats) |
Get link statistics. More... | |
int DLLEXPORT | swmm_getPumpStats (int index, SM_PumpStats *pumpStats) |
Get pump statistics. More... | |
int DLLEXPORT | swmm_getSystemRoutingStats (SM_RoutingTotals *routingTot) |
Get system routing statistics. More... | |
int DLLEXPORT | swmm_getSystemRunoffStats (SM_RunoffTotals *runoffTot) |
Get system runoff statistics. More... | |
int DLLEXPORT | swmm_setLinkSetting (int index, double setting) |
Set a link setting (pump, orifice, or weir). Setting for an orifice and a weir should be [0, 1]. A setting for a pump can range from [0, inf). However, if a pump is set to 1, it will pump at its maximum curve setting. More... | |
int DLLEXPORT | swmm_setNodeInflow (int index, double flowrate) |
Set an inflow rate to a node. The inflow rate is held constant until the caller changes it. More... | |
int DLLEXPORT | swmm_setOutfallStage (int index, double stage) |
Set outfall stage. More... | |
int swmm_freeOutfallStats | ( | SM_OutfallStats * | outfallStats | ) |
Free outfall statistics structure.
[out] | outfallStats | The outfall Stats struct. This frees any allocated pollutants array. |
Return: API Error Purpose: Frees Outfall Node Stats and Converts Units Note: API user is responsible for calling swmm_freeOutfallStats since this function performs a memory allocation.
Definition at line 1900 of file toolkitAPI.c.
int swmm_getCurrentDateTimeStr | ( | char * | dtimestr | ) |
Get the simulation current datetime as a string.
[out] | dtimestr | The current datetime. dtimestr must be pre-allocated by the caller. This will copy 19 characters. |
Output: DateTime String Return: API Error Purpose: Get the current simulation time
Definition at line 1517 of file toolkitAPI.c.
int swmm_getLinkResult | ( | int | index, |
int | type, | ||
double * | result | ||
) |
Get a result value for specified link.
index | The index of a link | |
type | The property type code (See SM_LinkResult) | |
[out] | result | The result of the link's property |
Input: index = Index of desired ID type = Result Type (SM_LinkResult) Output: result = result data desired (byref) Return: API Error Purpose: Gets Link Simulated Value at Current Time
Definition at line 1597 of file toolkitAPI.c.
int swmm_getLinkStats | ( | int | index, |
SM_LinkStats * | linkStats | ||
) |
Get link statistics.
index | The index of a link | |
[out] | linkStats | The link Stats struct (see SM_LinkStats). pre-allocated by the caller. |
Output: Link Stats Structure (SM_LinkStats) Return: API Error Purpose: Gets Link Stats and Converts Units
Definition at line 1912 of file toolkitAPI.c.
int swmm_getNodeResult | ( | int | index, |
int | type, | ||
double * | result | ||
) |
Get a result value for specified node.
index | The index of a node | |
type | The property type code (See SM_NodeResult) | |
[out] | result | The result of the node's property |
Input: index = Index of desired ID type = Result Type (SM_NodeResult) Output: result = result data desired (byref) Return: API Error Purpose: Gets Node Simulated Value at Current Time
Definition at line 1549 of file toolkitAPI.c.
int swmm_getNodeStats | ( | int | index, |
SM_NodeStats * | nodeStats | ||
) |
Get a node statistics.
index | The index of a node | |
[out] | nodeStats | The Node Stats struct (see SM_NodeStats). pre-allocated by the caller. |
Output: Node Stats Structure (SM_NodeStats) Return: API Error Purpose: Gets Node Stats and Converts Units
Definition at line 1780 of file toolkitAPI.c.
int swmm_getNodeTotalInflow | ( | int | index, |
double * | value | ||
) |
Get the cumulative inflow for a node.
index | The index of a node | |
[out] | value | The total inflow. |
Input: Node Index Output: Node Total inflow Volume. Return: API Error Purpose: Get Node Total Inflow Volume.
Definition at line 1816 of file toolkitAPI.c.
int swmm_getOutfallStats | ( | int | index, |
SM_OutfallStats * | outfallStats | ||
) |
Get outfall statistics.
index | The index of a outfall node | |
[out] | outfallStats | The outfall Stats struct (see SM_OutfallStats). pre-allocated by the caller. Caller is also responsible for freeing the SM_OutfallStats structure using swmm_freeOutfallStats(). This frees any pollutants array. |
Output: Outfall Stats Structure (SM_OutfallStats) Return: API Error Purpose: Gets Outfall Node Stats and Converts Units Note: Caller is responsible for calling swmm_freeOutfallStats to free the pollutants array.
Definition at line 1861 of file toolkitAPI.c.
int swmm_getPumpStats | ( | int | index, |
SM_PumpStats * | pumpStats | ||
) |
Get pump statistics.
index | The index of a pump | |
[out] | pumpStats | The link Stats struct (see SM_PumpStats). pre-allocated by the caller. |
Output: Pump Link Stats Structure (SM_PumpStats) Return: API Error Purpose: Gets Pump Link Stats and Converts Units
Definition at line 1950 of file toolkitAPI.c.
int swmm_getStorageStats | ( | int | index, |
SM_StorageStats * | storageStats | ||
) |
Get a storage statistics.
index | The index of a storage node | |
[out] | storageStats | The storage Stats struct (see SM_StorageStats). pre-allocated by the caller. |
Output: Storage Node Stats Structure (SM_StorageStats) Return: API Error Purpose: Gets Storage Node Stats and Converts Units
Definition at line 1834 of file toolkitAPI.c.
int swmm_getSubcatchResult | ( | int | index, |
int | type, | ||
double * | result | ||
) |
Get a result value for specified subcatchment.
index | The index of a subcatchment | |
type | The property type code (See SM_SubcResult) | |
[out] | result | The result of the subcatchment's property |
Input: index = Index of desired ID type = Result Type (SM_SubcResult) Output: result = result data desired (byref) Return: API Error Purpose: Gets Subcatchment Simulated Value at Current Time
Definition at line 1644 of file toolkitAPI.c.
int swmm_getSystemRoutingStats | ( | SM_RoutingTotals * | routingTot | ) |
Get system routing statistics.
[out] | routingTot | The system Routing Stats struct (see SM_RoutingTotals). pre-allocated by the caller. |
Output: System Routing Totals Structure (SM_RoutingTotals) Return: API Error Purpose: Gets System Flow Routing Totals and Converts Units
Definition at line 2034 of file toolkitAPI.c.
int swmm_getSystemRunoffStats | ( | SM_RunoffTotals * | runoffTot | ) |
Get system runoff statistics.
[out] | runoffTot | The system Runoff Stats struct (see SM_RunoffTotals). pre-allocated by the caller. |
Output: System Runoff Totals Structure (SM_RunoffTotals) Return: API Error Purpose: Gets System Runoff Totals and Converts Units
Definition at line 2069 of file toolkitAPI.c.
int swmm_setLinkSetting | ( | int | index, |
double | setting | ||
) |
Set a link setting (pump, orifice, or weir). Setting for an orifice and a weir should be [0, 1]. A setting for a pump can range from [0, inf). However, if a pump is set to 1, it will pump at its maximum curve setting.
index | The link index. |
setting | The new setting for the link. |
Input: index = Index of desired ID value = New Target Setting Output: returns API Error Purpose: Sets Link open fraction (Weir, Orifice, Pump, and Outlet)
Definition at line 2312 of file toolkitAPI.c.
int swmm_setNodeInflow | ( | int | index, |
double | flowrate | ||
) |
Set an inflow rate to a node. The inflow rate is held constant until the caller changes it.
index | The node index. |
flowrate | The new node inflow rate. |
Input: index = Index of desired ID value = New Inflow Rate Output: returns API Error Purpose: Sets new node inflow rate and holds until set again
Definition at line 2355 of file toolkitAPI.c.
int swmm_setOutfallStage | ( | int | index, |
double | stage | ||
) |
Set outfall stage.
index | The outfall node index. |
stage | The outfall node stage (head). |
Input: index = Index of desired outfall stage = New outfall stage (head) Output: returns API Error Purpose: Sets new outfall stage and holds until set again.
Definition at line 2416 of file toolkitAPI.c.