Created
September 6, 2022 12:03
-
-
Save YannBerthelot/5c0c322c93f5d20a29aa384034766839 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
'Realistic' config to be used for testing | |
""" | |
import numpy as np | |
from easygrid.config.realistic_config import grid_config, mg_config | |
from easygrid.data.data_utils import DATA_FOLDER, get_indexes | |
from easygrid.types import BatteryConfig, LoadConfig, PvConfig | |
INDEXES = get_indexes(DATA_FOLDER) | |
LOAD = INDEXES["load"][3] # RefBldgPrimarySchoolNew2004_v1.3_7.1_2A_USA_TX_HOUSTON.csv | |
PV = INDEXES["pv"][0] | |
DURATION = 10 | |
CAPACITY = int(np.mean(LOAD) * DURATION) # Houston_722430TYA.csv | |
MAX_TIMESTEP = int(1e3) | |
battery_config: BatteryConfig = { | |
"capacity": CAPACITY, | |
"high_capacity": 0.9 * CAPACITY, | |
"low_capacity": 0.2 * CAPACITY, | |
"max_output": int(np.ceil(CAPACITY / DURATION)), | |
"min_output": 0, | |
"initial_energy": 0.2 * CAPACITY, | |
"overcharge_penalty": 1, | |
} | |
pv_config: PvConfig = { | |
"pv_production_ts": PV, | |
} | |
load_config: LoadConfig = { | |
"load_ts": LOAD, | |
} | |
config = { | |
"BATTERY": battery_config, | |
"MICROGRID": mg_config, | |
"GRID": grid_config, | |
"PV": pv_config, | |
"LOAD": load_config, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment