|
| 1 | +# coding=utf-8 |
| 2 | +# Copyright 2024 The TensorFlow Datasets Authors. |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +"""Single location for all constants related to the simulation and RL environment. |
| 17 | +
|
| 18 | +Copyright 2022 Google LLC |
| 19 | +
|
| 20 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 21 | +you may not use this file except in compliance with the License. |
| 22 | +You may obtain a copy of the License at |
| 23 | +
|
| 24 | + https://www.apache.org/licenses/LICENSE-2.0 |
| 25 | +
|
| 26 | +Unless required by applicable law or agreed to in writing, software |
| 27 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 28 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 29 | +See the License for the specific language governing permissions and |
| 30 | +limitations under the License. |
| 31 | +""" |
| 32 | + |
| 33 | +# --------- Thermal Constants --------------- |
| 34 | + |
| 35 | +AIR_HEAT_CAPACITY = 1006.0 # J/kg/K, standard atmosphere |
| 36 | +WATER_HEAT_CAPACITY = 4180.0 # J/kg/K |
| 37 | +WATER_VAPOR_HEAT_CAPACITY = 1863.8 # J/kg/K |
| 38 | + |
| 39 | +# --------- Energy Constants --------------- |
| 40 | +BTU_PER_KWH: float = 3412.4 |
| 41 | +JOULES_PER_KWH: float = 3.6e6 |
| 42 | +JOULES_PER_BTU: float = 1055.06 |
| 43 | +W_PER_KW: float = 1000.0 # Number of Watts in a kW. |
| 44 | +WATTS_PER_BTU_HR: float = 0.29307107 # Number of Watts in a BTU/hr |
| 45 | +HZ_PERCENT: float = 100.0 / 60.0 # Converts blower/pump Hz to Percentage Power |
| 46 | + |
| 47 | +# https://www.rapidtables.com/convert/power/hp-to-watt.html |
| 48 | +WATTS_PER_HORSEPOWER = 746.0 |
| 49 | + |
| 50 | +# Natural gas energy conversion. |
| 51 | +# Sources: |
| 52 | +# http://www.kylesconverter.com/energy,-work,-and-heat/kilowatt--hours-to-cubic-feet-of-natural-gas#293.07 |
| 53 | +# https://www.traditionaloven.com/tutorials/energy/convert-cubic-foot-natural-gas-to-kilo-watt-hr-kwh.html |
| 54 | +KWH_PER_KFT3_GAS = 293.07107 # kWh / 1000 cubic feet natural gas |
| 55 | + |
| 56 | +# Natural gas CO2 emission. |
| 57 | +# Source: https://www.eia.gov/environment/emissions/co2_vol_mass.php |
| 58 | +GAS_CO2 = 53.12 # kg/1000 cubic feet |
| 59 | + |
| 60 | +WATER_DENSITY = 1000.0 # kg/m3 |
| 61 | +GRAVITY = 9.8 # m/s2 |
| 62 | + |
| 63 | +# ------------ File Name Convention ----------------- |
| 64 | +NORMALIZATION_FILENAME = 'normalization_info' |
| 65 | +OBSERVATION_RESPONSE_FILE_PREFIX = 'observation_response' |
| 66 | +ACTION_RESPONSE_FILE_PREFIX = 'action_response' |
| 67 | +IMAGES_DIR = 'images' |
| 68 | +BUILDING_IMAGE_CSV_FILE = 'building_images.csv' |
| 69 | +REWARD_INFO_PREFIX = 'reward_info' |
| 70 | +REWARD_RESPONSE_PREFIX = 'reward_response' |
| 71 | +DEVICE_INFO_PREFIX = 'device_info' |
| 72 | +ZONE_INFO_PREFIX = 'zone_info' |
0 commit comments