def _set_rack_count()

in analysis/GreenSKU-Framework/src/carbon_model.py [0:0]


    def _set_rack_count(self) -> None:
        """Set the number of racks in the data center."""
        rack_provisioned, rack_allocated = self.get_rack_power()
        power_rack_count = floor(self.get_dc_power_capacity() / rack_provisioned)
        capacity_rack_count = self.get_dc_capacity()
        if power_rack_count < capacity_rack_count:
            self.rack_count = power_rack_count
            self.power_limited = True
            if self.print_out:
                print(f"DC is power limited to: {self.rack_count} racks (rather than space limited to {capacity_rack_count})")
        else:
            self.rack_count = capacity_rack_count
            self.power_limited = False
            if self.print_out:
                print(f"DC is space limited to: {self.rack_count} racks (rather than power limited to {power_rack_count})")