19#ifndef GENERATORALGORITHMS_H
20#define GENERATORALGORITHMS_H
30 #pragma warning(disable:4512)
115 virtual bool generate(
const size_t& param,
MeteoData& md,
const std::vector<MeteoData>& vecMeteo) = 0;
126 virtual bool create(
const size_t& param,
const size_t& ii_min,
const size_t& ii_max, std::vector<MeteoData>& vecMeteo) = 0;
133 bool skipStation(
const std::string& station_id)
const;
145 GeneratorAlgorithm(
const std::vector< std::pair<std::string, std::string> >& vecArgs,
const std::string& i_algo,
const std::string& i_section,
const double& TZ);
146 virtual void parse_args(
const std::vector< std::pair<std::string, std::string> >& ) {}
147 static std::set<std::string>
initStationSet(
const std::vector< std::pair<std::string, std::string> >& vecArgs,
const std::string& keyword);
159 static GeneratorAlgorithm*
getAlgorithm(
const Config& cfg,
const std::string& i_algoname,
const std::string& i_section,
const std::vector< std::pair<std::string, std::string> >& vecArgs);
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
Definition: GeneratorAlgorithms.h:157
static GeneratorAlgorithm * getAlgorithm(const Config &cfg, const std::string &i_algoname, const std::string &i_section, const std::vector< std::pair< std::string, std::string > > &vecArgs)
Definition: GeneratorAlgorithms.cc:143
Interface class for the generator models.
Definition: GeneratorAlgorithms.h:111
static const double soil_albedo
Definition: GeneratorAlgorithms.h:154
std::string getAlgo() const
Definition: GeneratorAlgorithms.h:143
bool skipTimeStep(const Date &dt) const
Should this timestep be skipped, based on user-provided time restrictions?
Definition: GeneratorAlgorithms.cc:215
virtual bool create(const size_t ¶m, const size_t &ii_min, const size_t &ii_max, std::vector< MeteoData > &vecMeteo)=0
Fill one time series of MeteoData for one station.
const std::string algo
Definition: GeneratorAlgorithms.h:151
const std::set< std::string > excluded_stations
Definition: GeneratorAlgorithms.h:150
const std::set< std::string > kept_stations
Definition: GeneratorAlgorithms.h:150
static std::set< std::string > initStationSet(const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &keyword)
Definition: GeneratorAlgorithms.cc:191
std::vector< DateRange > getTimeRestrictions() const
Definition: GeneratorAlgorithms.h:142
const std::vector< DateRange > time_restrictions
Definition: GeneratorAlgorithms.h:149
GeneratorAlgorithm(const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &i_algo, const std::string &i_section, const double &TZ)
protected constructor only to be called by children
Definition: GeneratorAlgorithms.cc:188
virtual ~GeneratorAlgorithm()
Definition: GeneratorAlgorithms.h:113
virtual bool generate(const size_t ¶m, MeteoData &md, const std::vector< MeteoData > &vecMeteo)=0
static const double snow_thresh
Definition: GeneratorAlgorithms.h:154
const std::string section
Definition: GeneratorAlgorithms.h:151
static const double snow_albedo
Definition: GeneratorAlgorithms.h:154
bool skipStation(const std::string &station_id) const
Should this station be skipped, based on user-provided station ID restrictions?
Definition: GeneratorAlgorithms.cc:207
virtual void parse_args(const std::vector< std::pair< std::string, std::string > > &)
Definition: GeneratorAlgorithms.h:146
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:107