def set_temperature(net, temp, celsius=True):
    """
    This function set the exterior temperature of the network
    :param net: a pandangas network
    :param temp: the tempeature in Celsius or Kelvin
    :param celsius: if True, the temperature is in Celsius otherwise in Kelvin
    """
    if celsius:
        net.temperature = temp + 273.15
    else:
        net.temperature = temp
