OpenSWMM Engine  6.0.0-alpha.3
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.3)
Loading...
Searching...
No Matches
openswmm::inp_writer Namespace Reference

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.
 

Function Documentation

◆ writeInpFile()

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.

Parameters
ctxSimulation context with all model data.
pathOutput file path.
warningsOptional sink for non-fatal portability warnings (cross-volume slots, etc.). Pass nullptr to discard.
Returns
0 on success, -1 on file error.
Here is the call graph for this function:
Here is the caller graph for this function: