Write the full model to a SWMM .inp file.
Sections written (in order): [TITLE], [OPTIONS], [EVAPORATION], [TEMPERATURE], [SNOWPACKS], [ADJUSTMENTS], [RAINGAGES], [SUBCATCHMENTS], [SUBAREAS], [INFILTRATION], [JUNCTIONS], [OUTFALLS], [STORAGE], [DIVIDERS], [CONDUITS], [PUMPS], [ORIFICES], [WEIRS], [OUTLETS], [XSECTIONS], [TRANSECTS], [LOSSES], [CONTROLS], [REPORT], [INFLOWS], [DWF], [RDII], [POLLUTANTS], [LANDUSES], [BUILDUP], [WASHOFF], [TREATMENT], [TIMESERIES], [CURVES], [PATTERNS], [USER_FLAGS], [PLUGINS], [MAP], [COORDINATES], [VERTICES], [Polygons], [SYMBOLS]
Slice IO-4: every external-file path slot ([FILES], [RAINGAGES] FILE, [TIMESERIES] FILE, [TEMPERATURE] FILE, etc.) is emitted relative to the destination directory by default. Set ctx.options.write_absolute_paths = true to disable rebasing. Slots that cannot be expressed relatively (cross-volume on Windows, UNC roots, beyond the depth cap) fall back to absolute form and append a human-readable explanation to warnings when that vector is non-null.
- Parameters
-
| ctx | Simulation context with all model data. |
| path | Output file path. |
| warnings | Optional sink for non-fatal portability warnings (cross-volume slots, etc.). Pass nullptr to discard. |
- Returns
- 0 on success, -1 on file error.