OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::Router::RestartState Struct Reference
Collaboration diagram for openswmm::Router::RestartState:

Public Member Functions

 RestartState (const Router &r, const SimulationContext &c)
 Copy a private hydraulic restart candidate from live routing/context state.
 
void archive (Archive &a, bool thermal_lid_state, bool thermal_lid_contact_receipts)
 Encode or decode selected hydraulic restart state with fixed initialized shapes.
 
void validate (const Router &router, const SimulationContext &c) const
 Validate decoded hydraulic state against initialized model and accepted-boundary invariants.
 
void install (Router &r, SimulationContext &c) noexcept
 Move a fully validated restart candidate into its matching live Router/context.
 

Public Attributes

NodeData nodes
 
LinkData links
 
StorageData storages
 
OutfallData outfalls
 
ConduitData conduits
 
SimulationContext::OutfallExports exports
 
dynwave::DWSolver dw
 
double time
 
double date
 
double elapsed
 
double old_elapsed
 
double next_report
 
double evap
 
double infil_factor
 
double recovery_factor
 
bool link_steps
 
double link_step_span
 

Constructor & Destructor Documentation

◆ RestartState()

openswmm::Router::RestartState::RestartState ( const Router & r,
const SimulationContext & c )
inline

Copy a private hydraulic restart candidate from live routing/context state.

Copies node/link/subtype inventories and DW solver storage. Embedded non-owning solver views retain original ownership; do not execute this private solver copy. For qualified no-LID network pollutant profile canonicalizes absent old drain-load history to a zero matrix. Live model is unchanged; allocation can throw.

Parameters
[in]rBorrowed initialized Router supplying DW state and link-step policy.
[in]cBorrowed coherent native context, outfall exports and clocks matching Router.
Here is the call graph for this function:

Member Function Documentation

◆ archive()

void openswmm::Router::RestartState::archive ( Archive & a,
bool thermal_lid_state,
bool thermal_lid_contact_receipts )
inline

Encode or decode selected hydraulic restart state with fixed initialized shapes.

Visits exports, clocks, node/link/conduit arrays, LID state, retained DW geometry/iteration history and xnode/DPS vectors. Does not restore model arrays, file/plugin handles or compiled expressions. Fixed shapes refuse mismatch; consumption/allocation can throw with a partial candidate. Validation/install are separate.

Parameters
[in,out]aBorrowed native read/write archive; decoded fields mutate this private candidate.
[in]thermal_lid_stateProducer-compatible flag selecting LID thermal energy payload.
[in]thermal_lid_contact_receiptsProducer-compatible flag selecting LID ground energy receipt payload.

◆ install()

void openswmm::Router::RestartState::install ( Router & r,
SimulationContext & c )
inlinenoexcept

Move a fully validated restart candidate into its matching live Router/context.

Consumes candidate vectors with intended nonthrowing moves; borrowed views into replaced live/candidate arrays invalidate. Sets accepted checkpoint time/readiness and clears prepared/step-finished flags. Requires prior shape/model/semantic validation and exclusive access; performs no file publication or rollback.

Parameters
[in,out]rBorrowed matching Router; selected DW/xnode/DPS arrays, clocks and checkpoint readiness are replaced.
[in,out]cBorrowed matching context; native state/exports/forcing clocks are moved/assigned, preserving model configuration.

◆ validate()

void openswmm::Router::RestartState::validate ( const Router & router,
const SimulationContext & c ) const
inline

Validate decoded hydraulic state against initialized model and accepted-boundary invariants.

Throws on invalid clocks/date/duration, nonfinite/negative inventories, flags/flow classes, head-depth inconsistency, qualified pollutant layout, LID formulation/material/pore limits, transfer/port/retention balance and Richards diagnostics. Allows specified pressure/ODE roundoff budgets and optional NaN outfall stage conventions. Recomputes LID-dependent full volumes on a private context. Does not install or mutate target; temporary allocation can throw.

Parameters
[in]routerBorrowed target Router supplying model DPS constants and owned-session clock policy.
[in]cBorrowed target model/material/layout with matching dimensions established by fixed archive decoding.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ conduits

ConduitData openswmm::Router::RestartState::conduits

◆ date

double openswmm::Router::RestartState::date

◆ dw

dynwave::DWSolver openswmm::Router::RestartState::dw

◆ elapsed

double openswmm::Router::RestartState::elapsed

◆ evap

double openswmm::Router::RestartState::evap

◆ exports

SimulationContext::OutfallExports openswmm::Router::RestartState::exports

◆ infil_factor

double openswmm::Router::RestartState::infil_factor

◆ link_step_span

double openswmm::Router::RestartState::link_step_span

◆ link_steps

bool openswmm::Router::RestartState::link_steps

◆ links

LinkData openswmm::Router::RestartState::links

◆ next_report

double openswmm::Router::RestartState::next_report

◆ nodes

NodeData openswmm::Router::RestartState::nodes

◆ old_elapsed

double openswmm::Router::RestartState::old_elapsed

◆ outfalls

OutfallData openswmm::Router::RestartState::outfalls

◆ recovery_factor

double openswmm::Router::RestartState::recovery_factor

◆ storages

StorageData openswmm::Router::RestartState::storages

◆ time

double openswmm::Router::RestartState::time

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