sinergym.utils.common

Common utilities.

Functions

convert_conf_to_env_parameters(conf)

Convert a conf from json format (sinergym/data/default_configuration/file.json) in a dictionary of all possible environments as dictionary with id as key and env_kwargs as value.

eppy_element_to_dict(element)

Given a eppy element, this function will create a dictionary using the name as key and the rest of fields as value.

export_schedulers_to_excel(schedulers, path)

Given a python dictionary with schedulers from modeling format, this method export that information in a excel file

get_delta_seconds(st_year, st_mon, st_day, ...)

Returns the delta seconds between st year:st mon:st day:0:0:0 and end year:end mon:end day:24:0:0.

is_wrapped(env, wrapper_class)

Check if a given environment has been wrapped with a given wrapper.

json_to_actuators(actuators)

Read actuators dictionary (from Sinergym JSON conf) and adapt it to the

json_to_meters(meters)

Read meters dictionary (from Sinergym JSON conf) and adapt it to the

json_to_variables(variables)

Read variables dictionary (from Sinergym JSON conf) and adapt it to the

ornstein_uhlenbeck_process(data, ...)

Add noise to the data using the Ornstein-Uhlenbeck process.

unwrap_wrapper(env, wrapper_class)

Retrieve a wrapper object by recursively searching.