thermal_comfort.py 633 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. from abc import ABC, abstractmethod
  2. from typing import Optional
  3. import numpy as np
  4. from loguru import logger
  5. from app.schemas.diagnosis import FaultCategory
  6. class DiagnotorBase(ABC):
  7. def __init__(self):
  8. self._result = FaultCategory()
  9. def target_check(self, target: float) -> None:
  10. if np.isnan(target):
  11. self._result.no_target = True
  12. class ThermalComfortDiagnotor(DiagnotorBase):
  13. pass
  14. class FCUDiagnotor(DiagnotorBase):
  15. def __init__(self):
  16. super(FCUDiagnotor, self).__init__()
  17. class VAVDiagnotor(DiagnotorBase):
  18. pass
  19. class VRFDiagnotor(DiagnotorBase):
  20. pass