rollback unwanted changes for unit test
This commit is contained in:
parent
480acc6552
commit
ec288f8db1
|
@ -4,6 +4,7 @@ SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2022 Concordia CERC group
|
Copyright © 2022 Concordia CERC group
|
||||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
"""
|
"""
|
||||||
|
from math import inf
|
||||||
from typing import Union, List
|
from typing import Union, List
|
||||||
from hub.city_model_structure.attributes.schedule import Schedule
|
from hub.city_model_structure.attributes.schedule import Schedule
|
||||||
|
|
||||||
|
@ -22,16 +23,14 @@ class ThermalControl:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _maximum_value(schedules):
|
def _maximum_value(schedules):
|
||||||
maximum = -1000
|
maximum = -inf
|
||||||
for schedule in schedules:
|
for schedule in schedules:
|
||||||
for value in schedule.values:
|
maximum = max(maximum, max(schedule.values))
|
||||||
if value > maximum:
|
|
||||||
maximum = value
|
|
||||||
return maximum
|
return maximum
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _minimum_value(schedules):
|
def _minimum_value(schedules):
|
||||||
minimum = 1000
|
minimum = inf
|
||||||
for schedule in schedules:
|
for schedule in schedules:
|
||||||
minimum = min(minimum, min(schedule.values))
|
minimum = min(minimum, min(schedule.values))
|
||||||
return minimum
|
return minimum
|
||||||
|
|
Loading…
Reference in New Issue
Block a user