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;
152 GeneratorAlgorithm(
const std::vector< std::pair<std::string, std::string> >& vecArgs,
const std::string& i_algo,
const std::string& i_section,
const double& TZ);
153 virtual void parse_args(
const std::vector< std::pair<std::string, std::string> >& ) {}
154 static std::set<std::string>
initStationSet(
const std::vector< std::pair<std::string, std::string> >& vecArgs,
const std::string& keyword);
170 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:168
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:150
Interface class for the generator models.
Definition: GeneratorAlgorithms.h:111
static const double soil_albedo
Definition: GeneratorAlgorithms.h:164
std::string getAlgo() const
Definition: GeneratorAlgorithms.h:150
bool skipTimeStep(const Date &dt) const
Should this timestep be skipped, based on user-provided time restrictions?
Definition: GeneratorAlgorithms.cc:283
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:161
const std::set< std::string > excluded_stations
Definition: GeneratorAlgorithms.h:158
void initHeightRestrictions(const std::vector< std::pair< std::string, std::string > > vecArgs)
Definition: GeneratorAlgorithms.cc:198
const std::set< std::string > kept_stations
Definition: GeneratorAlgorithms.h:158
static std::set< std::string > initStationSet(const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &keyword)
Definition: GeneratorAlgorithms.cc:259
std::vector< DateRange > getTimeRestrictions() const
Definition: GeneratorAlgorithms.h:149
const std::vector< DateRange > time_restrictions
Definition: GeneratorAlgorithms.h:157
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:195
std::set< double > included_heights
Definition: GeneratorAlgorithms.h:159
std::set< double > excluded_heights
Definition: GeneratorAlgorithms.h:159
virtual ~GeneratorAlgorithm()
Definition: GeneratorAlgorithms.h:113
virtual bool generate(const size_t ¶m, MeteoData &md, const std::vector< MeteoData > &vecMeteo)=0
bool skipHeight(const double &height) const
Definition: GeneratorAlgorithms.cc:250
static const double snow_thresh
Definition: GeneratorAlgorithms.h:164
const std::string section
Definition: GeneratorAlgorithms.h:161
static const double default_height
Definition: GeneratorAlgorithms.h:165
bool all_heights
Definition: GeneratorAlgorithms.h:160
static const double snow_albedo
Definition: GeneratorAlgorithms.h:164
bool skipStation(const std::string &station_id) const
Should this station be skipped, based on user-provided station ID restrictions?
Definition: GeneratorAlgorithms.cc:275
virtual void parse_args(const std::vector< std::pair< std::string, std::string > > &)
Definition: GeneratorAlgorithms.h:153
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:108