These functions are used to get and set analysis options.
More...
|
int | EN_getoption (EN_Project ph, int option, double *out_value) |
| Retrieves the value of an analysis option. More...
|
|
int | EN_setoption (EN_Project ph, int option, double value) |
| Sets the value for an anlysis option. More...
|
|
int | EN_getflowunits (EN_Project ph, int *out_units) |
| Retrieves a project's flow units. More...
|
|
int | EN_setflowunits (EN_Project ph, int units) |
| Sets a project's flow units. More...
|
|
int | EN_gettimeparam (EN_Project ph, int param, long *out_value) |
| Retrieves the value of a time parameter. More...
|
|
int | EN_settimeparam (EN_Project ph, int param, long value) |
| Sets the value of a time parameter. More...
|
|
int | EN_getqualinfo (EN_Project ph, int *out_qualType, char *out_chemName, char *out_chemUnits, int *out_traceNode) |
| Gets information about the type of water quality analysis requested. More...
|
|
int | EN_getqualtype (EN_Project ph, int *out_qualType, int *out_traceNode) |
| Retrieves the type of water quality analysis to be run. More...
|
|
int | EN_setqualtype (EN_Project ph, int qualType, char *chemName, char *chemUnits, char *traceNode) |
| Sets the type of water quality analysis to run. More...
|
|
These functions are used to get and set analysis options.
◆ EN_getflowunits()
int EN_getflowunits |
( |
EN_Project |
ph, |
|
|
int * |
out_units |
|
) |
| |
Retrieves a project's flow units.
- Parameters
-
| ph | an EPANET project handle. |
[out] | units | a flow units code (see EN_FlowUnits) |
- Returns
- an error code.
Flow units in liters or cubic meters implies that SI metric units are used for all other quantities in addition to flow. Otherwise US Customary units are employed.
◆ EN_getoption()
int EN_getoption |
( |
EN_Project |
ph, |
|
|
int |
option, |
|
|
double * |
out_value |
|
) |
| |
Retrieves the value of an analysis option.
- Parameters
-
| ph | an EPANET project handle. |
| option | a type of analysis option (see EN_Option). |
[out] | value | the current value of the option. |
- Returns
- an error code
◆ EN_getqualinfo()
int EN_getqualinfo |
( |
EN_Project |
ph, |
|
|
int * |
out_qualType, |
|
|
char * |
out_chemName, |
|
|
char * |
out_chemUnits, |
|
|
int * |
out_traceNode |
|
) |
| |
Gets information about the type of water quality analysis requested.
- Parameters
-
| ph | an EPANET project handle. |
[out] | qualType | type of analysis to run (see EN_QualityType). |
[out] | out_chemName | name of chemical constituent. |
[out] | out_chemUnits | concentration units of the constituent. |
[out] | traceNode | index of the node being traced (if applicable). |
- Returns
- an error code.
◆ EN_getqualtype()
int EN_getqualtype |
( |
EN_Project |
ph, |
|
|
int * |
out_qualType, |
|
|
int * |
out_traceNode |
|
) |
| |
Retrieves the type of water quality analysis to be run.
- Parameters
-
| ph | an EPANET project handle. |
[out] | qualType | the type of analysis to run (see EN_QualityType). |
[out] | traceNode | the index of node being traced, if qualType = EN_TRACE. |
- Returns
- an error code.
◆ EN_gettimeparam()
int EN_gettimeparam |
( |
EN_Project |
ph, |
|
|
int |
param, |
|
|
long * |
out_value |
|
) |
| |
Retrieves the value of a time parameter.
- Parameters
-
| ph | an EPANET project handle. |
| param | a time parameter code (see EN_TimeParameter). |
[out] | value | the current value of the time parameter (in seconds). |
- Returns
- an error code.
◆ EN_setflowunits()
Sets a project's flow units.
- Parameters
-
ph | an EPANET project handle. |
units | a flow units code (see EN_FlowUnits) |
- Returns
- an error code.
Flow units in liters or cubic meters implies that SI metric units are used for all other quantities in addition to flow. Otherwise US Customary units are employed.
◆ EN_setoption()
int EN_setoption |
( |
EN_Project |
ph, |
|
|
int |
option, |
|
|
double |
value |
|
) |
| |
Sets the value for an anlysis option.
- Parameters
-
ph | an EPANET project handle. |
option | a type of analysis option (see EN_Option). |
value | the new value assigned to the option. |
- Returns
- an error code.
- See also
- EN_Option
◆ EN_setqualtype()
int EN_setqualtype |
( |
EN_Project |
ph, |
|
|
int |
qualType, |
|
|
char * |
chemName, |
|
|
char * |
chemUnits, |
|
|
char * |
traceNode |
|
) |
| |
Sets the type of water quality analysis to run.
- Parameters
-
ph | an EPANET project handle. |
qualType | the type of analysis to run (see EN_QualityType). |
chemName | the name of the quality constituent. |
chemUnits | the concentration units of the constituent. |
traceNode | the ID name of the node being traced if qualType = EN_TRACE. |
- Returns
- an error code.
Chemical name and units can be an empty string if the analysis is not for a chemical. The same holds for the trace node if the analysis is not for source tracing.
Note that the trace node is specified by ID name and not by index.
◆ EN_settimeparam()
int EN_settimeparam |
( |
EN_Project |
ph, |
|
|
int |
param, |
|
|
long |
value |
|
) |
| |
Sets the value of a time parameter.
- Parameters
-
ph | an EPANET project handle. |
param | a time parameter code (see EN_TimeParameter). |
value | the new value of the time parameter (in seconds) |
- Returns
- an error code.