pyenergyplus / witheppy

Python packages built using eppy
MIT License
8 stars 2 forks source link

Single function to copy an HVAC system from on IDF to another IDF #59

Open santoshphilip opened 1 year ago

santoshphilip commented 1 year ago

Single function to copy an HVAC system from on IDF to another IDF

Use Case:

copy_hvac(from_idf, to_idf)

The copy_hvac(from_idf, to_idf) function will need the following functions

How these can be used implement copy_hvac(from_idf, to_idf)

def copy_hvac(from_idf, to_idf):
    nohvac_idf = hvac_remover(to_idf)
    fromhvac = hvac_extractor(from_idf)
    from_thermostats = thermostat_extractor(from_idf)
    to_thermostats = thermostat_extractor(to_idf)

    # there may be a mismatch in the number of 
    # conditioned zones of from_idf and to_idf
    # compare the from_thermostats and to_thermostats to see the diff

    if to_idf_has_more_zones:
        for number of more zones:
            tohvac = zone_hvac_adder( .... )
    elif from_idf_has_less_zones
        for number of less zones:
            fromhvac = zone_hvac_adder( ... )
    else:
        pass

    return hvac_inserter(nohvac_idf, tohvac)
santoshphilip commented 1 year ago

copy_hvac(from_idf, to_idf) is not the best name for this functionality. This function does not just copy the HVAC. It replaces the existing HVAC. So a more descriptive name would be replace_hvac(from_idf, to_idf)