Exemple #1
0
    def plot_timeseries(self,
                        space_heating=True,
                        hot_water=True,
                        total=True,
                        xticks=('month', 3)):
        """
		"""

        if space_heating:
            fig_name = '{}/SpaceHeatingDemand_{}.png'.format(
                self.result_dir, self.rid)

            UrbanHeatPro.plot_timeseries(self.dt_vector, \
              [self.space_heating_power], ['Space heating demand'], \
              fig_name, xticks = xticks, \
              ynumticks = 'auto', ylabel = 'Power [kW]', ylim0 = True, yfactor = 1e3)

        if hot_water:
            fig_name = '{}/HotWaterDemand_{}.png'.format(
                self.result_dir, self.rid)

            UrbanHeatPro.plot_timeseries(self.dt_vector, \
              [self.hot_water_power], ['Hot water demand'], \
              fig_name, xticks = xticks, \
              ynumticks = 'auto', ylabel = 'Power [kW]', ylim0 = True, yfactor = 1e3)

        if total:
            fig_name = '{}/TotalHeatDemand_{}.png'.format(
                self.result_dir, self.rid)

            UrbanHeatPro.plot_stacked_timeseries(self.dt_vector, \
              [self.hot_water_power, self.space_heating_power], \
              ['Hot water', 'Space heating'], \
              fig_name, xticks = xticks, \
              ynumticks = 'auto', ylabel = 'Power [kW]', ylim0 = True, yfactor = 1e3)
Exemple #2
0
	def plot_timeseries(self, \
				space_heating = True, Tb = False, \
				hot_water = True, \
				total = True):
		"""
		Plots heat demand timeseries
		"""
		
		if space_heating:
			fig_name = '{}/SpaceHeatingDemand_{}_{}_{}_{}.png'.format(self.result_dir, \
							self.use[0], self.year_class[0], self.btype[0], self.bid)
			
			UrbanHeatPro.plot_timeseries(self.dt_vector, \
					[self.space_heating_power], ['Space heating demand'], \
					fig_name, xticks = ('month', 3), \
					ynumticks = 'auto', ylabel = 'Power [kW]', ylim0 = True, yfactor = 1e3)
				
		if Tb:
			fig_name = '{}/BuildingTemperature_{}_{}_{}_{}.png'.format(self.result_dir, \
							self.use[0], self.year_class[0], self.btype[0], self.bid)
			
			UrbanHeatPro.plot_timeseries(self.dt_vector, \
			[self.Tamb, self.Tb], ['T_amb', 'T_b'], \
					fig_name, xticks = ('month', 3), \
					ynumticks = 'auto', ylabel = 'Temperature [degC]', ylim0 = False, yfactor = 1)
									
		if hot_water:
			fig_name = '{}/HotWaterDemand_{}_{}_{}_{}.png'.format(self.result_dir, \
							self.use[0], self.year_class[0], self.btype[0], self.bid)
			
			UrbanHeatPro.plot_timeseries(self.dt_vector, \
					[self.hot_water_power], ['Hot water demand'], \
					fig_name, xticks = ('month', 3), \
					ynumticks = 'auto', ylabel = 'Power [kW]', ylim0 = True, yfactor = 1e3)

		if total:
			fig_name = '{}/TotalHeatDemand_{}_{}_{}_{}.png'.format(self.result_dir, \
							self.use[0], self.year_class[0], self.btype[0], self.bid)
			
			UrbanHeatPro.plot_stacked_timeseries(self.dt_vector, \
					[self.hot_water_power, self.space_heating_power], \
					['Hot water', 'Space heating'], \
					fig_name, xticks = ('month', 3), \
					ynumticks = 'auto', ylabel = 'Power [kW]', ylim0 = True, yfactor = 1e3)	
    def plot_power(self, space_heating=True, hot_water=True, total=True):
        """
		Plot min, max, and mean power values for each time step.
		"""
        if space_heating:
            min = self.space_heating_power.min(axis=1)
            max = self.space_heating_power.max(axis=1)
            mean = self.space_heating_power.mean(axis=1)

            fig_name = '{}/SpaceHeatingDemand_ts.png'.format(self.result_dir)

            UrbanHeatPro.plot_timeseries(self.dt_vector, \
              [min, max, mean], ['min', 'max', 'mean'], \
              fig_name, xticks = ('month', 3), \
              ynumticks = 'auto', ylabel = 'Space Heating Demand [MW]', ylim0 = True, yfactor = 1e6)

        if hot_water:
            min = self.hot_water_power.min(axis=1)
            max = self.hot_water_power.max(axis=1)
            mean = self.hot_water_power.mean(axis=1)

            fig_name = '{}/HotWaterDemand_ts.png'.format(self.result_dir)

            UrbanHeatPro.plot_timeseries(self.dt_vector, \
              [min, max, mean], ['min', 'max', 'mean'], \
              fig_name, xticks = ('month', 3), \
              ynumticks = 'auto', ylabel = 'Hot Water Demand [MW]', ylim0 = True, yfactor = 1e6)

        if total:
            min = self.total_power.min(axis=1)
            max = self.total_power.max(axis=1)
            mean = self.total_power.mean(axis=1)

            fig_name = '{}/TotalHeatDemand_ts.png'.format(self.result_dir)

            UrbanHeatPro.plot_timeseries(self.dt_vector, \
              [min, max, mean], ['min', 'max', 'mean'], \
              fig_name, xticks = ('month', 3), \
              ynumticks = 'auto', ylabel = 'Heat Demand [MW]', ylim0 = True, yfactor = 1e6)