in analysis/GreenSKU-Framework/src/carbon_model.py [0:0]
def get_rack_capacity(self, empty: bool=True) -> float:
"""Get the space capacity (# servers) of the rack."""
rack_capacity = self.config['rack']['capacity']
rack_capacity = strip_U(rack_capacity)
if not empty:
return rack_capacity
rack_capacity_used = 0
for component in self.data['rack']:
rack_capacity_used += strip_U(self.data['rack'][component]['capacity']) * self.data['rack'][component]['number']
return rack_capacity - rack_capacity_used