Coverage for teaser/examples/e10_adjust_schedules.py: 0%
18 statements
« prev ^ index » next coverage.py v7.4.4, created at 2025-04-29 16:01 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2025-04-29 16:01 +0000
1from teaser.project import Project
4def example_adjust_schedules():
5 """"This function demonstrates the adjustment of default schedules for
6 - adjusted_opening_times
7 - first_saturday_of_year
8 - profiles_weekend_factor
9 - set_back_times
10 - heating_set_back
11 - cooling_set_back
12 for an residential building using calc_adj_schedules function"""
14 # First part is only archetype creation, see e1_generate_archetype.py
15 prj = Project()
16 prj.name = "ArchetypeExample"
18 prj.add_residential(
19 construction_data='iwu_heavy',
20 geometry_data='iwu_single_family_dwelling',
21 name="ResidentialBuilding",
22 year_of_construction=1988,
23 number_of_floors=2,
24 height_of_floors=3.2,
25 net_leased_area=200.0
26 )
28 # get the thermalzone of the building (only one exists)
29 tz = prj.buildings[0].thermal_zones[0]
31 # get the use condition of the thermalzone
32 use_cond = tz.use_conditions
34 # set attributes for the adjustments. There are adjustments available for
35 # heating and cooling profiles, weekends and opening times.
37 # lets start with heating and cooling profiles:
38 # first set the set back times. First value is the first hour the set back
39 # is applied to, last value the last hour.
40 use_cond.set_back_times = [5, 22]
41 # now the the set back values in kelvin
42 use_cond.heating_set_back = -2
43 use_cond.cooling_set_back = 3
45 # now set adjustments for weekend
46 # Set the weekday number of first saturday of the year, this is needed to
47 # calc which days of profile should be reduced by profiles_weekend_factor.
48 use_cond.first_saturday_of_year = 4
49 # set the factor to reduce the weekend profile. For a reduction use
50 # values between [0;1]. Increase is also possible.
51 use_cond.profiles_weekend_factor = 0.4
53 # now set the adjusted opening times
54 # Set the first and last hour of opening. These will cut or extend the
55 # existing profiles (machines, lights, persons).
56 use_cond.adjusted_opening_times = [10, 15]
58 # Finally calculate the adjusted schedules
59 use_cond.calc_adj_schedules()
61 return prj
64if __name__ == '__main__':
65 prj = example_adjust_schedules()
67 print("Example 10: That's it! :)")