Example #1
0
            if 'Appliance' in labels:
                self._map_appliance_node(n)


# tests

if __name__ == '__main__':
    from pprint import pprint
    from bim_graph import BimGraph
    from energyplus_model import EnergyPlusModel

    print('TEST-BimToEpjsonMap.py')

    o = BimToIdfMap()
    g = BimGraph()
    g.read_pickle(r'../tests/bim_to_idf_map/detached_house.pickle')
    o.input_bim = g
    o.run()
    g1 = o.output_idf
    pprint(g1.graph_dict())

    g1.write_idf(r'../tests/bim_to_idf_map/detached_house.idf')

    o = EnergyPlusModel()
    epexe_fp = r'C:\EnergyPlusV8-9-0\EnergyPlus'
    idf_fp = r'../tests/bim_to_idf_map\detached_house.idf'
    epw_fp = r'C:\EnergyPlusV8-9-0\WeatherData\GBR_Birmingham.035340_IWEC.epw'
    out_fp = r'../tests/bim_to_idf_map\sim'
    o.run_energyplus(epexe_fp=epexe_fp,
                     idf_fp=idf_fp,
                     epw_fp=epw_fp,
                self._map_space(bim_node, eso_node)
            elif 'Surface' in bim_node.labels:
                self._map_surface(bim_node, eso_node)
            elif 'RoomHeater' in bim_node.labels:
                self._map_roomHeater(bim_node, eso_node)


# tests

if __name__ == '__main__':
    from pprint import pprint
    from eso_graph import EsoGraph
    from bim_graph import BimGraph

    print('TEST-EsoToBimMap.py')

    eso = EsoGraph()
    eso.read_eso(r'../tests/eso_to_bim_map/eplusout.eso')

    bim = BimGraph()
    bim.read_pickle(r'../tests/eso_to_bim_map/detached_house.pickle')

    o = EsoToBimMap()
    o.input_eso = eso
    o.bim = bim
    o.run()
    pprint(o.bim.Climate[0].properties)
    pprint(o.bim.Space[0].properties)
    o.bim.write_pickle(
        r'../tests/eso_to_bim_map/detached_house_with_eso.pickle')