sinergym.utils.rewards.ExpReward
- class sinergym.utils.rewards.ExpReward(env: gym.Env, temperature_variable: str | list, energy_variable: str, range_comfort_winter: Tuple[int, int], range_comfort_summer: Tuple[int, int], summer_start: Tuple[int, int] = (6, 1), summer_final: Tuple[int, int] = (9, 30), energy_weight: float = 0.5, lambda_energy: float = 0.0001, lambda_temperature: float = 1.0)
- __init__(env: gym.Env, temperature_variable: str | list, energy_variable: str, range_comfort_winter: Tuple[int, int], range_comfort_summer: Tuple[int, int], summer_start: Tuple[int, int] = (6, 1), summer_final: Tuple[int, int] = (9, 30), energy_weight: float = 0.5, lambda_energy: float = 0.0001, lambda_temperature: float = 1.0)
Reward considering exponential absolute difference to temperature comfort.
\[R = - W * lambda_E * power - (1 - W) * lambda_T * exp( (max(T - T_{low}, 0) + max(T_{up} - T, 0)) )\]- Parameters:
env (Env) – Gym environment.
temperature_variable (Union[str, list]) – Name(s) of the temperature variable(s).
energy_variable (str) – Name of the energy/power variable.
range_comfort_winter (Tuple[int,int]) – Temperature comfort range for cold season. Depends on environment you are using.
range_comfort_summer (Tuple[int,int]) – Temperature comfort range for hot season. Depends on environment you are using.
summer_start (Tuple[int,int]) – Summer session tuple with month and day start. Defaults to (6,1).
summer_final (Tuple[int,int]) – Summer session tuple with month and day end. defaults to (9,30).
energy_weight (float, optional) – Weight given to the energy term. Defaults to 0.5.
lambda_energy (float, optional) – Constant for removing dimensions from power(1/W). Defaults to 1e-4.
lambda_temperature (float, optional) – Constant for removing dimensions from temperature(1/C). Defaults to 1.0.
Methods
__init__
(env, temperature_variable, ...[, ...])Reward considering exponential absolute difference to temperature comfort.