![]() |
OpenSWMM Engine
6.0.0-alpha.3
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.3)
|
Functions | |
| int | writeInpFile (const SimulationContext &ctx, const std::string &path, std::vector< std::string > *warnings=nullptr) |
| Write the full model to a SWMM .inp file. | |
| int openswmm::inp_writer::writeInpFile | ( | const SimulationContext & | ctx, |
| const std::string & | path, | ||
| std::vector< std::string > * | warnings = nullptr ) |
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.
| 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. |