@swmmrs/swmmrs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +264 -0
- package/dist/README.md +264 -0
- package/dist/serial/README.md +264 -0
- package/dist/serial/swmmrs.d.ts +395 -0
- package/dist/serial/swmmrs.js +3169 -0
- package/dist/serial/swmmrs_bg.wasm +0 -0
- package/dist/snippets/swmmrs-parallel-5d1c71108133e81d/worker-pool/browser.js +98 -0
- package/dist/swmmrs.d.ts +422 -0
- package/dist/swmmrs.js +3330 -0
- package/dist/swmmrs_bg.wasm +0 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/lib/swmmrs/client.d.ts +11 -0
- package/lib/swmmrs/client.d.ts.map +1 -0
- package/lib/swmmrs/client.js +82 -0
- package/lib/swmmrs/client.js.map +1 -0
- package/lib/swmmrs/enums.d.ts +41 -0
- package/lib/swmmrs/enums.d.ts.map +1 -0
- package/lib/swmmrs/enums.js +2 -0
- package/lib/swmmrs/enums.js.map +1 -0
- package/lib/swmmrs/exceptions.d.ts +98 -0
- package/lib/swmmrs/exceptions.d.ts.map +1 -0
- package/lib/swmmrs/exceptions.js +86 -0
- package/lib/swmmrs/exceptions.js.map +1 -0
- package/lib/swmmrs/index.d.ts +27 -0
- package/lib/swmmrs/index.d.ts.map +1 -0
- package/lib/swmmrs/index.js +13 -0
- package/lib/swmmrs/index.js.map +1 -0
- package/lib/swmmrs/objects/amm.d.ts +114 -0
- package/lib/swmmrs/objects/amm.d.ts.map +1 -0
- package/lib/swmmrs/objects/amm.js +19 -0
- package/lib/swmmrs/objects/amm.js.map +1 -0
- package/lib/swmmrs/objects/collections.d.ts +109 -0
- package/lib/swmmrs/objects/collections.d.ts.map +1 -0
- package/lib/swmmrs/objects/collections.js +158 -0
- package/lib/swmmrs/objects/collections.js.map +1 -0
- package/lib/swmmrs/objects/definitions.d.ts +215 -0
- package/lib/swmmrs/objects/definitions.d.ts.map +1 -0
- package/lib/swmmrs/objects/definitions.js +69 -0
- package/lib/swmmrs/objects/definitions.js.map +1 -0
- package/lib/swmmrs/objects/lids.d.ts +446 -0
- package/lib/swmmrs/objects/lids.d.ts.map +1 -0
- package/lib/swmmrs/objects/lids.js +90 -0
- package/lib/swmmrs/objects/lids.js.map +1 -0
- package/lib/swmmrs/objects/links.d.ts +615 -0
- package/lib/swmmrs/objects/links.d.ts.map +1 -0
- package/lib/swmmrs/objects/links.js +90 -0
- package/lib/swmmrs/objects/links.js.map +1 -0
- package/lib/swmmrs/objects/nodes.d.ts +494 -0
- package/lib/swmmrs/objects/nodes.d.ts.map +1 -0
- package/lib/swmmrs/objects/nodes.js +147 -0
- package/lib/swmmrs/objects/nodes.js.map +1 -0
- package/lib/swmmrs/objects/options.d.ts +112 -0
- package/lib/swmmrs/objects/options.d.ts.map +1 -0
- package/lib/swmmrs/objects/options.js +27 -0
- package/lib/swmmrs/objects/options.js.map +1 -0
- package/lib/swmmrs/objects/rtk.d.ts +82 -0
- package/lib/swmmrs/objects/rtk.d.ts.map +1 -0
- package/lib/swmmrs/objects/rtk.js +19 -0
- package/lib/swmmrs/objects/rtk.js.map +1 -0
- package/lib/swmmrs/objects/subcatchments.d.ts +575 -0
- package/lib/swmmrs/objects/subcatchments.d.ts.map +1 -0
- package/lib/swmmrs/objects/subcatchments.js +243 -0
- package/lib/swmmrs/objects/subcatchments.js.map +1 -0
- package/lib/swmmrs/output.d.ts +412 -0
- package/lib/swmmrs/output.d.ts.map +1 -0
- package/lib/swmmrs/output.js +507 -0
- package/lib/swmmrs/output.js.map +1 -0
- package/lib/swmmrs/protocol.d.ts +80 -0
- package/lib/swmmrs/protocol.d.ts.map +1 -0
- package/lib/swmmrs/protocol.js +2 -0
- package/lib/swmmrs/protocol.js.map +1 -0
- package/lib/swmmrs/runtime.d.ts +22 -0
- package/lib/swmmrs/runtime.d.ts.map +1 -0
- package/lib/swmmrs/runtime.js +146 -0
- package/lib/swmmrs/runtime.js.map +1 -0
- package/lib/swmmrs/scenarios.d.ts +41 -0
- package/lib/swmmrs/scenarios.d.ts.map +1 -0
- package/lib/swmmrs/scenarios.js +2 -0
- package/lib/swmmrs/scenarios.js.map +1 -0
- package/lib/swmmrs/simulation.d.ts +249 -0
- package/lib/swmmrs/simulation.d.ts.map +1 -0
- package/lib/swmmrs/simulation.js +415 -0
- package/lib/swmmrs/simulation.js.map +1 -0
- package/lib/swmmrs/snapshots.d.ts +192 -0
- package/lib/swmmrs/snapshots.d.ts.map +1 -0
- package/lib/swmmrs/snapshots.js +2 -0
- package/lib/swmmrs/snapshots.js.map +1 -0
- package/lib/swmmrs/types.d.ts +123 -0
- package/lib/swmmrs/types.d.ts.map +1 -0
- package/lib/swmmrs/types.js +2 -0
- package/lib/swmmrs/types.js.map +1 -0
- package/lib/swmmrs/worker.d.ts +2 -0
- package/lib/swmmrs/worker.d.ts.map +1 -0
- package/lib/swmmrs/worker.js +488 -0
- package/lib/swmmrs/worker.js.map +1 -0
- package/package.json +33 -0
- package/src/swmmrs/client.ts +76 -0
- package/src/swmmrs/enums.ts +73 -0
- package/src/swmmrs/exceptions.ts +120 -0
- package/src/swmmrs/index.ts +79 -0
- package/src/swmmrs/objects/amm.ts +113 -0
- package/src/swmmrs/objects/collections.ts +153 -0
- package/src/swmmrs/objects/definitions.ts +246 -0
- package/src/swmmrs/objects/lids.ts +487 -0
- package/src/swmmrs/objects/links.ts +626 -0
- package/src/swmmrs/objects/nodes.ts +504 -0
- package/src/swmmrs/objects/options.ts +114 -0
- package/src/swmmrs/objects/rtk.ts +79 -0
- package/src/swmmrs/objects/subcatchments.ts +650 -0
- package/src/swmmrs/output.ts +798 -0
- package/src/swmmrs/protocol.ts +62 -0
- package/src/swmmrs/runtime.ts +188 -0
- package/src/swmmrs/scenarios.ts +40 -0
- package/src/swmmrs/simulation.ts +406 -0
- package/src/swmmrs/snapshots.ts +199 -0
- package/src/swmmrs/types.ts +123 -0
- package/src/swmmrs/worker.ts +233 -0
- package/worker-node.js +142 -0
- package/worker.js +1 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
/** Canonical relationship identity returned by LID configuration reads. */
|
|
2
|
+
export type LidRelationshipKind = "lid" | "node" | "subcatchment" | "curve";
|
|
3
|
+
/** Detached canonical relationship identity. */
|
|
4
|
+
export interface LidRelationship<K extends LidRelationshipKind = LidRelationshipKind> {
|
|
5
|
+
/** Target object family. */
|
|
6
|
+
readonly kind: K;
|
|
7
|
+
/** Canonical configured target ID. */
|
|
8
|
+
readonly id: string;
|
|
9
|
+
}
|
|
10
|
+
/** Reference to a configured LID control. */
|
|
11
|
+
export type LidControlRelationship = LidRelationship<"lid">;
|
|
12
|
+
/** Explicit LID drain destination. */
|
|
13
|
+
export type LidDrainDestination = LidRelationship<"node" | "subcatchment">;
|
|
14
|
+
/** Reference to a configured drain-control curve. */
|
|
15
|
+
export type LidCurveRelationship = LidRelationship<"curve">;
|
|
16
|
+
/** Detached declarations for one subcatchment-local LID usage. */
|
|
17
|
+
export interface LidUnitConfiguration {
|
|
18
|
+
/** Area per replicate in ft² or m², not acres or hectares. */
|
|
19
|
+
readonly area: number;
|
|
20
|
+
/** Full surface width in ft or m. */
|
|
21
|
+
readonly fullWidth: number;
|
|
22
|
+
/** Read-only prepared bottom width in ft or m. */
|
|
23
|
+
readonly bottomWidth: number;
|
|
24
|
+
/** Initial saturation percentage, 0–100. */
|
|
25
|
+
readonly initialSaturation: number;
|
|
26
|
+
/** Percentage of impervious runoff treated, 0–100. */
|
|
27
|
+
readonly imperviousRunoffTreated: number;
|
|
28
|
+
/** Percentage of pervious runoff treated, 0–100. */
|
|
29
|
+
readonly perviousRunoffTreated: number;
|
|
30
|
+
/** Configured LID-control identity. */
|
|
31
|
+
readonly control: LidControlRelationship;
|
|
32
|
+
/** Number of replicate units. */
|
|
33
|
+
readonly count: number;
|
|
34
|
+
/** Whether surface outflow is routed to the subcatchment's pervious area. */
|
|
35
|
+
readonly routesToPervious: boolean;
|
|
36
|
+
/** Explicit drain destination, or null for implicit outlet routing. */
|
|
37
|
+
readonly drainDestination: LidDrainDestination | null;
|
|
38
|
+
}
|
|
39
|
+
/** Surface-layer declarations and prepared read-only values. */
|
|
40
|
+
export interface LidSurfaceConfiguration {
|
|
41
|
+
/** Storage depth in in or mm. */
|
|
42
|
+
readonly thickness: number;
|
|
43
|
+
/** Vegetation volume fraction. */
|
|
44
|
+
readonly vegetationVolumeFraction: number;
|
|
45
|
+
/** Manning roughness coefficient. */
|
|
46
|
+
readonly roughness: number;
|
|
47
|
+
/** Surface slope in percent. */
|
|
48
|
+
readonly slope: number;
|
|
49
|
+
/** Side slope as a horizontal-to-vertical ratio. */
|
|
50
|
+
readonly sideSlope: number;
|
|
51
|
+
/** Derived surface runoff coefficient in project units. */
|
|
52
|
+
readonly alpha: number;
|
|
53
|
+
/** Whether ponded surface water overflows without delay. */
|
|
54
|
+
readonly immediateOverflow: boolean;
|
|
55
|
+
}
|
|
56
|
+
/** Soil-layer declarations. */
|
|
57
|
+
export interface LidSoilConfiguration {
|
|
58
|
+
/** Layer thickness in in or mm. */
|
|
59
|
+
readonly thickness: number;
|
|
60
|
+
/** Soil porosity fraction. */
|
|
61
|
+
readonly porosity: number;
|
|
62
|
+
/** Field-capacity moisture fraction. */
|
|
63
|
+
readonly fieldCapacity: number;
|
|
64
|
+
/** Wilting-point moisture fraction. */
|
|
65
|
+
readonly wiltingPoint: number;
|
|
66
|
+
/** Saturated conductivity in in/h or mm/h. */
|
|
67
|
+
readonly saturatedConductivity: number;
|
|
68
|
+
/** Conductivity-response slope. */
|
|
69
|
+
readonly conductivitySlope: number;
|
|
70
|
+
/** Capillary suction head in in or mm. */
|
|
71
|
+
readonly suctionHead: number;
|
|
72
|
+
}
|
|
73
|
+
/** Storage-layer declarations. */
|
|
74
|
+
export interface LidStorageConfiguration {
|
|
75
|
+
/** Layer thickness in in or mm. */
|
|
76
|
+
readonly thickness: number;
|
|
77
|
+
/** Void-to-solid volume ratio, not porosity. */
|
|
78
|
+
readonly voidRatio: number;
|
|
79
|
+
/** Saturated conductivity in in/h or mm/h. */
|
|
80
|
+
readonly saturatedConductivity: number;
|
|
81
|
+
/** Number of treated void volumes before clogging; zero disables clogging. */
|
|
82
|
+
readonly cloggingFactor: number;
|
|
83
|
+
}
|
|
84
|
+
/** Pavement-layer declarations. */
|
|
85
|
+
export interface LidPavementConfiguration {
|
|
86
|
+
/** Layer thickness in in or mm. */
|
|
87
|
+
readonly thickness: number;
|
|
88
|
+
/** Void-to-solid volume ratio, not porosity. */
|
|
89
|
+
readonly voidRatio: number;
|
|
90
|
+
/** Impervious pavement fraction. */
|
|
91
|
+
readonly imperviousFraction: number;
|
|
92
|
+
/** Saturated conductivity in in/h or mm/h. */
|
|
93
|
+
readonly saturatedConductivity: number;
|
|
94
|
+
/** Number of treated void volumes before clogging; zero disables clogging. */
|
|
95
|
+
readonly cloggingFactor: number;
|
|
96
|
+
/** Time between pavement regeneration events in seconds. */
|
|
97
|
+
readonly regenerationIntervalSeconds: number;
|
|
98
|
+
/** Fraction of permeability restored by regeneration. */
|
|
99
|
+
readonly regenerationFraction: number;
|
|
100
|
+
}
|
|
101
|
+
/** Underdrain declarations; the control-curve relationship is read-only here. */
|
|
102
|
+
export interface LidDrainConfiguration {
|
|
103
|
+
/** Drain equation coefficient in project units. */
|
|
104
|
+
readonly coefficient: number;
|
|
105
|
+
/** Drain equation head exponent. */
|
|
106
|
+
readonly exponent: number;
|
|
107
|
+
/** Drain offset above storage bottom in in or mm. */
|
|
108
|
+
readonly offset: number;
|
|
109
|
+
/** Dry-weather delay before draining in seconds. */
|
|
110
|
+
readonly delaySeconds: number;
|
|
111
|
+
/** Head at which the drain opens, in in or mm. */
|
|
112
|
+
readonly openHead: number;
|
|
113
|
+
/** Head at which the drain closes, in in or mm. */
|
|
114
|
+
readonly closeHead: number;
|
|
115
|
+
/** Configured control-curve identity, or null. */
|
|
116
|
+
readonly controlCurve: LidCurveRelationship | null;
|
|
117
|
+
}
|
|
118
|
+
/** Drainage-mat declarations and prepared runoff coefficient. */
|
|
119
|
+
export interface LidDrainageMatConfiguration {
|
|
120
|
+
/** Layer thickness in in or mm. */
|
|
121
|
+
readonly thickness: number;
|
|
122
|
+
/** Mat void-volume fraction. */
|
|
123
|
+
readonly voidFraction: number;
|
|
124
|
+
/** Manning roughness coefficient. */
|
|
125
|
+
readonly roughness: number;
|
|
126
|
+
/** Derived drainage-mat runoff coefficient in project units. */
|
|
127
|
+
readonly alpha: number;
|
|
128
|
+
}
|
|
129
|
+
/** Configured optional layers for one LID control; absent layers are `null`. */
|
|
130
|
+
export interface LidControlConfiguration {
|
|
131
|
+
/** Surface layer, or null when absent. */
|
|
132
|
+
readonly surface: LidSurfaceConfiguration | null;
|
|
133
|
+
/** Soil layer, or null when absent. */
|
|
134
|
+
readonly soil: LidSoilConfiguration | null;
|
|
135
|
+
/** Storage layer, or null when absent. */
|
|
136
|
+
readonly storage: LidStorageConfiguration | null;
|
|
137
|
+
/** Pavement layer, or null when absent. */
|
|
138
|
+
readonly pavement: LidPavementConfiguration | null;
|
|
139
|
+
/** Underdrain layer, or null when absent. */
|
|
140
|
+
readonly drain: LidDrainConfiguration | null;
|
|
141
|
+
/** Drainage mat, or null when absent. */
|
|
142
|
+
readonly drainageMat: LidDrainageMatConfiguration | null;
|
|
143
|
+
}
|
|
144
|
+
/** Sparse surface-layer update; derived fields are not writable. */
|
|
145
|
+
export interface LidSurfacePatch {
|
|
146
|
+
/** {@inheritDoc LidSurfaceConfiguration.thickness} */
|
|
147
|
+
thickness?: number;
|
|
148
|
+
/** {@inheritDoc LidSurfaceConfiguration.vegetationVolumeFraction} */
|
|
149
|
+
vegetationVolumeFraction?: number;
|
|
150
|
+
/** {@inheritDoc LidSurfaceConfiguration.roughness} */
|
|
151
|
+
roughness?: number;
|
|
152
|
+
/** {@inheritDoc LidSurfaceConfiguration.slope} */
|
|
153
|
+
slope?: number;
|
|
154
|
+
/** {@inheritDoc LidSurfaceConfiguration.sideSlope} */
|
|
155
|
+
sideSlope?: number;
|
|
156
|
+
}
|
|
157
|
+
/** Sparse soil-layer update. */
|
|
158
|
+
export interface LidSoilPatch {
|
|
159
|
+
/** {@inheritDoc LidSoilConfiguration.thickness} */
|
|
160
|
+
thickness?: number;
|
|
161
|
+
/** {@inheritDoc LidSoilConfiguration.porosity} */
|
|
162
|
+
porosity?: number;
|
|
163
|
+
/** {@inheritDoc LidSoilConfiguration.fieldCapacity} */
|
|
164
|
+
fieldCapacity?: number;
|
|
165
|
+
/** {@inheritDoc LidSoilConfiguration.wiltingPoint} */
|
|
166
|
+
wiltingPoint?: number;
|
|
167
|
+
/** {@inheritDoc LidSoilConfiguration.saturatedConductivity} */
|
|
168
|
+
saturatedConductivity?: number;
|
|
169
|
+
/** {@inheritDoc LidSoilConfiguration.conductivitySlope} */
|
|
170
|
+
conductivitySlope?: number;
|
|
171
|
+
/** {@inheritDoc LidSoilConfiguration.suctionHead} */
|
|
172
|
+
suctionHead?: number;
|
|
173
|
+
}
|
|
174
|
+
/** Sparse storage-layer update. */
|
|
175
|
+
export interface LidStoragePatch {
|
|
176
|
+
/** {@inheritDoc LidStorageConfiguration.thickness} */
|
|
177
|
+
thickness?: number;
|
|
178
|
+
/** {@inheritDoc LidStorageConfiguration.voidRatio} */
|
|
179
|
+
voidRatio?: number;
|
|
180
|
+
/** {@inheritDoc LidStorageConfiguration.saturatedConductivity} */
|
|
181
|
+
saturatedConductivity?: number;
|
|
182
|
+
/** {@inheritDoc LidStorageConfiguration.cloggingFactor} */
|
|
183
|
+
cloggingFactor?: number;
|
|
184
|
+
}
|
|
185
|
+
/** Sparse pavement-layer update. */
|
|
186
|
+
export interface LidPavementPatch {
|
|
187
|
+
/** {@inheritDoc LidPavementConfiguration.thickness} */
|
|
188
|
+
thickness?: number;
|
|
189
|
+
/** {@inheritDoc LidPavementConfiguration.voidRatio} */
|
|
190
|
+
voidRatio?: number;
|
|
191
|
+
/** {@inheritDoc LidPavementConfiguration.imperviousFraction} */
|
|
192
|
+
imperviousFraction?: number;
|
|
193
|
+
/** {@inheritDoc LidPavementConfiguration.saturatedConductivity} */
|
|
194
|
+
saturatedConductivity?: number;
|
|
195
|
+
/** {@inheritDoc LidPavementConfiguration.cloggingFactor} */
|
|
196
|
+
cloggingFactor?: number;
|
|
197
|
+
/** {@inheritDoc LidPavementConfiguration.regenerationIntervalSeconds} */
|
|
198
|
+
regenerationIntervalSeconds?: number;
|
|
199
|
+
/** {@inheritDoc LidPavementConfiguration.regenerationFraction} */
|
|
200
|
+
regenerationFraction?: number;
|
|
201
|
+
}
|
|
202
|
+
/** Sparse underdrain update; does not replace the control curve. */
|
|
203
|
+
export interface LidDrainPatch {
|
|
204
|
+
/** {@inheritDoc LidDrainConfiguration.coefficient} */
|
|
205
|
+
coefficient?: number;
|
|
206
|
+
/** {@inheritDoc LidDrainConfiguration.exponent} */
|
|
207
|
+
exponent?: number;
|
|
208
|
+
/** {@inheritDoc LidDrainConfiguration.offset} */
|
|
209
|
+
offset?: number;
|
|
210
|
+
/** {@inheritDoc LidDrainConfiguration.delaySeconds} */
|
|
211
|
+
delaySeconds?: number;
|
|
212
|
+
/** {@inheritDoc LidDrainConfiguration.openHead} */
|
|
213
|
+
openHead?: number;
|
|
214
|
+
/** {@inheritDoc LidDrainConfiguration.closeHead} */
|
|
215
|
+
closeHead?: number;
|
|
216
|
+
}
|
|
217
|
+
/** Sparse drainage-mat update; the derived coefficient is not writable. */
|
|
218
|
+
export interface LidDrainageMatPatch {
|
|
219
|
+
/** {@inheritDoc LidDrainageMatConfiguration.thickness} */
|
|
220
|
+
thickness?: number;
|
|
221
|
+
/** {@inheritDoc LidDrainageMatConfiguration.voidFraction} */
|
|
222
|
+
voidFraction?: number;
|
|
223
|
+
/** {@inheritDoc LidDrainageMatConfiguration.roughness} */
|
|
224
|
+
roughness?: number;
|
|
225
|
+
}
|
|
226
|
+
/** Layer selector accepted by `LidControl.configure`. */
|
|
227
|
+
export type LidLayerName = "surface" | "soil" | "storage" | "pavement" | "drain" | "drainage_mat";
|
|
228
|
+
/** Sparse patch for the selected LID layer; omission retains each field. */
|
|
229
|
+
export type LidLayerPatch = LidSurfacePatch | LidSoilPatch | LidStoragePatch | LidPavementPatch | LidDrainPatch | LidDrainageMatPatch;
|
|
230
|
+
/** Sparse usage update; omitted fields retain their declarations. */
|
|
231
|
+
export interface LidUnitPatch {
|
|
232
|
+
/** {@inheritDoc LidUnitConfiguration.area} */
|
|
233
|
+
area?: number;
|
|
234
|
+
/** {@inheritDoc LidUnitConfiguration.fullWidth} */
|
|
235
|
+
fullWidth?: number;
|
|
236
|
+
/** {@inheritDoc LidUnitConfiguration.initialSaturation} */
|
|
237
|
+
initialSaturation?: number;
|
|
238
|
+
/** {@inheritDoc LidUnitConfiguration.imperviousRunoffTreated} */
|
|
239
|
+
imperviousRunoffTreated?: number;
|
|
240
|
+
/** {@inheritDoc LidUnitConfiguration.perviousRunoffTreated} */
|
|
241
|
+
perviousRunoffTreated?: number;
|
|
242
|
+
/** Canonical configured LID-control ID. */
|
|
243
|
+
control?: string;
|
|
244
|
+
/** {@inheritDoc LidUnitConfiguration.count} */
|
|
245
|
+
count?: number;
|
|
246
|
+
/** {@inheritDoc LidUnitConfiguration.routesToPervious} */
|
|
247
|
+
routesToPervious?: boolean;
|
|
248
|
+
/** Explicit destination, or `null` to restore implicit outlet routing. */
|
|
249
|
+
drainDestination?: LidDrainDestination | null;
|
|
250
|
+
}
|
|
251
|
+
/** Detached LID water balance and layer state. Water-balance totals are equivalent depths, not volumes. */
|
|
252
|
+
export interface LidUnitSnapshot {
|
|
253
|
+
/** Cumulative inflow depth in in or mm. */
|
|
254
|
+
readonly inflow: number;
|
|
255
|
+
/** Cumulative evaporation depth in in or mm. */
|
|
256
|
+
readonly evaporation: number;
|
|
257
|
+
/** Cumulative infiltration depth in in or mm. */
|
|
258
|
+
readonly infiltration: number;
|
|
259
|
+
/** Cumulative surface outflow depth in in or mm. */
|
|
260
|
+
readonly surfaceOutflow: number;
|
|
261
|
+
/** Cumulative drain outflow depth in in or mm. */
|
|
262
|
+
readonly drainOutflow: number;
|
|
263
|
+
/** Initial stored water as an equivalent depth in in or mm. */
|
|
264
|
+
readonly initialVolume: number;
|
|
265
|
+
/** Final stored water as an equivalent depth in in or mm. */
|
|
266
|
+
readonly finalVolume: number;
|
|
267
|
+
/** Surface water depth in in or mm. */
|
|
268
|
+
readonly surfaceDepth: number;
|
|
269
|
+
/** Pavement water depth in in or mm. */
|
|
270
|
+
readonly pavementDepth: number;
|
|
271
|
+
/** Storage water depth in in or mm. */
|
|
272
|
+
readonly storageDepth: number;
|
|
273
|
+
/** Volumetric soil moisture fraction. */
|
|
274
|
+
readonly soilMoisture: number;
|
|
275
|
+
/** Elapsed dry time in seconds. */
|
|
276
|
+
readonly dryTimeSeconds: number;
|
|
277
|
+
/** Previous drain flow in project flow units. */
|
|
278
|
+
readonly oldDrainFlow: number;
|
|
279
|
+
/** Current drain flow in project flow units. */
|
|
280
|
+
readonly newDrainFlow: number;
|
|
281
|
+
/** Evaporation rate in in/h or mm/h. */
|
|
282
|
+
readonly evaporationRate: number;
|
|
283
|
+
/** Maximum native-soil infiltration rate in in/h or mm/h. */
|
|
284
|
+
readonly maximumNativeInfiltrationRate: number;
|
|
285
|
+
/** Surface inflow rate in in/h or mm/h. */
|
|
286
|
+
readonly surfaceInflowRate: number;
|
|
287
|
+
/** Surface infiltration rate in in/h or mm/h. */
|
|
288
|
+
readonly surfaceInfiltrationRate: number;
|
|
289
|
+
/** Surface evaporation rate in in/h or mm/h. */
|
|
290
|
+
readonly surfaceEvaporationRate: number;
|
|
291
|
+
/** Surface outflow rate in in/h or mm/h. */
|
|
292
|
+
readonly surfaceOutflowRate: number;
|
|
293
|
+
/** Pavement evaporation rate in in/h or mm/h. */
|
|
294
|
+
readonly pavementEvaporationRate: number;
|
|
295
|
+
/** Pavement percolation rate in in/h or mm/h. */
|
|
296
|
+
readonly pavementPercolationRate: number;
|
|
297
|
+
/** Soil evaporation rate in in/h or mm/h. */
|
|
298
|
+
readonly soilEvaporationRate: number;
|
|
299
|
+
/** Soil percolation rate in in/h or mm/h. */
|
|
300
|
+
readonly soilPercolationRate: number;
|
|
301
|
+
/** Storage inflow rate in in/h or mm/h. */
|
|
302
|
+
readonly storageInflowRate: number;
|
|
303
|
+
/** Storage exfiltration rate in in/h or mm/h. */
|
|
304
|
+
readonly storageExfiltrationRate: number;
|
|
305
|
+
/** Storage evaporation rate in in/h or mm/h. */
|
|
306
|
+
readonly storageEvaporationRate: number;
|
|
307
|
+
/** Storage drainage rate in in/h or mm/h. */
|
|
308
|
+
readonly storageDrainRate: number;
|
|
309
|
+
/** Previous surface-layer flux in ft/s or m/s, not rainfall-rate units. */
|
|
310
|
+
readonly surfaceFluxRate: number;
|
|
311
|
+
/** Previous soil-layer flux in ft/s or m/s. */
|
|
312
|
+
readonly soilFluxRate: number;
|
|
313
|
+
/** Previous storage-layer flux in ft/s or m/s. */
|
|
314
|
+
readonly storageFluxRate: number;
|
|
315
|
+
/** Previous pavement-layer flux in ft/s or m/s. */
|
|
316
|
+
readonly pavementFluxRate: number;
|
|
317
|
+
}
|
|
318
|
+
/** Detached aggregate LID-group results for one subcatchment. */
|
|
319
|
+
export interface SubcatchmentLidSnapshot {
|
|
320
|
+
/** Non-LID pervious area in ft² or m². */
|
|
321
|
+
readonly perviousArea: number;
|
|
322
|
+
/** Flow routed to pervious area in project flow units. */
|
|
323
|
+
readonly flowToPerviousArea: number;
|
|
324
|
+
/** Previous aggregate drain flow in project flow units. */
|
|
325
|
+
readonly oldDrainFlow: number;
|
|
326
|
+
/** Current aggregate drain flow in project flow units. */
|
|
327
|
+
readonly newDrainFlow: number;
|
|
328
|
+
}
|
|
329
|
+
/** Worker operations owned by the LID family. */
|
|
330
|
+
export interface LidOperations {
|
|
331
|
+
lidControlConfiguration: {
|
|
332
|
+
args: [string];
|
|
333
|
+
result: LidControlConfiguration;
|
|
334
|
+
};
|
|
335
|
+
configureLidControl: {
|
|
336
|
+
args: [string, LidLayerName, LidLayerPatch];
|
|
337
|
+
result: void;
|
|
338
|
+
};
|
|
339
|
+
lidUnitCount: {
|
|
340
|
+
args: [string];
|
|
341
|
+
result: number;
|
|
342
|
+
};
|
|
343
|
+
lidUnitConfiguration: {
|
|
344
|
+
args: [string, number];
|
|
345
|
+
result: LidUnitConfiguration;
|
|
346
|
+
};
|
|
347
|
+
configureLidUnit: {
|
|
348
|
+
args: [string, number, LidUnitPatch];
|
|
349
|
+
result: void;
|
|
350
|
+
};
|
|
351
|
+
lidUnitSnapshot: {
|
|
352
|
+
args: [string, number];
|
|
353
|
+
result: LidUnitSnapshot;
|
|
354
|
+
};
|
|
355
|
+
subcatchmentLidSnapshot: {
|
|
356
|
+
args: [string];
|
|
357
|
+
result: SubcatchmentLidSnapshot;
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
/** Shared LID-control handle obtained from `simulation.lidControls`. */
|
|
361
|
+
export declare class LidControl {
|
|
362
|
+
#private;
|
|
363
|
+
/** Canonical configured control ID. */
|
|
364
|
+
readonly id: string;
|
|
365
|
+
private constructor();
|
|
366
|
+
/** Read configured layers in a healthy owner state.
|
|
367
|
+
* @returns Detached layer records; absent layers are null. Derived fields retain their last prepared values until preparation.
|
|
368
|
+
*/
|
|
369
|
+
configuration(): Promise<LidControlConfiguration>;
|
|
370
|
+
/** Atomically update an existing surface layer in `open` or `ended`; accepted edits return the owner to `open`.
|
|
371
|
+
* @param layer - Existing layer to update; this does not add absent layers.
|
|
372
|
+
* @param patch - Sparse layer fields in project units; omission retains a value.
|
|
373
|
+
* @returns Resolves after all supplied fields are accepted.
|
|
374
|
+
*/
|
|
375
|
+
configure(layer: "surface", patch: LidSurfacePatch): Promise<void>;
|
|
376
|
+
/** Update an existing soil layer. Same state and atomicity contract as the surface overload.
|
|
377
|
+
* @param layer - Soil selector.
|
|
378
|
+
* @param patch - Sparse soil declarations.
|
|
379
|
+
*/
|
|
380
|
+
configure(layer: "soil", patch: LidSoilPatch): Promise<void>;
|
|
381
|
+
/** Update an existing storage layer. Same state and atomicity contract as the surface overload.
|
|
382
|
+
* @param layer - Storage selector.
|
|
383
|
+
* @param patch - Sparse storage declarations.
|
|
384
|
+
*/
|
|
385
|
+
configure(layer: "storage", patch: LidStoragePatch): Promise<void>;
|
|
386
|
+
/** Update an existing pavement layer. Same state and atomicity contract as the surface overload.
|
|
387
|
+
* @param layer - Pavement selector.
|
|
388
|
+
* @param patch - Sparse pavement declarations.
|
|
389
|
+
*/
|
|
390
|
+
configure(layer: "pavement", patch: LidPavementPatch): Promise<void>;
|
|
391
|
+
/** Update an existing underdrain. Same state and atomicity contract as the surface overload.
|
|
392
|
+
* @param layer - Drain selector.
|
|
393
|
+
* @param patch - Sparse drain declarations.
|
|
394
|
+
*/
|
|
395
|
+
configure(layer: "drain", patch: LidDrainPatch): Promise<void>;
|
|
396
|
+
/** Update an existing drainage mat. Same state and atomicity contract as the surface overload.
|
|
397
|
+
* @param layer - Drainage-mat selector.
|
|
398
|
+
* @param patch - Sparse mat declarations.
|
|
399
|
+
*/
|
|
400
|
+
configure(layer: "drainage_mat", patch: LidDrainageMatPatch): Promise<void>;
|
|
401
|
+
/** Update a dynamically selected existing layer. Same state and atomicity contract as the surface overload.
|
|
402
|
+
* @param layer - Existing layer selector.
|
|
403
|
+
* @param patch - Sparse declarations matching the selected layer.
|
|
404
|
+
*/
|
|
405
|
+
configure(layer: LidLayerName, patch: LidLayerPatch): Promise<void>;
|
|
406
|
+
}
|
|
407
|
+
/** LID usage handle identified by its subcatchment and local index. */
|
|
408
|
+
export declare class LidUnit {
|
|
409
|
+
#private;
|
|
410
|
+
/** Canonical owning subcatchment ID. */
|
|
411
|
+
readonly subcatchmentId: string;
|
|
412
|
+
/** Zero-based position within the owning subcatchment's LID usages. */
|
|
413
|
+
readonly index: number;
|
|
414
|
+
private constructor();
|
|
415
|
+
/** Read usage declarations in a healthy owner state.
|
|
416
|
+
* @returns Detached configuration in project units.
|
|
417
|
+
*/
|
|
418
|
+
configuration(): Promise<LidUnitConfiguration>;
|
|
419
|
+
/** Atomically update this usage in `open` or `ended`; accepted edits return the owner to `open`.
|
|
420
|
+
* @param patch - Sparse usage declarations; null restores implicit drain routing.
|
|
421
|
+
* @returns Resolves after all supplied fields are accepted.
|
|
422
|
+
*/
|
|
423
|
+
configure(patch: LidUnitPatch): Promise<void>;
|
|
424
|
+
/** Read detached water balance and layer results in `running` or `complete`, before `end()`.
|
|
425
|
+
* @returns One usage's current results; later steps do not mutate them.
|
|
426
|
+
*/
|
|
427
|
+
snapshot(): Promise<LidUnitSnapshot>;
|
|
428
|
+
}
|
|
429
|
+
/** Asynchronously indexed LID units owned by one subcatchment. */
|
|
430
|
+
export declare class LidUnitCollection {
|
|
431
|
+
#private;
|
|
432
|
+
/** Canonical owning subcatchment ID. */
|
|
433
|
+
readonly subcatchmentId: string;
|
|
434
|
+
private constructor();
|
|
435
|
+
/** Read the number of configured usages; unlike model collections this queries the worker.
|
|
436
|
+
* @returns Subcatchment-local usage count.
|
|
437
|
+
*/
|
|
438
|
+
count(): Promise<number>;
|
|
439
|
+
/** Resolve one subcatchment-local usage in a healthy owner state.
|
|
440
|
+
* @param index - Zero-based usage index, not a configured LID-control index.
|
|
441
|
+
* @returns New handle for the selected usage.
|
|
442
|
+
* @throws `RangeError` if the index is non-integral, negative, or out of range.
|
|
443
|
+
*/
|
|
444
|
+
at(index: number): Promise<LidUnit>;
|
|
445
|
+
}
|
|
446
|
+
//# sourceMappingURL=lids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lids.d.ts","sourceRoot":"","sources":["../../../src/swmmrs/objects/lids.ts"],"names":[],"mappings":"AAEA,2EAA2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,MAAM,GAAG,cAAc,GAAG,OAAO,CAAC;AAC5E,gDAAgD;AAChD,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB;IAClF,4BAA4B;IAC5B,QAAQ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AAa,iBAAiB;;IAC5B,wCAAwC;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAEhC,OAAO,eAIN;IAKD;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAA4D;IACpF;;;;OAIG;IACG,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAKxC;CACF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/** Shared LID-control handle obtained from `simulation.lidControls`. */
|
|
2
|
+
export class LidControl {
|
|
3
|
+
/** Canonical configured control ID. */
|
|
4
|
+
id;
|
|
5
|
+
#call;
|
|
6
|
+
constructor(id, call) {
|
|
7
|
+
this.id = id;
|
|
8
|
+
this.#call = call;
|
|
9
|
+
Object.freeze(this);
|
|
10
|
+
}
|
|
11
|
+
/** @internal */
|
|
12
|
+
static create(id, call) { return new LidControl(id, call); }
|
|
13
|
+
/** Read configured layers in a healthy owner state.
|
|
14
|
+
* @returns Detached layer records; absent layers are null. Derived fields retain their last prepared values until preparation.
|
|
15
|
+
*/
|
|
16
|
+
configuration() { return this.#call("lidControlConfiguration", this.id); }
|
|
17
|
+
configure(layer, patch) {
|
|
18
|
+
return this.#call("configureLidControl", this.id, layer, patch);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/** LID usage handle identified by its subcatchment and local index. */
|
|
22
|
+
export class LidUnit {
|
|
23
|
+
/** Canonical owning subcatchment ID. */
|
|
24
|
+
subcatchmentId;
|
|
25
|
+
/** Zero-based position within the owning subcatchment's LID usages. */
|
|
26
|
+
index;
|
|
27
|
+
#call;
|
|
28
|
+
constructor(subcatchmentId, index, call) {
|
|
29
|
+
this.subcatchmentId = subcatchmentId;
|
|
30
|
+
this.index = index;
|
|
31
|
+
this.#call = call;
|
|
32
|
+
Object.freeze(this);
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
static create(subcatchmentId, index, call) {
|
|
36
|
+
return new LidUnit(subcatchmentId, index, call);
|
|
37
|
+
}
|
|
38
|
+
/** Read usage declarations in a healthy owner state.
|
|
39
|
+
* @returns Detached configuration in project units.
|
|
40
|
+
*/
|
|
41
|
+
configuration() {
|
|
42
|
+
return this.#call("lidUnitConfiguration", this.subcatchmentId, this.index);
|
|
43
|
+
}
|
|
44
|
+
/** Atomically update this usage in `open` or `ended`; accepted edits return the owner to `open`.
|
|
45
|
+
* @param patch - Sparse usage declarations; null restores implicit drain routing.
|
|
46
|
+
* @returns Resolves after all supplied fields are accepted.
|
|
47
|
+
*/
|
|
48
|
+
configure(patch) {
|
|
49
|
+
return this.#call("configureLidUnit", this.subcatchmentId, this.index, patch);
|
|
50
|
+
}
|
|
51
|
+
/** Read detached water balance and layer results in `running` or `complete`, before `end()`.
|
|
52
|
+
* @returns One usage's current results; later steps do not mutate them.
|
|
53
|
+
*/
|
|
54
|
+
snapshot() {
|
|
55
|
+
return this.#call("lidUnitSnapshot", this.subcatchmentId, this.index);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** Asynchronously indexed LID units owned by one subcatchment. */
|
|
59
|
+
export class LidUnitCollection {
|
|
60
|
+
/** Canonical owning subcatchment ID. */
|
|
61
|
+
subcatchmentId;
|
|
62
|
+
#call;
|
|
63
|
+
constructor(subcatchmentId, call) {
|
|
64
|
+
this.subcatchmentId = subcatchmentId;
|
|
65
|
+
this.#call = call;
|
|
66
|
+
Object.freeze(this);
|
|
67
|
+
}
|
|
68
|
+
/** @internal */
|
|
69
|
+
static create(subcatchmentId, call) {
|
|
70
|
+
return new LidUnitCollection(subcatchmentId, call);
|
|
71
|
+
}
|
|
72
|
+
/** Read the number of configured usages; unlike model collections this queries the worker.
|
|
73
|
+
* @returns Subcatchment-local usage count.
|
|
74
|
+
*/
|
|
75
|
+
count() { return this.#call("lidUnitCount", this.subcatchmentId); }
|
|
76
|
+
/** Resolve one subcatchment-local usage in a healthy owner state.
|
|
77
|
+
* @param index - Zero-based usage index, not a configured LID-control index.
|
|
78
|
+
* @returns New handle for the selected usage.
|
|
79
|
+
* @throws `RangeError` if the index is non-integral, negative, or out of range.
|
|
80
|
+
*/
|
|
81
|
+
async at(index) {
|
|
82
|
+
if (!Number.isInteger(index) || index < 0)
|
|
83
|
+
throw new RangeError(`LID unit index out of range: ${index}`);
|
|
84
|
+
const count = await this.count();
|
|
85
|
+
if (index >= count)
|
|
86
|
+
throw new RangeError(`LID unit index out of range: ${index}`);
|
|
87
|
+
return LidUnit.create(this.subcatchmentId, index, this.#call);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=lids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lids.js","sourceRoot":"","sources":["../../../src/swmmrs/objects/lids.ts"],"names":[],"mappings":"AAyWA,wEAAwE;AACxE,MAAM,OAAO,UAAU;IACrB,uCAAuC;IAC9B,EAAE,CAAS;IACX,KAAK,CAAO;IACrB,YAAoB,EAAU,EAAE,IAAU;QACxC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IACD,gBAAgB;IAChB,MAAM,CAAC,MAAM,CAAC,EAAU,EAAE,IAAU,IAAgB,OAAO,IAAI,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACtF;;OAEG;IACH,aAAa,KAAuC,OAAO,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAqC5G,SAAS,CAAC,KAAmB,EAAE,KAAoB;QACjD,OAAO,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC;CACF;AAGD,uEAAuE;AACvE,MAAM,OAAO,OAAO;IAClB,wCAAwC;IAC/B,c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