Skip to content

cooler

Cooler

Cooler(capex, max_heat_uptake)

A class that represents a cooler.

Parameters:

Name Type Description Default
capex int

Capital expenditure of the cooler.

required
max_heat_uptake int

Maximum heat the cooler can compensate [kW].

required
Source code in src/bsm2_python/energy_management/cooler.py
def __init__(self, capex: int, max_heat_uptake: int):
    self.capex = capex
    self.max_heat_uptake = max_heat_uptake
    self._consumption = np.array([0.0])
    self._products = np.array([0.0])
    self._load = 0.0

calculate_load

calculate_load(heat_surplus)

Calculate the load of the cooler based on the heat surplus.

Parameters:

Name Type Description Default
heat_surplus float

The heat surplus that the cooler has to compensate [kW].

required

Returns:

Type Description
float

The load of the cooler [-].

Source code in src/bsm2_python/energy_management/cooler.py
def calculate_load(self, heat_surplus: float) -> float:
    """Calculate the load of the cooler based on the heat surplus.

    Parameters
    ----------
    heat_surplus : float
        The heat surplus that the cooler has to compensate [kW].

    Returns
    -------
    float
        The load of the cooler [-].
    """

    if heat_surplus == 0.0:
        return 0.0
    elif heat_surplus > self.max_heat_uptake:
        return 1.0
    else:
        return float(heat_surplus / self.max_heat_uptake)

produce

produce()

Returns the production of the cooler. Cooler does not produce anything, only here to satisfy the Module interface.

Source code in src/bsm2_python/energy_management/cooler.py
@staticmethod
def produce() -> np.ndarray:
    """Returns the production of the cooler.
    Cooler does not produce anything, only here to satisfy the Module interface.
    """

    return np.array([0.0])

consume

consume()

Returns the consumption of the cooler.

Returns:

Type Description
ndarray

Consumption of the cooler [kW].

[heat]

Source code in src/bsm2_python/energy_management/cooler.py
def consume(self) -> np.ndarray:
    """Returns the consumption of the cooler.

    Returns
    -------
    np.ndarray
        Consumption of the cooler [kW]. \n
        [heat]
    """

    return np.array([self._load * self.max_heat_uptake])

calculate_maintenance_time

calculate_maintenance_time()

Returns the maintenance time of the cooler.
(Currently not implemented)

Source code in src/bsm2_python/energy_management/cooler.py
@staticmethod
def calculate_maintenance_time() -> float:
    """Returns the maintenance time of the cooler. <br>
    (Currently not implemented)
    """

    return 0.0

check_failure

check_failure()

Returns if the cooler has failed.
(Currently not implemented)

Source code in src/bsm2_python/energy_management/cooler.py
@staticmethod
def check_failure() -> bool:
    """Returns if the cooler has failed. <br>
    (Currently not implemented)
    """

    return False