fixed bug saving values
This commit is contained in:
parent
659df7079c
commit
99f2dea55f
|
@ -86,6 +86,7 @@ class DoeIdf:
|
||||||
days_index.append(len(days_schedules))
|
days_index.append(len(days_schedules))
|
||||||
|
|
||||||
# save schedule
|
# save schedule
|
||||||
|
values = []
|
||||||
for i, day_index in enumerate(days_index):
|
for i, day_index in enumerate(days_index):
|
||||||
if day_index == len(days_schedules):
|
if day_index == len(days_schedules):
|
||||||
break
|
break
|
||||||
|
@ -103,10 +104,10 @@ class DoeIdf:
|
||||||
entry = days_schedules[hours_values + 1]
|
entry = days_schedules[hours_values + 1]
|
||||||
schedules_day[f'{days_schedules[day_index]}'].append(entry)
|
schedules_day[f'{days_schedules[day_index]}'].append(entry)
|
||||||
|
|
||||||
values = []
|
|
||||||
for entry in schedules_day[f'{days_schedules[day_index]}']:
|
for entry in schedules_day[f'{days_schedules[day_index]}']:
|
||||||
values.append(entry)
|
values.append(entry)
|
||||||
|
|
||||||
|
print(values)
|
||||||
schedule.values = values
|
schedule.values = values
|
||||||
|
|
||||||
if 'Weekdays' in days_schedules[day_index]:
|
if 'Weekdays' in days_schedules[day_index]:
|
||||||
|
|
|
@ -10,7 +10,6 @@ from imports.usage_factory import UsageFactory
|
||||||
from imports.schedules_factory import SchedulesFactory
|
from imports.schedules_factory import SchedulesFactory
|
||||||
from imports.construction_factory import ConstructionFactory
|
from imports.construction_factory import ConstructionFactory
|
||||||
from exports.exports_factory import ExportsFactory
|
from exports.exports_factory import ExportsFactory
|
||||||
import helpers.constants as cte
|
|
||||||
|
|
||||||
|
|
||||||
class TestBuildings(TestCase):
|
class TestBuildings(TestCase):
|
||||||
|
@ -40,9 +39,7 @@ class TestBuildings(TestCase):
|
||||||
self.assertIsNot(len(usage_zone.schedules), 0, 'no usage_zones schedules defined')
|
self.assertIsNot(len(usage_zone.schedules), 0, 'no usage_zones schedules defined')
|
||||||
for schedule in usage_zone.schedules:
|
for schedule in usage_zone.schedules:
|
||||||
self.assertIsNotNone(schedule.type)
|
self.assertIsNotNone(schedule.type)
|
||||||
print(schedule.type)
|
|
||||||
self.assertIsNotNone(schedule.values)
|
self.assertIsNotNone(schedule.values)
|
||||||
print(schedule.values)
|
|
||||||
self.assertIsNotNone(schedule.data_type)
|
self.assertIsNotNone(schedule.data_type)
|
||||||
self.assertIsNotNone(schedule.time_step)
|
self.assertIsNotNone(schedule.time_step)
|
||||||
self.assertIsNotNone(schedule.time_range)
|
self.assertIsNotNone(schedule.time_range)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user