import numpy as np
num_days = 2
num_slots = num_days * 24
# Demands
# Temporal variation of predicted total demands (kW)
demands = np.array([
#[0am, 1am, 2am, 3am, 4am, 5am, 6am, 7am, 8am, 9am, 10am, 11am,
#12pm, 13pm, 14pm, 15pm, 16pm, 17pm, 18pm, 19pm, 20pm, 21pm, 22pm, 23pm]
[1.28, 0.82, 1.96, 0.44, 0.88, 1.82, 5.70, 7.40, 2.64, 2.72, 1.52, 2.10, # Day 1
1.20, 1.26, 4.00, 1.24, 2.36, 5.90, 5.92, 6.82, 8.86, 4.78, 1.08, 1.40],
[1.56, 1.02, 0.40, 1.26, 1.72, 1.72, 4.52, 7.32, 5.66, 1.26, 3.68, 3.20, # Day 2
3.54, 3.96, 1.28, 3.94, 2.98, 8.26, 5.5 , 6.46, 4.76, 6.32, 1.98, 0.58],
]) # fmt: skip
# Grid electricity
# Temporal variation of predicted electricity price in RTP (USD/kWh)
grid_electricity_price = np.array([
[0.15, 0.14, 0.14, 0.13, 0.13, 0.14, 0.17, 0.21, 0.25, 0.28, 0.30, 0.32, # Day 1
0.34, 0.36, 0.37, 0.39, 0.40, 0.42, 0.41, 0.38, 0.35, 0.32, 0.29, 0.25],
[0.16, 0.15, 0.15, 0.14, 0.14, 0.15, 0.18, 0.22, 0.26, 0.29, 0.31, 0.33, # Day 2
0.35, 0.37, 0.38, 0.40, 0.41, 0.43, 0.42, 0.39, 0.36, 0.33, 0.30, 0.27],
]) # fmt: skip
# Battery storage
battery_storage_capacity = 40 # Capacity of battery storage (kWh)
battery_storage_max_input_output = 20 # Maximum input/output of battery storage (kW)
# EV
battery_ev_capacity = 50 # Capacity of EV battery (kWh)
battery_ev_max_input = 50 # Maximum charge input of EV battery (kW)
# EV-chargeable hours (whether EV is parked at home (chargeable) at time t).
ev_parked_at_home = np.array([
[True, True, True, True, True, True, True, False, False, False, False, False, # Day 1
False, False, False, False, False, False, True, True, True, True, True, True, ],
[True, True, True, True, True, True, True, False, False, False, False, False, # Day 2
False, False, False, False, False, False, True, True, True, True, True, True, ],
]) # fmt: skip
# Solar power
solar_panel_efficiency = 0.2 # Solar panel efficiency
solar_irradiance = 0.2 # Solar irradiance (kW/m^2)
panel_area = 20 # Panel area (m^2)
# Temporal variation of predicted sunshine hours (hours)
sunshine_hours = np.array([
[0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.10, 0.30, 0.50, 0.70, 0.90, # Day 1
1.00, 1.00, 0.90, 0.70, 0.50, 0.30, 0.10, 0.00, 0.00, 0.00, 0.00, 0.00],
[0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.20, 0.40, 0.60, 0.80, 1.00, # Day 2
0.90, 0.80, 0.70, 0.50, 0.30, 0.10, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00],
]) # hours # fmt: skip
solar_power_max_supply = (
solar_panel_efficiency * solar_irradiance * panel_area * sunshine_hours
) # kW
assert len(np.ravel(demands)) == num_slots
assert len(np.ravel(grid_electricity_price)) == num_slots
assert len(np.ravel(ev_parked_at_home)) == num_slots
assert len(np.ravel(sunshine_hours)) == num_slots