sinergym.utils.config.Config

class sinergym.utils.config.Config(idf_path, weather_path, env_name, max_ep_store, extra_config)

Config object to manage extra configuration in Sinergym experiments.

Parameters:
  • _idf_path – IDF path origin for apply extra configuration.

  • _weather_path – EPW path origin for apply weather to simulation.

  • _ddy_path – DDY path origin for get DesignDays and weather Location

  • experiment_path – Path for Sinergym experiment output

  • episode_path – Path for Sinergym specific episode (before first simulator reset this param is None)

  • extra_config – Number of episodes directories will be stored in experiment_path

  • config – Dict config with extra configuration which is required to modify IDF model (may be None)

  • _idd – IDD opyplus object to set up Epm

  • building – opyplus Epm object with IDF model

  • ddy_model – opyplus Epm object with DDY model

  • weather_data – opyplus WeatherData object with EPW data

__init__(idf_path, weather_path, env_name, max_ep_store, extra_config)

Methods

__init__(idf_path, weather_path, env_name, ...)

adapt_idf_to_epw([summerday, winterday])

Given a summer day name and winter day name from DDY file, this method modify IDF Location and DesingDay's in order to adapt IDF to EPW.

apply_extra_conf()

Set extra configuration in building model

apply_weather_variability([columns, variation])

Modify weather data using Ornstein-Uhlenbeck process.

save_building_model()

Take current building model and save as IDF in current env_working_dir episode folder.

set_episode_working_dir()

Set episode working dir path like config attribute for current simulation execution.

set_experiment_working_dir(env_name)

Set experiment working dir path like config attribute for current simulation.

Attributes

start_year

Returns the EnergyPlus simulation year.

adapt_idf_to_epw(summerday: str = 'Ann Clg .4% Condns DB=>MWB', winterday: str = 'Ann Htg 99.6% Condns DB')

Given a summer day name and winter day name from DDY file, this method modify IDF Location and DesingDay’s in order to adapt IDF to EPW.

Parameters:
  • summerday (str) – Design day for summer day specifically (DDY has several of them).

  • winterday (str) – Design day for winter day specifically (DDY has several of them).

apply_extra_conf()

Set extra configuration in building model

apply_weather_variability(columns: list = ['drybulb'], variation: tuple = None)

Modify weather data using Ornstein-Uhlenbeck process.

Parameters:
  • columns (list, optional) – List of columns to be affected. Defaults to [‘drybulb’].

  • variation (tuple, optional) – Tuple with the sigma, mean and tau for OU process. Defaults to None.

Returns:

New EPW file path generated in simulator working path in that episode

Return type:

str

save_building_model()

Take current building model and save as IDF in current env_working_dir episode folder.

Returns:

Path of IDF file stored (episode folder).

Return type:

str

set_episode_working_dir()

Set episode working dir path like config attribute for current simulation execution.

Raises:

Exception – If experiment path (parent folder) has not be created previously.

Returns:

Episode path for directory created.

Return type:

[srt]

set_experiment_working_dir(env_name)

Set experiment working dir path like config attribute for current simulation.

Parameters:

env_name (str) – simulation env name to define a name in directory

Returns:

Experiment path for directory created.

Return type:

[str]

property start_year

Returns the EnergyPlus simulation year.

Returns:

Simulation year.

Return type:

int