sinergym.utils.wrappers.NormalizeObservation

class sinergym.utils.wrappers.NormalizeObservation(env: Any, ranges: Dict[str, Sequence[Any]] = {'Facility Total HVAC Electricity Demand Rate (Whole Building)': [173.6583692738386, 32595.57259261767], 'People Air Temperature (SPACE1-1 PEOPLE 1)': [0.0, 30.00826655379267], 'Site Diffuse Solar Radiation Rate per Area (Environment)': [0.0, 588.0], 'Site Direct Solar Radiation Rate per Area (Environment)': [0.0, 1033.0], 'Site Outdoor Air Drybulb Temperature (Environment)': [- 31.05437255409474, 60.72839186915495], 'Site Outdoor Air Relative Humidity (Environment)': [3.0, 100.0], 'Site Wind Direction (Environment)': [0.0, 357.5], 'Site Wind Speed (Environment)': [0.0, 23.1], 'Space1-ClgSetP-RL': [21.0, 30.0], 'Space1-HtgSetP-RL': [15.0, 22.49999], 'Zone Air Relative Humidity (SPACE1-1)': [3.287277410867238, 87.60662171287048], 'Zone Air Temperature (SPACE1-1)': [15.22565264653451, 30.00826655379267], 'Zone People Occupant Count (SPACE1-1)': [0.0, 11.0], 'Zone Thermal Comfort Clothing Value (SPACE1-1 PEOPLE 1)': [0.0, 1.0], 'Zone Thermal Comfort Fanger Model PPD (SPACE1-1 PEOPLE 1)': [0.0, 98.37141259444684], 'Zone Thermal Comfort Mean Radiant Temperature (SPACE1-1 PEOPLE 1)': [0.0, 35.98853496778508], 'Zone Thermostat Cooling Setpoint Temperature (SPACE1-1)': [21.0, 30.0], 'Zone Thermostat Heating Setpoint Temperature (SPACE1-1)': [15.0, 22.49999046325684], 'comfort_penalty': [- 6.508266553792669, - 0.0], 'day': [1, 31], 'done': [False, True], 'hour': [0, 23], 'month': [1, 12], 'reward': [- 3.550779087370951, - 0.0086829184636919], 'time (seconds)': [0, 31536000], 'timestep': [0, 35040], 'total_power_no_units': [- 3.259557259261767, - 0.0173658369273838]})
__init__(env: Any, ranges: Dict[str, Sequence[Any]] = {'Facility Total HVAC Electricity Demand Rate (Whole Building)': [173.6583692738386, 32595.57259261767], 'People Air Temperature (SPACE1-1 PEOPLE 1)': [0.0, 30.00826655379267], 'Site Diffuse Solar Radiation Rate per Area (Environment)': [0.0, 588.0], 'Site Direct Solar Radiation Rate per Area (Environment)': [0.0, 1033.0], 'Site Outdoor Air Drybulb Temperature (Environment)': [- 31.05437255409474, 60.72839186915495], 'Site Outdoor Air Relative Humidity (Environment)': [3.0, 100.0], 'Site Wind Direction (Environment)': [0.0, 357.5], 'Site Wind Speed (Environment)': [0.0, 23.1], 'Space1-ClgSetP-RL': [21.0, 30.0], 'Space1-HtgSetP-RL': [15.0, 22.49999], 'Zone Air Relative Humidity (SPACE1-1)': [3.287277410867238, 87.60662171287048], 'Zone Air Temperature (SPACE1-1)': [15.22565264653451, 30.00826655379267], 'Zone People Occupant Count (SPACE1-1)': [0.0, 11.0], 'Zone Thermal Comfort Clothing Value (SPACE1-1 PEOPLE 1)': [0.0, 1.0], 'Zone Thermal Comfort Fanger Model PPD (SPACE1-1 PEOPLE 1)': [0.0, 98.37141259444684], 'Zone Thermal Comfort Mean Radiant Temperature (SPACE1-1 PEOPLE 1)': [0.0, 35.98853496778508], 'Zone Thermostat Cooling Setpoint Temperature (SPACE1-1)': [21.0, 30.0], 'Zone Thermostat Heating Setpoint Temperature (SPACE1-1)': [15.0, 22.49999046325684], 'comfort_penalty': [- 6.508266553792669, - 0.0], 'day': [1, 31], 'done': [False, True], 'hour': [0, 23], 'month': [1, 12], 'reward': [- 3.550779087370951, - 0.0086829184636919], 'time (seconds)': [0, 31536000], 'timestep': [0, 35040], 'total_power_no_units': [- 3.259557259261767, - 0.0173658369273838]})

Observations normalized to range [0, 1].

Parameters
  • env (Any) – Original Sinergym environment.

  • ranges (Dict[str, Sequence[Any]], optional) – Observation variables ranges to apply normalization (rely on environment). Defaults to RANGES_5ZONE.

Methods

__init__(env[, ranges])

Observations normalized to range [0, 1].

class_name()

close()

Override close in your subclass to perform any necessary cleanup.

compute_reward(achieved_goal, desired_goal, info)

get_unwrapped_obs()

Get last environment observation without normalization.

observation(obs)

Applies normalization to observation.

render([mode])

Renders the environment.

reset(**kwargs)

Resets the environment to an initial state and returns an initial observation.

seed([seed])

Sets the seed for this env's random number generator(s).

step(action)

Run one timestep of the environment's dynamics.

Attributes

action_space

metadata

observation_space

reward_range

spec

unwrapped

Completely unwrap this env.

get_unwrapped_obs() Optional[numpy.ndarray]

Get last environment observation without normalization.

Returns

Last original observation. If it is the first observation, this value is None.

Return type

Optional[np.ndarray]

observation(obs: numpy.ndarray) numpy.ndarray

Applies normalization to observation.

Parameters

obs (np.ndarray) – Original observation.

Returns

Normalized observation.

Return type

np.ndarray