Coverage for bim2sim/plugins/PluginEnergyPlus/bim2sim_energyplus/task/ep_visualize_results.py: 0%

13 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-03-12 17:09 +0000

1import logging 

2 

3from bim2sim.plugins.PluginEnergyPlus.bim2sim_energyplus.utils\ 

4 .utils_visualization import \ 

5 VisualizationUtils 

6from bim2sim.tasks.base import ITask 

7from bim2sim.utilities.common_functions import filter_elements 

8 

9logger = logging.getLogger(__name__) 

10 

11 

12class VisualizeResults(ITask): 

13 """ 

14 Visualize results of the EnergyPlus simulation. 

15 

16 See run function for more details. 

17 """ 

18 

19 reads = ('elements', 'sim_results_path') 

20 

21 def run(self, elements, sim_results_path): 

22 """Run EnergyPlus specific visualization. 

23 

24 This function is no longer maintained, please use the plot scripts 

25 based on the df_finals dataframe instead. 

26 This function creates images of a floor plan visualization and saves 

27 them as a .png file. 

28 

29 Args: 

30 elements (dict): dictionary in the format dict[guid: element], 

31 holds preprocessed elements including space boundaries. 

32 sim_results_path (Path): Path to simulation results. 

33: 

34 """ 

35 zone_list = filter_elements(elements, 'ThermalZone') 

36 zone_dict = {} 

37 for zone in zone_list: 

38 zone_dict[zone.guid] = zone 

39 VisualizationUtils.visualize_zones(zone_dict, sim_results_path / 

40 self.prj_name, self.paths) 

41