hydrobricks
Loading...
Searching...
No Matches
ProcessRoutingHBV.h
1#ifndef HYDROBRICKS_PROCESS_ROUTING_HBV_H
2#define HYDROBRICKS_PROCESS_ROUTING_HBV_H
3
4#include "Includes.h"
5#include "ProcessOutflow.h"
6
30 public:
31 explicit ProcessRoutingHBV(WaterContainer* container);
32
33 ~ProcessRoutingHBV() override = default;
34
40 static void RegisterProcessSettings(SettingsModel* modelSettings);
41
45 [[nodiscard]] bool IsValid() const override;
46
50 void SetParameters(const ProcessSettings& processSettings) override;
51
55 void Reset() override;
56
60 void Finalize() override;
61
70 [[nodiscard]] vecDouble GetChangeRates() override {
71 return GetRates();
72 }
73
77 double* GetValuePointer(std::string_view name) override;
78
79 protected:
80 const float* _maxbas; // base of the triangular weighting function [d]
81
82 // Delivery schedule (slot j: water due j timesteps from now) and pre-computed ordinates
83 vecDouble _stuh;
84 vecDouble _uhOrd;
85 double _lastMaxbas;
86
87 // End-of-step container content of the previous timestep (to measure the committed inflow)
88 double _previousContent;
89
90 // In-transit water (scheduled, not yet delivered) for water balance logging
91 double _processStorage;
92
99 vecDouble GetRates() override;
100
104 void _recomputeUH();
105
109 static double _cumulativeWeight(double t, double maxbas);
110};
111
112#endif // HYDROBRICKS_PROCESS_ROUTING_HBV_H
Definition ProcessOutflow.h:8
Definition ProcessRoutingHBV.h:29
bool IsValid() const override
Definition ProcessRoutingHBV.cpp:23
void SetParameters(const ProcessSettings &processSettings) override
Definition ProcessRoutingHBV.cpp:35
void Finalize() override
Definition ProcessRoutingHBV.cpp:77
void Reset() override
Definition ProcessRoutingHBV.cpp:41
vecDouble GetRates() override
Definition ProcessRoutingHBV.cpp:60
void _recomputeUH()
Definition ProcessRoutingHBV.cpp:108
double * GetValuePointer(std::string_view name) override
Definition ProcessRoutingHBV.cpp:49
static double _cumulativeWeight(double t, double maxbas)
Definition ProcessRoutingHBV.cpp:130
vecDouble GetChangeRates() override
Definition ProcessRoutingHBV.h:70
static void RegisterProcessSettings(SettingsModel *modelSettings)
Definition ProcessRoutingHBV.cpp:16
Definition SettingsModel.h:69
Definition WaterContainer.h:9
Definition SettingsModel.h:29