OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
OptionsHandler.cpp File Reference

[OPTIONS] section handler for the new engine. More...

#include "OptionsHandler.hpp"
#include "../Tokenizer.hpp"
#include "../../core/SimulationContext.hpp"
#include "../../core/DateTime.hpp"
#include "../../core/charconv_compat.hpp"
#include <algorithm>
#include <charconv>
#include <cstring>
#include <stdexcept>
#include <string>
#include <vector>
Include dependency graph for OptionsHandler.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::input
 

Functions

void openswmm::input::handle_options (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse the [OPTIONS] section into ctx.options.
 

Detailed Description

[OPTIONS] section handler for the new engine.

Parses key-value pairs from the [OPTIONS] section and populates SimulationContext::options (a SimulationOptions struct).

Unknown keys are stored in options.ext_options with a SWMM_WARN_UNKNOWN_OPTION warning (R05).

The special key CRS is stored in both options.crs and spatial.crs (R06).

Key mapping (standard SWMM 5.x keys only):

FLOW_UNITS → options.flow_units INFILTRATION → options.infiltration FLOW_ROUTING → options.routing_model LINK_OFFSETS → (ignored — legacy compatibility) MIN_SLOPE → (stored in ext_options — not used by new solver yet) ALLOW_PONDING → options.allow_ponding SKIP_STEADY_STATE → (ignored) START_DATE → options.start_date (Julian date) START_TIME → combined with START_DATE END_DATE → options.end_date END_TIME → combined with END_DATE REPORT_START_DATE → options.report_start REPORT_START_TIME → combined with REPORT_START_DATE SWEEP_START → (ext_options) SWEEP_END → (ext_options) DRY_DAYS → (ext_options) REPORT_STEP → options.report_step (HH:MM:SS or seconds) WET_STEP → options.wet_step DRY_STEP → options.dry_step ROUTING_STEP → options.routing_step RULE_STEP → options.dt_controls_remaining (set to first rule step) MAX_TRIALS → options.max_trials HEAD_TOLERANCE → options.head_tol SYS_FLOW_TOL → options.sys_flow_tol LAT_FLOW_TOL → options.lat_flow_tol VARIABLE_STEP → options.variable_step (Courant fraction for variable timestep) MINIMUM_STEP → options.min_routing_step THREADS → options.num_threads (parallel solver thread count) IGNORE_RAINFALL → options.ignore_rainfall IGNORE_SNOWMELT → options.ignore_snow_melt IGNORE_GROUNDWATER → options.ignore_groundwater IGNORE_RDII → options.ignore_rdii IGNORE_ROUTING → options.ignore_routing IGNORE_QUALITY → options.ignore_quality CRS → options.crs + spatial.crs (R06)

See also
Legacy reference: src/solver/input.c — readOption()
SimulationOptions.hpp
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License