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

Write profile: which engine the file is written for. More...

#include <InpWriter.hpp>

Collaboration diagram for openswmm::inp_writer::InpWriteOptions:

Public Types

enum class  Profile {
  Full ,
  Swmm5 ,
  Swmm5Stock
}
 
enum class  OutputKind {
  Model = 0 ,
  Mesh = 1 ,
  Component = 2
}
 

Public Attributes

Profile profile = Profile::Full
 
FILE * stream = nullptr
 
bool internal_units = false
 
bool inline_mesh = false
 
bool skip_component_files = false
 
std::function< std::string(const std::string &, OutputKind)> map_output
 

Detailed Description

Write profile: which engine the file is written for.

Full is the native format. Swmm5 writes a file a SWMM 5.x engine can read (MULTI_ENGINE plan V2 Phase 4): the v6-only sections are omitted ([2D_*], [PLUGINS], [PROCESS_COMPONENTS], [USER_FLAGS], [USER_FLAG_VALUES], [RDII_DECAY]), v6-only option keys are omitted and incompatible values mapped (FLOW_ROUTING FV → DYNWAVE, SURCHARGE_METHOD DYNAMIC_SLOT/TPA → SLOT), a virtual junction becomes an ordinary junction, and an inlet junction becomes an ordinary junction plus an [INLET_USAGE] row on its approach conduit with the same capture node (the legacy-equivalent model). Every substitution is reported through warnings; the file starts with a comment naming the profile.

Swmm5Stock is Swmm5 for a STOCK EPA SWMM 5 engine (5.2.4 as built for SWMMVis): it additionally drops the positional grammar extensions the in-tree legacy 5.3.0 engine added — the [SUBCATCHMENTS] Snowpack * placeholder with the RainScale / SnowScale columns behind it, and the [RAINGAGES] scale-factor column — which a stock parser reads as an object name or a malformed row (ERROR 209 / 200). A dropped factor that is not 1.0 is reported through warnings, since it is real model content.

Member Enumeration Documentation

◆ OutputKind

Enumerator
Model 
Mesh 
Component 

◆ Profile

Enumerator
Full 
Swmm5 
Swmm5Stock 

Member Data Documentation

◆ inline_mesh

bool openswmm::inp_writer::InpWriteOptions::inline_mesh = false

◆ internal_units

bool openswmm::inp_writer::InpWriteOptions::internal_units = false

◆ map_output

std::function<std::string(const std::string&, OutputKind)> openswmm::inp_writer::InpWriteOptions::map_output

◆ profile

Profile openswmm::inp_writer::InpWriteOptions::profile = Profile::Full

◆ skip_component_files

bool openswmm::inp_writer::InpWriteOptions::skip_component_files = false

◆ stream

FILE* openswmm::inp_writer::InpWriteOptions::stream = nullptr

The documentation for this struct was generated from the following file: