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);
132 double avg_value,
const char* pat1,
const char* pat2,
133 const char* pat3,
const char* pat4);
156 char* constituent_buf,
int constituent_buflen,
158 char* pat1_buf,
int pat1_buflen,
159 char* pat2_buf,
int pat2_buflen,
160 char* pat3_buf,
int pat3_buflen,
161 char* pat4_buf,
int pat4_buflen);
209 int* node_idx,
char* uh_buf,
int buflen,
254 int month,
int response,
255 double r,
double t,
double k,
256 double dmax,
double drecov,
double dinit);
276 char* uh_buf,
int buflen,
277 int* month,
int* response,
278 double* r,
double* t,
double* k,
279 double* dmax,
double* drecov,
double* dinit);
297 const char* gage_name);
311 char* uh_buf,
int uh_buflen,
312 char* gage_buf,
int gage_buflen);
348 char* buf,
int buflen);
392 int month,
int response,
393 double r,
double t,
double k);
408 int month,
int response,
409 double dmax,
double drecov,
double dinit);
421 int month,
int response);
453 const char* gage_name);
478 double k_dep,
double k_0,
double k_T,
479 double T_ref,
double theta_rec,
double T_freeze);
518 double k_dep,
double k_0,
double k_T,
519 double T_ref,
double theta_rec,
double T_freeze);
538 char* uh_buf,
int buflen,
540 double* k_dep,
double* k_0,
double* k_T,
541 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:704
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:381
SWMM_ENGINE_API int swmm_hydrograph_gage_count(SWMM_Engine engine)
Count UH-to-gage assignments.
Definition openswmm_inflows_impl.cpp:354
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:709
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:181
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:596
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:404
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:247
SWMM_ENGINE_API int swmm_rdii_count(SWMM_Engine engine)
Get the total number of RDII entries defined.
Definition openswmm_inflows_impl.cpp:714
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:620
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:274
SWMM_ENGINE_API int swmm_dwf_set_baseline(SWMM_Engine engine, int entry_idx, double avg_value)
Set a DWF entry's average (baseline) value at runtime.
Definition openswmm_inflows_impl.cpp:222
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:236
SWMM_ENGINE_API int swmm_ext_inflow_set_baseline(SWMM_Engine engine, int entry_idx, double baseline)
Set an external inflow entry's constant baseline at runtime.
Definition openswmm_inflows_impl.cpp:105
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:580
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:146
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:338
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:686
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:481
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:115
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:550
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:535
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:213
SWMM_ENGINE_API int swmm_ext_inflow_set_scale(SWMM_Engine engine, int entry_idx, double scale)
Set an external inflow entry's timeseries scale factor at runtime.
Definition openswmm_inflows_impl.cpp:95
SWMM_ENGINE_API int swmm_rdii_decay_count(SWMM_Engine engine)
Count exponential-decay parameter rows.
Definition openswmm_inflows_impl.cpp:429
SWMM_ENGINE_API int swmm_hydrograph_group_count(SWMM_Engine engine)
Count the unique unit-hydrograph group names defined.
Definition openswmm_inflows_impl.cpp:360
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:298
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:366
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:262
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:71
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:654
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:159
SWMM_ENGINE_API int swmm_hydrograph_count(SWMM_Engine engine)
Count parameter entries in the model.
Definition openswmm_inflows_impl.cpp:323
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:328
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:508