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

Section handlers for [TIMESERIES] and [CURVES]. More...

#include "TablesHandler.hpp"
#include "../Tokenizer.hpp"
#include "../../core/SimulationContext.hpp"
#include "../../core/DateTime.hpp"
#include "../../data/TableData.hpp"
#include "../../core/charconv_compat.hpp"
#include <charconv>
#include <string>
#include <unordered_map>
Include dependency graph for TablesHandler.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::input
 

Functions

void openswmm::input::handle_timeseries (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [TIMESERIES] into TableData + table_names.
 
void openswmm::input::handle_curves (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [CURVES] into TableData + table_names.
 

Detailed Description

Section handlers for [TIMESERIES] and [CURVES].

[TIMESERIES] format — inline data

;; Name Date Time Value
RAIN1 1/1/2024 0:00 0.00
RAIN1 1:00 0.10
RAIN1 2:00 0.05

[TIMESERIES] format — external file reference

RAIN2 FILE "rain_2024.csv"
RAIN3 FILE "rain_2024.csv:EAST_GAGE"

[CURVES] format

;; Name Type X-Value Y-Value
POND_CURVE STORAGE 0.0 0.0
POND_CURVE 1.0 500.0
PUMP1_CURVE PUMP4 0.0 0.0
PUMP1_CURVE 1.0 10.0
@ Y
Definition culvert.c:28
@ PUMP1_CURVE
Flow v. wet well volume for pump.
Definition enums.h:960
@ STORAGE
Storage node.
Definition enums.h:111
See also
Legacy reference: src/solver/input.c — readTimeseries(), readCurve()
TableData.hpp — Table + TableCursor data structures
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License