OWA-EPANET Toolkit 2.3
Loading...
Searching...
No Matches
Analysis Options Functions

Functions

int DLLEXPORT EN_getoption (EN_Project ph, int option, double *out_value)
 Retrieves the value of an analysis option.
 
int DLLEXPORT EN_setoption (EN_Project ph, int option, double value)
 Sets the value for an analysis option.
 
int DLLEXPORT EN_getflowunits (EN_Project ph, int *out_units)
 Retrieves a project's flow units.
 
int DLLEXPORT EN_setflowunits (EN_Project ph, int units)
 Sets a project's flow units.
 
int DLLEXPORT EN_gettimeparam (EN_Project ph, int param, long *out_value)
 Retrieves the value of a time parameter.
 
int DLLEXPORT EN_settimeparam (EN_Project ph, int param, long value)
 Sets the value of a time parameter.
 
int DLLEXPORT 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.
 
int DLLEXPORT EN_getqualtype (EN_Project ph, int *out_qualType, int *out_traceNode)
 Retrieves the type of water quality analysis to be run.
 
int DLLEXPORT EN_setqualtype (EN_Project ph, int qualType, const char *chemName, const char *chemUnits, const char *traceNode)
 Sets the type of water quality analysis to run.
 

Overview

These functions are used to get and set analysis options.

Function Documentation

◆ EN_getflowunits()

int DLLEXPORT EN_getflowunits ( EN_Project ph,
int * out_units )

Retrieves a project's flow units.

Parameters
phan EPANET project handle.
[out]out_unitsa 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 DLLEXPORT EN_getoption ( EN_Project ph,
int option,
double * out_value )

Retrieves the value of an analysis option.

Parameters
phan EPANET project handle.
optiona type of analysis option (see EN_Option).
[out]out_valuethe current value of the option.
Returns
an error code

◆ EN_getqualinfo()

int DLLEXPORT 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
phan EPANET project handle.
[out]out_qualTypetype of analysis to run (see EN_QualityType).
[out]out_chemNamename of chemical constituent.
[out]out_chemUnitsconcentration units of the constituent.
[out]out_traceNodeindex of the node being traced (if applicable).
Returns
an error code.

◆ EN_getqualtype()

int DLLEXPORT EN_getqualtype ( EN_Project ph,
int * out_qualType,
int * out_traceNode )

Retrieves the type of water quality analysis to be run.

Parameters
phan EPANET project handle.
[out]out_qualTypethe type of analysis to run (see EN_QualityType).
[out]out_traceNodethe index of node being traced if out_qualType = EN_TRACE.
Returns
an error code.

◆ EN_gettimeparam()

int DLLEXPORT EN_gettimeparam ( EN_Project ph,
int param,
long * out_value )

Retrieves the value of a time parameter.

Parameters
phan EPANET project handle.
parama time parameter code (see EN_TimeParameter).
[out]out_valuethe current value of the time parameter (in seconds).
Returns
an error code.

◆ EN_setflowunits()

int DLLEXPORT EN_setflowunits ( EN_Project ph,
int units )

Sets a project's flow units.

Parameters
phan EPANET project handle.
unitsa 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 DLLEXPORT EN_setoption ( EN_Project ph,
int option,
double value )

Sets the value for an analysis option.

Parameters
phan EPANET project handle.
optiona type of analysis option (see EN_Option).
valuethe new value assigned to the option.
Returns
an error code.
See also
EN_Option

◆ EN_setqualtype()

int DLLEXPORT EN_setqualtype ( EN_Project ph,
int qualType,
const char * chemName,
const char * chemUnits,
const char * traceNode )

Sets the type of water quality analysis to run.

Parameters
phan EPANET project handle.
qualTypethe type of analysis to run (see EN_QualityType).
chemNamethe name of the quality constituent.
chemUnitsthe concentration units of the constituent.
traceNodethe 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 DLLEXPORT EN_settimeparam ( EN_Project ph,
int param,
long value )

Sets the value of a time parameter.

Parameters
phan EPANET project handle.
parama time parameter code (see EN_TimeParameter).
valuethe new value of the time parameter (in seconds)
Returns
an error code.