OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm_statistics.h
Go to the documentation of this file.
1
16#ifndef OPENSWMM_STATISTICS_H
17#define OPENSWMM_STATISTICS_H
18
19#include "openswmm_engine.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25/* =========================================================================
26 * Node Statistics
27 * ========================================================================= */
28
30SWMM_ENGINE_API int swmm_stat_node_max_depth(SWMM_Engine engine, int idx, double* val);
31
33SWMM_ENGINE_API int swmm_stat_node_max_overflow(SWMM_Engine engine, int idx, double* val);
34
36SWMM_ENGINE_API int swmm_stat_node_vol_flooded(SWMM_Engine engine, int idx, double* val);
37
39SWMM_ENGINE_API int swmm_stat_node_time_flooded(SWMM_Engine engine, int idx, double* val);
40
41/* =========================================================================
42 * Link Statistics
43 * ========================================================================= */
44
46SWMM_ENGINE_API int swmm_stat_link_max_flow(SWMM_Engine engine, int idx, double* val);
47
49SWMM_ENGINE_API int swmm_stat_link_max_velocity(SWMM_Engine engine, int idx, double* val);
50
52SWMM_ENGINE_API int swmm_stat_link_max_filling(SWMM_Engine engine, int idx, double* val);
53
55SWMM_ENGINE_API int swmm_stat_link_vol_flow(SWMM_Engine engine, int idx, double* val);
56
58SWMM_ENGINE_API int swmm_stat_link_surcharge_time(SWMM_Engine engine, int idx, double* val);
59
60/* =========================================================================
61 * Subcatchment Statistics
62 * ========================================================================= */
63
65SWMM_ENGINE_API int swmm_stat_subcatch_precip(SWMM_Engine engine, int idx, double* val);
66
68SWMM_ENGINE_API int swmm_stat_subcatch_runoff_vol(SWMM_Engine engine, int idx, double* val);
69
71SWMM_ENGINE_API int swmm_stat_subcatch_max_runoff(SWMM_Engine engine, int idx, double* val);
72
73/* =========================================================================
74 * Bulk Statistics
75 * ========================================================================= */
76
78SWMM_ENGINE_API int swmm_stat_node_max_depth_bulk(SWMM_Engine engine, double* buf, int count);
79
81SWMM_ENGINE_API int swmm_stat_link_max_flow_bulk(SWMM_Engine engine, double* buf, int count);
82
84SWMM_ENGINE_API int swmm_stat_subcatch_runoff_vol_bulk(SWMM_Engine engine, double* buf, int count);
85
86/* -------------------------------------------------------------------------
87 * Phase 3 statistics bulk getters — added in OpenSWMM 6.0.0 to power the
88 * MCP server's flooding / capacity summary tools without a per-node
89 * Python loop. Each is a simple SoA memcpy from the corresponding
90 * scalar accessor's column.
91 * ------------------------------------------------------------------------- */
92
99SWMM_ENGINE_API int swmm_stat_node_max_overflow_bulk(SWMM_Engine engine, double* buf, int count);
100
106SWMM_ENGINE_API int swmm_stat_node_vol_flooded_bulk(SWMM_Engine engine, double* buf, int count);
107
113SWMM_ENGINE_API int swmm_stat_node_time_flooded_bulk(SWMM_Engine engine, double* buf, int count);
114
120SWMM_ENGINE_API int swmm_stat_subcatch_max_runoff_bulk(SWMM_Engine engine, double* buf, int count);
121
122/* -------------------------------------------------------------------------
123 * Phase 4e link-stat bulks — complete the per-link statistics surface so
124 * the MCP server's capacity_summary tool can collapse to a single-pass
125 * shape (same as flooding_summary). Each is a simple SoA memcpy from
126 * the matching scalar accessor's column.
127 * ------------------------------------------------------------------------- */
128
135SWMM_ENGINE_API int swmm_stat_link_max_velocity_bulk(SWMM_Engine engine, double* buf, int count);
136
143SWMM_ENGINE_API int swmm_stat_link_max_filling_bulk(SWMM_Engine engine, double* buf, int count);
144
151SWMM_ENGINE_API int swmm_stat_link_vol_flow_bulk(SWMM_Engine engine, double* buf, int count);
152
159SWMM_ENGINE_API int swmm_stat_link_surcharge_time_bulk(SWMM_Engine engine, double* buf, int count);
160
161#ifdef __cplusplus
162} /* extern "C" */
163#endif
164
165#endif /* OPENSWMM_STATISTICS_H */
#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_stat_link_vol_flow(SWMM_Engine engine, int idx, double *val)
Total volume conveyed through a link (project volume units).
Definition openswmm_statistics_impl.cpp:82
SWMM_ENGINE_API int swmm_stat_link_max_velocity(SWMM_Engine engine, int idx, double *val)
Maximum velocity in a link (project length/time units).
Definition openswmm_statistics_impl.cpp:66
SWMM_ENGINE_API int swmm_stat_link_surcharge_time_bulk(SWMM_Engine engine, double *buf, int count)
Get cumulative surcharge time per link into a caller-supplied buffer.
Definition openswmm_statistics_impl.cpp:248
SWMM_ENGINE_API int swmm_stat_node_time_flooded_bulk(SWMM_Engine engine, double *buf, int count)
Get cumulative time-flooded for all nodes into a caller-supplied buffer.
Definition openswmm_statistics_impl.cpp:190
SWMM_ENGINE_API int swmm_stat_node_max_overflow_bulk(SWMM_Engine engine, double *buf, int count)
Get maximum overflow rate for all nodes into a caller-supplied buffer.
Definition openswmm_statistics_impl.cpp:170
SWMM_ENGINE_API int swmm_stat_node_vol_flooded_bulk(SWMM_Engine engine, double *buf, int count)
Get total flooded volume for all nodes into a caller-supplied buffer.
Definition openswmm_statistics_impl.cpp:180
SWMM_ENGINE_API int swmm_stat_subcatch_precip(SWMM_Engine engine, int idx, double *val)
Total precipitation volume at a subcatchment (project volume units).
Definition openswmm_statistics_impl.cpp:102
SWMM_ENGINE_API int swmm_stat_link_surcharge_time(SWMM_Engine engine, int idx, double *val)
Total surcharge time for a link (hours).
Definition openswmm_statistics_impl.cpp:90
SWMM_ENGINE_API int swmm_stat_link_max_velocity_bulk(SWMM_Engine engine, double *buf, int count)
Get peak velocity for all links into a caller-supplied buffer.
Definition openswmm_statistics_impl.cpp:218
SWMM_ENGINE_API int swmm_stat_node_max_depth_bulk(SWMM_Engine engine, double *buf, int count)
Get maximum depth for all nodes into a caller-supplied buffer.
Definition openswmm_statistics_impl.cpp:130
SWMM_ENGINE_API int swmm_stat_subcatch_max_runoff_bulk(SWMM_Engine engine, double *buf, int count)
Get peak runoff rate for all subcatchments into a caller-supplied buffer.
Definition openswmm_statistics_impl.cpp:200
SWMM_ENGINE_API int swmm_stat_subcatch_runoff_vol_bulk(SWMM_Engine engine, double *buf, int count)
Get total runoff volume for all subcatchments into a caller-supplied buffer.
Definition openswmm_statistics_impl.cpp:150
SWMM_ENGINE_API int swmm_stat_link_max_flow(SWMM_Engine engine, int idx, double *val)
Maximum flow in a link (project flow units).
Definition openswmm_statistics_impl.cpp:58
SWMM_ENGINE_API int swmm_stat_link_max_filling_bulk(SWMM_Engine engine, double *buf, int count)
Get peak depth-to-full-depth ratio for all links into a buffer.
Definition openswmm_statistics_impl.cpp:228
SWMM_ENGINE_API int swmm_stat_link_max_flow_bulk(SWMM_Engine engine, double *buf, int count)
Get maximum flow for all links into a caller-supplied buffer.
Definition openswmm_statistics_impl.cpp:140
SWMM_ENGINE_API int swmm_stat_node_max_overflow(SWMM_Engine engine, int idx, double *val)
Maximum overflow rate at a node (project flow units).
Definition openswmm_statistics_impl.cpp:30
SWMM_ENGINE_API int swmm_stat_node_vol_flooded(SWMM_Engine engine, int idx, double *val)
Total volume flooded at a node (project volume units).
Definition openswmm_statistics_impl.cpp:38
SWMM_ENGINE_API int swmm_stat_subcatch_max_runoff(SWMM_Engine engine, int idx, double *val)
Maximum runoff rate from a subcatchment (project flow units).
Definition openswmm_statistics_impl.cpp:118
SWMM_ENGINE_API int swmm_stat_link_max_filling(SWMM_Engine engine, int idx, double *val)
Maximum depth/full-depth ratio in a link.
Definition openswmm_statistics_impl.cpp:74
SWMM_ENGINE_API int swmm_stat_node_time_flooded(SWMM_Engine engine, int idx, double *val)
Total time flooded at a node (hours).
Definition openswmm_statistics_impl.cpp:46
SWMM_ENGINE_API int swmm_stat_node_max_depth(SWMM_Engine engine, int idx, double *val)
Maximum depth at a node (project length units).
Definition openswmm_statistics_impl.cpp:22
SWMM_ENGINE_API int swmm_stat_link_vol_flow_bulk(SWMM_Engine engine, double *buf, int count)
Get cumulative flow volume per link into a caller-supplied buffer.
Definition openswmm_statistics_impl.cpp:238
SWMM_ENGINE_API int swmm_stat_subcatch_runoff_vol(SWMM_Engine engine, int idx, double *val)
Total runoff volume from a subcatchment (project volume units).
Definition openswmm_statistics_impl.cpp:110