![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
All SWMM simulation options parsed from [OPTIONS] section. More...
#include <SimulationOptions.hpp>
Public Attributes | |
| double | start_date = 2453006.0 |
| Simulation start date/time (decimal days, Julian date). | |
| double | end_date = 0.0 |
| Simulation end date/time (decimal days, Julian date). | |
| double | report_start = 0.0 |
| Report start date/time. | |
| double | routing_step = 20.0 |
| Hydraulic routing timestep in seconds. Legacy default: 20. | |
| double | min_routing_step = 0.5 |
| Minimum routing timestep in seconds (CFL floor). | |
| double | dry_step = 3600.0 |
| Dry-weather runoff timestep in seconds. | |
| double | wet_step = 300.0 |
| Wet-weather runoff timestep in seconds. | |
| double | report_step = 900.0 |
| Reporting output interval in seconds. | |
| double | dry_days = 0.0 |
| Antecedent dry days. | |
| double | variable_step = 0.75 |
| Courant factor for variable time stepping (0 = fixed step). | |
| double | lengthening_step = 0.0 |
| Conduit lengthening timestep (seconds, 0 = use routing_step). | |
| int | sweep_start = 1 |
| Street sweeping start day-of-year (1-365). 0 = not set. | |
| int | sweep_end = 365 |
| Street sweeping end day-of-year (1-365). 0 = not set. | |
| FlowUnits | flow_units = FlowUnits::CFS |
| Flow units system. | |
| RoutingModel | routing_model = RoutingModel::DYNWAVE |
| Routing method. Legacy default: DYNWAVE. | |
| InfiltrationModel | infiltration = InfiltrationModel::HORTON |
| Infiltration method for subcatchments. | |
| RunoffModel | runoff_model = RunoffModel::NL_POND |
| Runoff routing method. | |
| int | max_trials = 8 |
| Maximum number of flow routing iterations (dynamic wave). | |
| int | surcharge_method = 0 |
| Surcharge method: 0=EXTRAN, 1=SLOT. | |
| int | normal_flow_ltd = 2 |
| Normal flow limitation: 0=SLOPE, 1=FROUDE, 2=BOTH, 3=NEITHER. | |
| int | force_main_eqn = 0 |
| Force main equation: 0=Hazen-Williams, 1=Darcy-Weisbach. | |
| int | inertial_damping = 1 |
| Inertial damping: 0=NONE, 1=PARTIAL, 2=FULL. | |
| int | link_offsets = 0 |
| Link offset mode: 0=DEPTH_OFFSET, 1=ELEV_OFFSET. | |
| double | min_slope = 0.0 |
| Minimum conduit slope (ft/ft). | |
| double | min_surf_area = 0.0 |
| Minimum node surface area (ft²). | |
| double | head_tol = 0.005 |
| Convergence head tolerance in project length units. | |
| double | sys_flow_tol = 0.05 |
| System flow tolerance (fraction, e.g., 0.05 = 5%). | |
| double | lat_flow_tol = 0.05 |
| Lateral inflow tolerance (fraction, e.g., 0.05 = 5%). | |
| bool | quality_routing = false |
| True if quality routing is enabled. | |
| bool | allow_ponding = false |
| True if evaporation is included. | |
| bool | ignore_rainfall = false |
| Ignore rainfall (for hot start runs). | |
| bool | ignore_snow_melt = false |
| Ignore snowmelt. | |
| bool | ignore_groundwater = false |
| Ignore groundwater. | |
| bool | ignore_rdii = false |
| Ignore RDII. | |
| bool | ignore_routing = false |
| Ignore routing. | |
| bool | ignore_quality = false |
| Ignore water quality. | |
| int | num_threads = 1 |
| Number of OpenMP threads for parallel solver loops. | |
| std::string | crs |
| Coordinate reference system string. | |
| std::unordered_map< std::string, std::string > | ext_options |
| Key-value map for unknown [OPTIONS] keys. | |
| int | evap_type = 0 |
| Evaporation type: 0=CONSTANT, 1=MONTHLY, 2=TIMESERIES, 3=TEMPERATURE, 4=FILE. | |
| double | evap_values [12] = {0,0,0,0,0,0,0,0,0,0,0,0} |
| Monthly evaporation values (used when evap_type == 0 or 1). | |
| std::string | evap_ts_name |
| Timeseries name for evaporation (evap_type == 2). | |
| std::string | evap_recovery_pat |
| Recovery pattern name for evaporation. | |
| bool | evap_dry_only = false |
| If true, evaporation only occurs on dry days. | |
| int | temp_source = 0 |
| Temperature source: 0=NONE, 1=TIMESERIES, 2=FILE. | |
| std::string | temp_ts_name |
| Timeseries name for temperature data. | |
| std::string | temp_file |
| File path for temperature data. | |
| double | temp_file_start = 0.0 |
| Temperature file start date (Julian). | |
| int | wind_type = 0 |
| Wind speed type: 0=MONTHLY, 1=FILE. | |
| double | wind_speed [12] = {0,0,0,0,0,0,0,0,0,0,0,0} |
| Monthly wind speed values (12 months). | |
| double | snow_divt = 34.0 |
| Snowmelt: dividing temperature. | |
| double | snow_ati_wt = 0.5 |
| Snowmelt: ATI weight (0–1). | |
| double | snow_nrg_ratio = 0.6 |
| Snowmelt: negative melt ratio. | |
| double | snow_lat = 0.0 |
| Snowmelt: latitude (degrees). | |
| double | snow_min_melt = 0.0 |
| Snowmelt: minimum melt coefficient. | |
| double | snow_max_melt = 0.0 |
| Snowmelt: maximum melt coefficient. | |
| double | adc_imperv [10] = {1,1,1,1,1,1,1,1,1,1} |
| Areal depletion curve for impervious surfaces (10 fractions). | |
| double | adc_perv [10] = {1,1,1,1,1,1,1,1,1,1} |
| Areal depletion curve for pervious surfaces (10 fractions). | |
| int | rpt_subcatchments = 0 |
| Subcatchment reporting: 0=NONE, 1=ALL, 2=SOME. | |
| int | rpt_nodes = 0 |
| Node reporting: 0=NONE, 1=ALL, 2=SOME. | |
| int | rpt_links = 0 |
| Link reporting: 0=NONE, 1=ALL, 2=SOME. | |
| bool | rpt_input = false |
| Report input summary. | |
| bool | rpt_continuity = true |
| Report continuity errors (default true). | |
| bool | rpt_flowstats = true |
| Report flow statistics (default true). | |
| bool | rpt_controls = false |
| Report control actions (default false). | |
| bool | rpt_averages = false |
| Report time-averaged results (default false). | |
| std::vector< std::string > | rpt_subcatch_names |
| Named subcatchments to report (used when rpt_subcatchments == 2). | |
| std::vector< std::string > | rpt_node_names |
| Named nodes to report (used when rpt_nodes == 2). | |
| std::vector< std::string > | rpt_link_names |
| Named links to report (used when rpt_links == 2). | |
All SWMM simulation options parsed from [OPTIONS] section.
This struct consolidates all options that were previously global variables in src/solver/globals.h (e.g., FlowUnits, RouteModel, RouteStep, etc.) into a single value type that lives inside SimulationContext.
The ext_options map stores any key in [OPTIONS] that is not recognized as a standard SWMM option. A SWMM_WARN_UNKNOWN_OPTION warning is issued. Extension options are available to plugins via the C API.
| double openswmm::SimulationOptions::adc_imperv[10] = {1,1,1,1,1,1,1,1,1,1} |
Areal depletion curve for impervious surfaces (10 fractions).
| double openswmm::SimulationOptions::adc_perv[10] = {1,1,1,1,1,1,1,1,1,1} |
Areal depletion curve for pervious surfaces (10 fractions).
| bool openswmm::SimulationOptions::allow_ponding = false |
True if evaporation is included.
| std::string openswmm::SimulationOptions::crs |
Coordinate reference system string.
Set via the CRS key in [OPTIONS]:
or using a PROJ string:
Empty string if not specified. Also stored in SpatialFrame::crs.
| double openswmm::SimulationOptions::dry_days = 0.0 |
Antecedent dry days.
| double openswmm::SimulationOptions::dry_step = 3600.0 |
Dry-weather runoff timestep in seconds.
| double openswmm::SimulationOptions::end_date = 0.0 |
Simulation end date/time (decimal days, Julian date).
| bool openswmm::SimulationOptions::evap_dry_only = false |
If true, evaporation only occurs on dry days.
| std::string openswmm::SimulationOptions::evap_recovery_pat |
Recovery pattern name for evaporation.
| std::string openswmm::SimulationOptions::evap_ts_name |
Timeseries name for evaporation (evap_type == 2).
| int openswmm::SimulationOptions::evap_type = 0 |
Evaporation type: 0=CONSTANT, 1=MONTHLY, 2=TIMESERIES, 3=TEMPERATURE, 4=FILE.
| double openswmm::SimulationOptions::evap_values[12] = {0,0,0,0,0,0,0,0,0,0,0,0} |
Monthly evaporation values (used when evap_type == 0 or 1).
| std::unordered_map<std::string, std::string> openswmm::SimulationOptions::ext_options |
Key-value map for unknown [OPTIONS] keys.
Any key in [OPTIONS] that is not a recognized SWMM keyword is stored here as a string pair. A SWMM_WARN_UNKNOWN_OPTION warning is issued for each unknown key.
Plugins can retrieve values via swmm_options_get_ext(). Keys are stored uppercase-normalized.
Example:
| FlowUnits openswmm::SimulationOptions::flow_units = FlowUnits::CFS |
Flow units system.
| int openswmm::SimulationOptions::force_main_eqn = 0 |
Force main equation: 0=Hazen-Williams, 1=Darcy-Weisbach.
| double openswmm::SimulationOptions::head_tol = 0.005 |
Convergence head tolerance in project length units.
Legacy default: 0.0 (sentinel → runtime default 0.005 ft).
| bool openswmm::SimulationOptions::ignore_groundwater = false |
Ignore groundwater.
| bool openswmm::SimulationOptions::ignore_quality = false |
Ignore water quality.
| bool openswmm::SimulationOptions::ignore_rainfall = false |
Ignore rainfall (for hot start runs).
| bool openswmm::SimulationOptions::ignore_rdii = false |
Ignore RDII.
| bool openswmm::SimulationOptions::ignore_routing = false |
Ignore routing.
| bool openswmm::SimulationOptions::ignore_snow_melt = false |
Ignore snowmelt.
| int openswmm::SimulationOptions::inertial_damping = 1 |
Inertial damping: 0=NONE, 1=PARTIAL, 2=FULL.
| InfiltrationModel openswmm::SimulationOptions::infiltration = InfiltrationModel::HORTON |
Infiltration method for subcatchments.
| double openswmm::SimulationOptions::lat_flow_tol = 0.05 |
Lateral inflow tolerance (fraction, e.g., 0.05 = 5%).
Legacy default: 0.05. Input is in percent, divided by 100.
| double openswmm::SimulationOptions::lengthening_step = 0.0 |
Conduit lengthening timestep (seconds, 0 = use routing_step).
Used to compute modified conduit lengths for CFL stability.
| int openswmm::SimulationOptions::link_offsets = 0 |
Link offset mode: 0=DEPTH_OFFSET, 1=ELEV_OFFSET.
| int openswmm::SimulationOptions::max_trials = 8 |
Maximum number of flow routing iterations (dynamic wave).
| double openswmm::SimulationOptions::min_routing_step = 0.5 |
Minimum routing timestep in seconds (CFL floor).
| double openswmm::SimulationOptions::min_slope = 0.0 |
Minimum conduit slope (ft/ft).
| double openswmm::SimulationOptions::min_surf_area = 0.0 |
Minimum node surface area (ft²).
| int openswmm::SimulationOptions::normal_flow_ltd = 2 |
Normal flow limitation: 0=SLOPE, 1=FROUDE, 2=BOTH, 3=NEITHER.
| int openswmm::SimulationOptions::num_threads = 1 |
Number of OpenMP threads for parallel solver loops.
Parsed from the THREADS keyword in [OPTIONS].
A performance threshold is applied at startup: if the number of conduit links is less than 4 × num_threads, threading is disabled to avoid overhead dominating on small networks.
| bool openswmm::SimulationOptions::quality_routing = false |
True if quality routing is enabled.
| double openswmm::SimulationOptions::report_start = 0.0 |
Report start date/time.
| double openswmm::SimulationOptions::report_step = 900.0 |
Reporting output interval in seconds.
| RoutingModel openswmm::SimulationOptions::routing_model = RoutingModel::DYNWAVE |
Routing method. Legacy default: DYNWAVE.
| double openswmm::SimulationOptions::routing_step = 20.0 |
Hydraulic routing timestep in seconds. Legacy default: 20.
| bool openswmm::SimulationOptions::rpt_averages = false |
Report time-averaged results (default false).
| bool openswmm::SimulationOptions::rpt_continuity = true |
Report continuity errors (default true).
| bool openswmm::SimulationOptions::rpt_controls = false |
Report control actions (default false).
| bool openswmm::SimulationOptions::rpt_flowstats = true |
Report flow statistics (default true).
| bool openswmm::SimulationOptions::rpt_input = false |
Report input summary.
| std::vector<std::string> openswmm::SimulationOptions::rpt_link_names |
Named links to report (used when rpt_links == 2).
| int openswmm::SimulationOptions::rpt_links = 0 |
Link reporting: 0=NONE, 1=ALL, 2=SOME.
| std::vector<std::string> openswmm::SimulationOptions::rpt_node_names |
Named nodes to report (used when rpt_nodes == 2).
| int openswmm::SimulationOptions::rpt_nodes = 0 |
Node reporting: 0=NONE, 1=ALL, 2=SOME.
| std::vector<std::string> openswmm::SimulationOptions::rpt_subcatch_names |
Named subcatchments to report (used when rpt_subcatchments == 2).
| int openswmm::SimulationOptions::rpt_subcatchments = 0 |
Subcatchment reporting: 0=NONE, 1=ALL, 2=SOME.
| RunoffModel openswmm::SimulationOptions::runoff_model = RunoffModel::NL_POND |
Runoff routing method.
| double openswmm::SimulationOptions::snow_ati_wt = 0.5 |
Snowmelt: ATI weight (0–1).
| double openswmm::SimulationOptions::snow_divt = 34.0 |
Snowmelt: dividing temperature.
| double openswmm::SimulationOptions::snow_lat = 0.0 |
Snowmelt: latitude (degrees).
| double openswmm::SimulationOptions::snow_max_melt = 0.0 |
Snowmelt: maximum melt coefficient.
| double openswmm::SimulationOptions::snow_min_melt = 0.0 |
Snowmelt: minimum melt coefficient.
| double openswmm::SimulationOptions::snow_nrg_ratio = 0.6 |
Snowmelt: negative melt ratio.
| double openswmm::SimulationOptions::start_date = 2453006.0 |
Simulation start date/time (decimal days, Julian date).
Legacy default: Jan 1, 2004 = datetime_encodeDate(2004,1,1).
| int openswmm::SimulationOptions::surcharge_method = 0 |
Surcharge method: 0=EXTRAN, 1=SLOT.
| int openswmm::SimulationOptions::sweep_end = 365 |
Street sweeping end day-of-year (1-365). 0 = not set.
| int openswmm::SimulationOptions::sweep_start = 1 |
Street sweeping start day-of-year (1-365). 0 = not set.
| double openswmm::SimulationOptions::sys_flow_tol = 0.05 |
System flow tolerance (fraction, e.g., 0.05 = 5%).
Legacy default: 0.05. Input is in percent, divided by 100.
| std::string openswmm::SimulationOptions::temp_file |
File path for temperature data.
| double openswmm::SimulationOptions::temp_file_start = 0.0 |
Temperature file start date (Julian).
| int openswmm::SimulationOptions::temp_source = 0 |
Temperature source: 0=NONE, 1=TIMESERIES, 2=FILE.
| std::string openswmm::SimulationOptions::temp_ts_name |
Timeseries name for temperature data.
| double openswmm::SimulationOptions::variable_step = 0.75 |
Courant factor for variable time stepping (0 = fixed step).
Legacy default: 0.75 (enabled).
| double openswmm::SimulationOptions::wet_step = 300.0 |
Wet-weather runoff timestep in seconds.
| double openswmm::SimulationOptions::wind_speed[12] = {0,0,0,0,0,0,0,0,0,0,0,0} |
Monthly wind speed values (12 months).
| int openswmm::SimulationOptions::wind_type = 0 |
Wind speed type: 0=MONTHLY, 1=FILE.