adds an API function to get information about upcoming events
This commit is contained in:
@@ -638,6 +638,16 @@ typedef struct Project *EN_Project;
|
||||
*/
|
||||
int DLLEXPORT EN_getstatistic(EN_Project ph, int type, double* out_value);
|
||||
|
||||
|
||||
/**
|
||||
@brief Get information about upcoming time step events, and what causes them.
|
||||
@param ph an EPANET project handle.
|
||||
@param[out] eventType the type of event that will occur.
|
||||
@param[out] duration the amount of time in the future this event will occur
|
||||
@param[out] elementIndex the index of the element causing the event.
|
||||
**/
|
||||
int DLLEXPORT EN_timeToNextEvent(EN_Project ph, EN_TimestepEvent *eventType, long *duration, int *elementIndex);
|
||||
|
||||
/**
|
||||
@brief Retrieves the order in which a node or link appears in an @ref OutFile "output file".
|
||||
@param ph an EPANET project handle.
|
||||
|
||||
@@ -125,6 +125,18 @@ typedef enum {
|
||||
EN_NEXTEVENTTANK = 15 //!< Index of tank with shortest time to become empty or full (read only)
|
||||
} EN_TimeParameter;
|
||||
|
||||
|
||||
/**
|
||||
These are the types of events that can cause a timestep to end.
|
||||
**/
|
||||
typedef enum {
|
||||
EN_STEP_REPORT = 0,
|
||||
EN_STEP_HYD = 1,
|
||||
EN_STEP_WQ = 2,
|
||||
EN_STEP_TANKEVENT = 3,
|
||||
EN_STEP_CONTROLEVENT = 4
|
||||
} EN_TimestepEvent;
|
||||
|
||||
/// Analysis convergence statistics
|
||||
/**
|
||||
These statistics report the convergence criteria for the most current hydraulic analysis
|
||||
|
||||
Reference in New Issue
Block a user