Пример #1
0
    def __init__(self, projects_group, path_nwp, nwp_resolution, path_nwp_group, dates_ts, area_group, njobs=1):
        self.path_nwp = path_nwp
        self.path_nwp_group = path_nwp_group
        self.nwp_resolution = nwp_resolution
        self.area = area_group
        self.projects_group = projects_group
        self.njobs = njobs

        self.logger = create_logger(logger_name='log_ecmwf', abs_path=self.path_nwp_group,
                                    logger_path='log_nwp.log', write_type='a')
        self.dates_ts = dates_ts if isinstance(dates_ts, pd.Timestamp) else self.define_dates(dates_ts)
Пример #2
0
    def __init__(self, projects_group, path_nwp, nwp_resolution, path_nwp_group, dates_ts, area_group, n_jobs=1):
        self.path_nwp = path_nwp
        self.path_nwp_group = path_nwp_group
        self.nwp_resolution = nwp_resolution
        self.area = area_group
        self.projects_group = projects_group
        self.n_jobs = n_jobs

        self.logger = create_logger(logger_name=f'log_skiron', abs_path=self.path_nwp_group,
                                    logger_path='log_nwp.log', write_type='a')
        self.dates_ts = self.define_dates(dates_ts)
    def __init__(self, static_data):
        """

        Parameters
        ----------
        static_data: python dict
            contains all the information required to load the power measurement for specific project(s).
        """
        self.static_data = static_data  # dict containing information about project paths, model structure and training
        # params, input file, see in util_database_timos.py and config_timos.py
        self.file_data = static_data[
            'data_file_name']  # input .csv file PROBLEM_TYPE + '_ts.csv' i.e. wind_ts.csv
        self.project_owner = static_data[
            'project_owner']  # Name of project owner or research program i.e. my_projects or CROSSBOW
        self.projects_group = static_data[
            'projects_group']  # Name of the country
        self.area_group = static_data[
            'area_group']  # coordinates of the country
        self.version_group = static_data['version_group']
        self.version_model = static_data['version_model']
        self.weather_in_data = static_data[
            'weather_in_data']  # True if input file contains more columns than the power output column
        self.nwp_model = static_data['NWP_model']
        self.nwp_resolution = static_data['NWP_resolution']
        self.data_variables = static_data[
            'data_variables']  # Variable names used

        self.projects = [
        ]  # list containing all the parks, we're interested in. Each park is considered as a project.
        self.use_rated = True

        self.model_type = self.static_data['type']
        self.sys_folder = self.static_data['sys_folder']
        self.path_nwp = self.static_data['path_nwp']
        self.path_group = self.static_data['path_group']
        self.path_nwp_group = self.static_data['path_nwp_group']
        self.group_static_data = []
        self.logger = create_logger(
            logger_name=f'ProjectInitManager_{self.model_type}',
            abs_path=self.path_group,
            logger_path=f'log_{self.projects_group}.log',
            write_type='a')
    def __init__(self, projects_group, projects, data, path_nwp, nwp_model, nwp_resolution, data_variables, njobs=1,
                 test=False, dates=None):
        self.projects = projects
        self.is_for_test = test
        self.projects_group = projects_group
        self.data = data
        self.path_nwp = path_nwp
        self.nwp_model = nwp_model
        self.nwp_resolution = nwp_resolution
        self.compress = True if self.nwp_resolution == 0.05 else False

        self.n_jobs = njobs
        self.variables = data_variables

        self.logger = create_logger(logger_name=__name__, abs_path=self.path_nwp,
                                    logger_path=f'log_{self.projects_group}.log', write_type='a')
        if not self.data is None:
            self.dates = self.check_dates()
        elif not dates is None:
            self.dates = dates
Пример #5
0
    def __init__(self, static_data):
        self.istrained = False
        self.add_individual_rules = static_data['clustering'][
            'add_rules_indvidual']
        self.import_external_rules = static_data['clustering'][
            'import_external_rules']
        self.njobs = static_data['clustering']['njobs']
        self.resampling = static_data['resampling']
        self.path_fuzzy = static_data['path_fuzzy_models']
        self.file_fuzzy = static_data['clustering']['cluster_file']
        self.type = static_data['type']

        self.static_data = static_data
        self.logger = create_logger(logger_name='log_fuzzy.log',
                                    abs_path=self.path_fuzzy,
                                    logger_path='log_fuzzy.log',
                                    write_type='w')
        try:
            self.load()
        except:
            pass
    def __init__(self, static_data, is_test: bool):
        self.is_test = is_test
        self.static_data = static_data
        self.projects = ProjectGroupInit(self.static_data)
        self.projects.initialize()
        self.model_type = self.projects.model_type
        self.path_group = self.projects.path_group
        self.projects_group = self.projects.projects_group
        self.data = self.projects.data
        if not hasattr(self, 'data_eval') and hasattr(self.projects,
                                                      'data_eval'):
            self.data_eval = self.projects.data_eval
        self.data_variables = self.projects.data_variables
        # List of dicts. Each dict has information about a different project
        self.group_static_data = self.projects.group_static_data

        self.logger = create_logger(
            logger_name=f'ProjectsDataManager_{self.model_type}',
            write_type='a',
            abs_path=self.path_group,
            logger_path=f'log_{self.projects_group}.log')
Пример #7
0
    def __init__(self, static_data, is_test=False):
        self.is_test = is_test
        self.static_data = static_data
        self.file_data = static_data['data_file_name']
        self.project_owner = static_data['project_owner']
        self.projects_group = static_data['projects_group']
        self.area_group = static_data['area_group']
        self.version_group = static_data['version_group']
        self.version_model = static_data['version_model']
        self.weather_in_data = static_data['weather_in_data']
        self.nwp_model = static_data['NWP_model']
        self.nwp_resolution = static_data['NWP_resolution']
        self.data_variables = static_data['data_variables']

        self.model_type = self.static_data['type']
        self.sys_folder = self.static_data['sys_folder']
        self.path_nwp = self.static_data['path_nwp']
        self.path_group = self.static_data['path_group']
        self.path_nwp_group = self.static_data['path_nwp_group']

        self.logger = create_logger(
            logger_name=f'NwpManager_{self.model_type}',
            abs_path=self.path_group,
            logger_path='log_nwp.log')