Skip to content

Commit

Permalink
(v3.1.6) - Sinergym Minor Update: environment action space calibratio…
Browse files Browse the repository at this point in the history
…n. (#382)

* Updated environments configuration (action spaces)

* Updated Sinergym version from 3.1.5 to 3.1.6
  • Loading branch information
AlejandroCN7 authored Jan 18, 2024
1 parent 9d0a260 commit 5cef3ac
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
}
},

"action_space" : "gym.spaces.Box(low=np.array([15.0, 22.5], dtype=np.float32), high=np.array([22.5, 30.0], dtype=np.float32), shape=(2,), dtype=np.float32)",
"action_space" : "gym.spaces.Box(low=np.array([15.0, 22.0], dtype=np.float32), high=np.array([22.0, 30.0], dtype=np.float32), shape=(2,), dtype=np.float32)",

"action_space_discrete" : "gym.spaces.Discrete(10)",

Expand Down
2 changes: 1 addition & 1 deletion sinergym/data/default_configuration/5ZoneAutoDXVAV.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
}
},

"action_space" : "gym.spaces.Box(low=np.array([15.0, 22.5], dtype=np.float32), high=np.array([22.5, 30.0], dtype=np.float32), shape=(2,), dtype=np.float32)",
"action_space" : "gym.spaces.Box(low=np.array([12.0, 23.5], dtype=np.float32), high=np.array([21.5, 40.0], dtype=np.float32), shape=(2,), dtype=np.float32)",

"action_space_discrete" : "gym.spaces.Discrete(10)",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
"perimeter_top_zn_4_air_temperature"
],
"energy_variables" : ["HVAC_electricity_demand_rate"],
"range_comfort_winter" : [18, 27],
"range_comfort_summer" : [18, 27],
"range_comfort_winter" : [20.0, 23.5],
"range_comfort_summer" : [23.0, 26.0],
"summer_start" : [6, 1],
"summer_final" : [9, 30],
"energy_weight" : 0.5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,37 +82,20 @@
"variable_name" : "Office_Cooling_RL",
"element_type" : "Schedule:Year",
"value_type" : "Schedule Value"
},
"Fine Storage Heating Setpoint Schedule" : {
"variable_name" : "FineStorage_Heating_RL",
"element_type" : "Schedule:Compact",
"value_type" : "Schedule Value"
},
"Fine Storage Cooling Setpoint Schedule" : {
"variable_name" : "FineStorage_Cooling_RL",
"element_type" : "Schedule:Compact",
"value_type" : "Schedule Value"
},
"Bulk Storage Heating Setpoint Schedule" : {
"variable_name" : "BulkStorage_Heating_RL",
"element_type" : "Schedule:Compact",
"value_type" : "Schedule Value"
}
},

"action_space" : "gym.spaces.Box(low=np.array([15.0, 22.5, 15.0, 22.5, 15.0], dtype=np.float32), high=np.array([22.5, 30.0, 22.5, 30.0, 22.5], dtype=np.float32) ,shape=(5,), dtype=np.float32)",
"action_space" : "gym.spaces.Box(low=np.array([15.0, 22.5], dtype=np.float32), high=np.array([22.5, 35.0], dtype=np.float32) ,shape=(2,), dtype=np.float32)",

"action_space_discrete" : "gym.spaces.Discrete(10)",

"reward" : "LinearReward",
"reward_kwargs" : {
"temperature_variables" : [
"zone1_office_air_temperature",
"zone2_fine_storage_air_temperature",
"zone3_bulk_storage_air_temperature"],
"zone1_office_air_temperature"],
"energy_variables" : ["HVAC_electricity_demand_rate"],
"range_comfort_winter" : [18, 27],
"range_comfort_summer" : [18, 27],
"range_comfort_winter" : [20.0, 23.5],
"range_comfort_summer" : [23.0, 26.0],
"summer_start" : [6, 1],
"summer_final" : [9, 30],
"energy_weight" : 0.5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"Zone People Occupant Count" : {
"variable_names" : "people_count",
"keys" : ["Basement", "core_bottom", "core_mid", "core_top",
"GroundFloor_Plenum", "MidFloor_Plenum", "TopFloor_Plenum",
"Perimeter_bot_ZN_1", "Perimeter_bot_ZN_2", "Perimeter_bot_ZN_3", "Perimeter_bot_ZN_4",
"Perimeter_mid_ZN_1", "Perimeter_mid_ZN_2", "Perimeter_mid_ZN_3", "Perimeter_mid_ZN_4",
"Perimeter_top_ZN_1", "Perimeter_top_ZN_2", "Perimeter_top_ZN_3", "Perimeter_top_ZN_4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
}
},

"action_space" : "gym.spaces.Box(low=np.array([15.0, 22.5], dtype=np.float32), high=np.array([22.5, 30.0], dtype=np.float32), shape=(2,), dtype=np.float32)",
"action_space" : "gym.spaces.Box(low=np.array([10.0, 22.5], dtype=np.float32), high=np.array([22.5, 35.0], dtype=np.float32), shape=(2,), dtype=np.float32)",

"action_space_discrete" : "gym.spaces.Discrete(10)",

Expand Down
40 changes: 20 additions & 20 deletions sinergym/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ def DEFAULT_5ZONE_DISCRETE_FUNCTION(action: int) -> List[float]:
action = int(action.item())

mapping = {
0: [15, 30],
1: [16, 29],
2: [17, 28],
3: [18, 27],
4: [19, 26],
5: [20, 25],
6: [21, 24],
7: [22, 23],
8: [22, 22.5],
9: [21, 22.5]
0: [13, 37],
1: [14, 34],
2: [15, 32],
3: [16, 30],
4: [17, 30],
5: [18, 30],
6: [19, 27],
7: [20, 26],
8: [21, 25],
9: [21, 24]
}

return mapping[action]
Expand Down Expand Up @@ -90,16 +90,16 @@ def DEFAULT_WAREHOUSE_DISCRETE_FUNCTION(action: int) -> List[float]:
action = int(action.item())

mapping = {
0: [15, 30, 15, 30, 15],
1: [16, 29, 16, 29, 16],
2: [17, 28, 17, 28, 17],
3: [18, 27, 18, 27, 18],
4: [19, 26, 19, 26, 19],
5: [20, 25, 20, 25, 20],
6: [21, 24, 21, 24, 21],
7: [22, 23, 22, 23, 22.5],
8: [22, 22.5, 22, 22.5, 22.5],
9: [21, 22.5, 21, 22.5, 22.5]
0: [15, 30],
1: [16, 29],
2: [17, 28],
3: [18, 27],
4: [19, 26],
5: [20, 25],
6: [21, 24],
7: [22, 23],
8: [22, 22.5],
9: [21, 22.5]
}

return mapping[action]
Expand Down
2 changes: 1 addition & 1 deletion sinergym/utils/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ def __init__(self, env):

def action(self, act: np.ndarray) -> np.ndarray:
"""Due to Charge rate and Discharge rate can't be more than 0.0 simultaneously (in OfficeGridStorageSmoothing.epJSON),
this wrapper clips one of the to 0.0 when both have a value upper than 0.0 (randomly).
this wrapper clips one of them to 0.0 when both have a value upper than 0.0 (randomly).
Args:
act (np.ndarray): Action to be clipped
Expand Down
2 changes: 1 addition & 1 deletion sinergym/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.5
3.1.6

0 comments on commit 5cef3ac

Please sign in to comment.