32#ifndef OPENSWMM_TREATMENT_HPP
33#define OPENSWMM_TREATMENT_HPP
134 double hrt,
double q,
double v,
double d);
155 double hrt,
double q,
double v,
double d);
double applyTreatment(const TreatExpr &expr, double c_in, double dt, double hrt, double q, double v, double d)
Apply treatment at a node for one pollutant.
Definition Treatment.cpp:427
TokenType
Definition Treatment.hpp:46
@ LPAREN
Left parenthesis (parser internal, never in output)
@ COMMA
Comma separator for min/max (parser internal)
@ FUNC_STEP
Heaviside step.
@ RPAREN
Right parenthesis (parser internal, never in output)
TreatVar
Definition Treatment.hpp:68
@ C
Current concentration.
@ HRT
Hydraulic residence time (hours, per legacy convention)
@ R
Removal fraction target.
int parse(const std::string &expr_str, TreatExpr &result)
Parse a treatment expression string into postfix tokens.
Definition Treatment.cpp:260
double evaluate(const TreatExpr &expr, double c, double dt, double hrt, double q, double v, double d)
Evaluate a treatment expression with given variable values.
Definition Treatment.cpp:315
Definition Controls.cpp:24
Definition Treatment.hpp:82
double value
For NUMBER tokens.
Definition Treatment.hpp:84
TokenType type
Definition Treatment.hpp:83
TreatVar var
For VARIABLE tokens.
Definition Treatment.hpp:85
Definition Treatment.hpp:92
bool is_removal
True if expression computes R (removal), false if C.
Definition Treatment.hpp:95
std::vector< Token > tokens
Postfix (RPN) token list.
Definition Treatment.hpp:93
int pollutant_idx
Which pollutant this expression applies to.
Definition Treatment.hpp:94