-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
94 lines (87 loc) · 2.31 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
from dataclasses import dataclass
@dataclass
class WeatherConfig:
location: str
@dataclass
class SolarParkConfig:
total_capacity: float
inverter_capacity: float
performance_ratio: float
panel_efficiency: float
temp_coefficient: float
dust_factor: float
misc_losses: float
annual_degradation: float
@dataclass
class BatteryConfig:
capacity: float
initial_charge: float
efficiency: float
@dataclass
class EnergyProfileConfig:
pumps_power: float
programmer_power: float
dosing_pump_power: float
irrigation_months: list
staking_nodes: int
staking_power: float
cooling_efficiency: float
gpu_power: float
gpu_utilization_range: tuple
num_gpus: int
@dataclass
class SimulationConfig:
weather: WeatherConfig
solar_park: SolarParkConfig
battery: BatteryConfig
energy_profile: EnergyProfileConfig
capex: float
gpu_cost_per_unit: float
num_gpus: int
staking_rental_price: float
gpu_rental_price: float
year: int
default_config = SimulationConfig(
weather=WeatherConfig(
location="Beja, Portugal"
),
solar_park=SolarParkConfig(
total_capacity=947.52,
inverter_capacity=800,
performance_ratio=0.75,
panel_efficiency=0.2,
temp_coefficient=-0.0035,
dust_factor=0.98,
misc_losses=0.97,
annual_degradation=0.005
),
battery=BatteryConfig(
capacity=500,
initial_charge=250,
efficiency=0.9
),
energy_profile=EnergyProfileConfig(
pumps_power=90,
programmer_power=0.05,
dosing_pump_power=1,
irrigation_months=[3, 4, 5, 6, 7, 8, 9],
staking_nodes=32,
staking_power=36/24,
cooling_efficiency=0.4,
gpu_power=0.7,
gpu_utilization_range=(0.7, 0.9),
num_gpus=20
),
gpu_cost_per_unit=42000, # Estimate H100 price
num_gpus=20, #Temprorary fix
capex=1394000, # Estimate project const excluding GPUs
staking_rental_price=0.3 * 24 * 32 / 36 / 1.3, # per kWh per node
gpu_rental_price=2.5 / 0.7 / 1.3, # per kWh per unit
year = 2023,
)
def load_config(config_file=None):
if config_file:
# Load configuration from file
# This is a placeholder for future implementation
pass
return default_config