16#ifndef OPENSWMM_INFLOWS_H
17#define OPENSWMM_INFLOWS_H
48 const char* ts_name,
const char* type,
49 double m_factor,
double s_factor,
double baseline,
77 char* constituent_buf,
int constituent_buflen,
78 char* ts_buf,
int ts_buflen,
79 char* type_buf,
int type_buflen,
80 double* m_factor,
double* s_factor,
double* baseline,
81 char* pattern_buf,
int pattern_buflen);
117 double avg_value,
const char* pat1,
const char* pat2,
118 const char* pat3,
const char* pat4);
141 char* constituent_buf,
int constituent_buflen,
143 char* pat1_buf,
int pat1_buflen,
144 char* pat2_buf,
int pat2_buflen,
145 char* pat3_buf,
int pat3_buflen,
146 char* pat4_buf,
int pat4_buflen);
186 int* node_idx,
char* uh_buf,
int buflen,
231 int month,
int response,
232 double r,
double t,
double k,
233 double dmax,
double drecov,
double dinit);
253 char* uh_buf,
int buflen,
254 int* month,
int* response,
255 double* r,
double* t,
double* k,
256 double* dmax,
double* drecov,
double* dinit);
274 const char* gage_name);
288 char* uh_buf,
int uh_buflen,
289 char* gage_buf,
int gage_buflen);
325 char* buf,
int buflen);
369 int month,
int response,
370 double r,
double t,
double k);
385 int month,
int response,
386 double dmax,
double drecov,
double dinit);
398 int month,
int response);
430 const char* gage_name);
455 double k_dep,
double k_0,
double k_T,
456 double T_ref,
double theta_rec,
double T_freeze);
495 double k_dep,
double k_0,
double k_T,
496 double T_ref,
double theta_rec,
double T_freeze);
515 char* uh_buf,
int buflen,
517 double* k_dep,
double* k_0,
double* k_T,
518 double* T_ref,
double* theta_rec,
double* T_freeze);
#define SWMM_ENGINE_API
Definition openswmm_2d.h:37
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:35
OpenSWMM Engine — primary transparent C API (master header).
SWMM_ENGINE_API int swmm_ext_inflow_count(SWMM_Engine engine)
Get the total number of external inflows defined.
Definition openswmm_inflows_impl.cpp:657
SWMM_ENGINE_API int swmm_rdii_decay_add(SWMM_Engine engine, const char *uh_name, int response, double k_dep, double k_0, double k_T, double T_ref, double theta_rec, double T_freeze)
Add an exponential-decay parameter row for a (UH, response) pair.
Definition openswmm_inflows_impl.cpp:334
SWMM_ENGINE_API int swmm_hydrograph_gage_count(SWMM_Engine engine)
Count UH-to-gage assignments.
Definition openswmm_inflows_impl.cpp:307
SWMM_ENGINE_API int swmm_dwf_count(SWMM_Engine engine)
Get the total number of dry weather flow entries defined.
Definition openswmm_inflows_impl.cpp:662
SWMM_ENGINE_API int swmm_dwf_get(SWMM_Engine engine, int entry_idx, int *node_idx, char *constituent_buf, int constituent_buflen, double *avg_value, char *pat1_buf, int pat1_buflen, char *pat2_buf, int pat2_buflen, char *pat3_buf, int pat3_buflen, char *pat4_buf, int pat4_buflen)
Read back a dry weather flow entry by index.
Definition openswmm_inflows_impl.cpp:145
SWMM_ENGINE_API int swmm_hydrograph_set_gage(SWMM_Engine engine, const char *uh_name, const char *gage_name)
Set, replace, or clear the rain gage assigned to a UH group.
Definition openswmm_inflows_impl.cpp:549
SWMM_ENGINE_API int swmm_rdii_decay_get(SWMM_Engine engine, int entry_idx, char *uh_buf, int buflen, int *response, double *k_dep, double *k_0, double *k_T, double *T_ref, double *theta_rec, double *T_freeze)
Read back an exponential-decay parameter row by index.
Definition openswmm_inflows_impl.cpp:357
SWMM_ENGINE_API int swmm_rdii_get(SWMM_Engine engine, int entry_idx, int *node_idx, char *uh_buf, int buflen, double *area)
Read back an RDII assignment by entry index.
Definition openswmm_inflows_impl.cpp:200
SWMM_ENGINE_API int swmm_rdii_count(SWMM_Engine engine)
Get the total number of RDII entries defined.
Definition openswmm_inflows_impl.cpp:667
SWMM_ENGINE_API int swmm_hydrograph_group_rename(SWMM_Engine engine, int idx, const char *new_id)
Rename a UH group, propagating the new name to parameter rows, gage assignments, [RDII_DECAY] rows,...
Definition openswmm_inflows_impl.cpp:573
SWMM_ENGINE_API int swmm_hydrograph_add(SWMM_Engine engine, const char *uh_name, int month, int response, double r, double t, double k, double dmax, double drecov, double dinit)
Add a unit hydrograph parameter line.
Definition openswmm_inflows_impl.cpp:227
SWMM_ENGINE_API int swmm_rdii_add(SWMM_Engine engine, int node_idx, const char *uh_name, double area)
Add RDII inflow to a node using a unit hydrograph.
Definition openswmm_inflows_impl.cpp:189
SWMM_ENGINE_API int swmm_hydrograph_clear_group_months(SWMM_Engine engine, const char *uh_name)
Bulk-clear every per-month parameter row for a group, leaving any existing month=-1 (ALL) row intact.
Definition openswmm_inflows_impl.cpp:533
SWMM_ENGINE_API int swmm_ext_inflow_remove(SWMM_Engine engine, int entry_idx)
Remove an external inflow entry by index.
Definition openswmm_inflows_impl.cpp:112
SWMM_ENGINE_API int swmm_hydrograph_get_gage(SWMM_Engine engine, int entry_idx, char *uh_buf, int uh_buflen, char *gage_buf, int gage_buflen)
Read back a UH-to-gage assignment by index.
Definition openswmm_inflows_impl.cpp:291
SWMM_ENGINE_API int swmm_rdii_decay_remove(SWMM_Engine engine, const char *uh_name, int response)
Remove the exponential-decay row for one (group, response) pair.
Definition openswmm_inflows_impl.cpp:639
SWMM_ENGINE_API int swmm_hydrograph_set_rtk(SWMM_Engine engine, const char *uh_name, int month, int response, double r, double t, double k)
Upsert R/T/K parameters for one (group, month, response) row.
Definition openswmm_inflows_impl.cpp:434
SWMM_ENGINE_API int swmm_ext_inflow_get(SWMM_Engine engine, int entry_idx, int *node_idx, char *constituent_buf, int constituent_buflen, char *ts_buf, int ts_buflen, char *type_buf, int type_buflen, double *m_factor, double *s_factor, double *baseline, char *pattern_buf, int pattern_buflen)
Read back an external inflow entry by index.
Definition openswmm_inflows_impl.cpp:81
SWMM_ENGINE_API int swmm_hydrograph_remove_group(SWMM_Engine engine, const char *uh_name)
Remove an entire UH group: parameter rows + gage assignment + [RDII_DECAY] rows + [RDII] node assignm...
Definition openswmm_inflows_impl.cpp:503
SWMM_ENGINE_API int swmm_hydrograph_remove_entry(SWMM_Engine engine, const char *uh_name, int month, int response)
Remove one parameter entry by (group, month, response).
Definition openswmm_inflows_impl.cpp:488
SWMM_ENGINE_API int swmm_dwf_remove(SWMM_Engine engine, int entry_idx)
Remove a DWF entry by index. Subsequent entries shift down.
Definition openswmm_inflows_impl.cpp:177
SWMM_ENGINE_API int swmm_rdii_decay_count(SWMM_Engine engine)
Count exponential-decay parameter rows.
Definition openswmm_inflows_impl.cpp:382
SWMM_ENGINE_API int swmm_hydrograph_group_count(SWMM_Engine engine)
Count the unique unit-hydrograph group names defined.
Definition openswmm_inflows_impl.cpp:313
SWMM_ENGINE_API int swmm_hydrograph_get(SWMM_Engine engine, int entry_idx, char *uh_buf, int buflen, int *month, int *response, double *r, double *t, double *k, double *dmax, double *drecov, double *dinit)
Read back a hydrograph parameter entry by index.
Definition openswmm_inflows_impl.cpp:251
SWMM_ENGINE_API int swmm_hydrograph_group_id(SWMM_Engine engine, int idx, char *buf, int buflen)
Read back the name of a unit-hydrograph group by its zero-based index.
Definition openswmm_inflows_impl.cpp:319
SWMM_ENGINE_API int swmm_rdii_remove(SWMM_Engine engine, int entry_idx)
Remove an RDII entry by index. Subsequent entries shift down.
Definition openswmm_inflows_impl.cpp:215
SWMM_ENGINE_API int swmm_ext_inflow_add(SWMM_Engine engine, int node_idx, const char *constituent, const char *ts_name, const char *type, double m_factor, double s_factor, double baseline, const char *pattern)
Add an external inflow to a node.
Definition openswmm_inflows_impl.cpp:58
SWMM_ENGINE_API int swmm_rdii_decay_set(SWMM_Engine engine, const char *uh_name, int response, double k_dep, double k_0, double k_T, double T_ref, double theta_rec, double T_freeze)
Upsert exponential-decay parameters for one (group, response) row.
Definition openswmm_inflows_impl.cpp:607
SWMM_ENGINE_API int swmm_dwf_add(SWMM_Engine engine, int node_idx, const char *constituent, double avg_value, const char *pat1, const char *pat2, const char *pat3, const char *pat4)
Add a dry weather flow component to a node.
Definition openswmm_inflows_impl.cpp:124
SWMM_ENGINE_API int swmm_hydrograph_count(SWMM_Engine engine)
Count parameter entries in the model.
Definition openswmm_inflows_impl.cpp:276
SWMM_ENGINE_API int swmm_hydrograph_add_gage(SWMM_Engine engine, const char *uh_name, const char *gage_name)
Assign a rain gage to a unit hydrograph group.
Definition openswmm_inflows_impl.cpp:281
SWMM_ENGINE_API int swmm_hydrograph_set_ia(SWMM_Engine engine, const char *uh_name, int month, int response, double dmax, double drecov, double dinit)
Upsert linear-IA parameters for one (group, month, response) row.
Definition openswmm_inflows_impl.cpp:461