comfio 0.1.2__tar.gz → 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. {comfio-0.1.2 → comfio-0.1.4}/.gitignore +10 -0
  2. {comfio-0.1.2 → comfio-0.1.4}/CITATION.cff +2 -2
  3. {comfio-0.1.2 → comfio-0.1.4}/PKG-INFO +2 -2
  4. {comfio-0.1.2 → comfio-0.1.4}/pyproject.toml +2 -2
  5. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/__init__.py +7 -1
  6. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/thermal_personal.py +202 -0
  7. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/utils/units.py +3 -1
  8. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_thermal_personal.py +84 -0
  9. {comfio-0.1.2 → comfio-0.1.4}/CHANGELOG.md +0 -0
  10. {comfio-0.1.2 → comfio-0.1.4}/LICENSE +0 -0
  11. {comfio-0.1.2 → comfio-0.1.4}/README.md +0 -0
  12. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/core/__init__.py +0 -0
  13. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/core/data_handler.py +0 -0
  14. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/core/exceptions.py +0 -0
  15. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/__init__.py +0 -0
  16. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/acoustic.py +0 -0
  17. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/acoustic_advanced.py +0 -0
  18. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/iaq.py +0 -0
  19. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/iaq_advanced.py +0 -0
  20. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/iaq_pollutants.py +0 -0
  21. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/thermal.py +0 -0
  22. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/thermal_adaptive.py +0 -0
  23. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/thermal_spmv.py +0 -0
  24. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/thermal_tsv.py +0 -0
  25. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/visual.py +0 -0
  26. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/domains/visual_advanced.py +0 -0
  27. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/integration/__init__.py +0 -0
  28. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/integration/global_ieq.py +0 -0
  29. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/integration/weights.py +0 -0
  30. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/llm/__init__.py +0 -0
  31. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/llm/interpreters.py +0 -0
  32. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/llm/prompts.py +0 -0
  33. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/llm/tools.py +0 -0
  34. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/ml/__init__.py +0 -0
  35. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/ml/keras_adapter.py +0 -0
  36. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/ml/sklearn_transformers.py +0 -0
  37. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/ml/torch_dataset.py +0 -0
  38. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/performance/__init__.py +0 -0
  39. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/performance/contract_schema.py +0 -0
  40. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/performance/contracts.py +0 -0
  41. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/utils/__init__.py +0 -0
  42. {comfio-0.1.2 → comfio-0.1.4}/src/comfio/utils/validation.py +0 -0
  43. {comfio-0.1.2 → comfio-0.1.4}/tests/conftest.py +0 -0
  44. {comfio-0.1.2 → comfio-0.1.4}/tests/test_core/test_data_handler.py +0 -0
  45. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_acoustic.py +0 -0
  46. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_acoustic_advanced.py +0 -0
  47. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_iaq.py +0 -0
  48. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_iaq_advanced.py +0 -0
  49. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_iaq_pollutants.py +0 -0
  50. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_thermal.py +0 -0
  51. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_thermal_adaptive.py +0 -0
  52. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_thermal_spmv.py +0 -0
  53. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_thermal_tsv.py +0 -0
  54. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_visual.py +0 -0
  55. {comfio-0.1.2 → comfio-0.1.4}/tests/test_domains/test_visual_advanced.py +0 -0
  56. {comfio-0.1.2 → comfio-0.1.4}/tests/test_integration/test_global_ieq.py +0 -0
  57. {comfio-0.1.2 → comfio-0.1.4}/tests/test_integration/test_global_ieq_new.py +0 -0
  58. {comfio-0.1.2 → comfio-0.1.4}/tests/test_llm/test_interpreters.py +0 -0
  59. {comfio-0.1.2 → comfio-0.1.4}/tests/test_llm/test_prompts.py +0 -0
  60. {comfio-0.1.2 → comfio-0.1.4}/tests/test_llm/test_tools.py +0 -0
  61. {comfio-0.1.2 → comfio-0.1.4}/tests/test_ml/test_keras.py +0 -0
  62. {comfio-0.1.2 → comfio-0.1.4}/tests/test_ml/test_sklearn.py +0 -0
  63. {comfio-0.1.2 → comfio-0.1.4}/tests/test_ml/test_torch.py +0 -0
  64. {comfio-0.1.2 → comfio-0.1.4}/tests/test_performance/test_contracts.py +0 -0
  65. {comfio-0.1.2 → comfio-0.1.4}/tests/test_utils/test_units.py +0 -0
  66. {comfio-0.1.2 → comfio-0.1.4}/tests/test_utils/test_validation.py +0 -0
@@ -38,9 +38,19 @@ Thumbs.db
38
38
  # Windsurf internal
39
39
  .windsurf/
40
40
 
41
+ # Website build artifacts (comfio.com has its own .gitignore)
42
+ comfio.com/node_modules/
43
+ comfio.com/.next/
44
+ comfio.com/out/
45
+
46
+ # SoftwareX paper (separate repo: comfio-softwareX)
47
+ comfio-softwareX/
48
+
41
49
  # Temp files
42
50
  task.txt
43
51
  test_output.txt
52
+ test_results.txt
53
+ test_run.txt
44
54
  improvment.txt
45
55
  LLM_plan.txt
46
56
  instructions/
@@ -3,7 +3,7 @@ message: "If you use comfio in your research, please cite it as below. A formal
3
3
  title: "comfio: A Multi-Domain IEQ & Performance Contract Framework for Smart Buildings"
4
4
  type: software
5
5
  authors:
6
- - name: "comfio Contributors"
6
+ - name: "Nibras Abo Alzahab"
7
7
  repository-code: "https://github.com/NibrasAz7/comfio"
8
8
  url: "https://github.com/NibrasAz7/comfio"
9
9
  version: "0.1.0"
@@ -22,6 +22,6 @@ preferred-citation:
22
22
  type: software
23
23
  title: "comfio: A Multi-Domain IEQ & Performance Contract Framework for Smart Buildings"
24
24
  authors:
25
- - name: "comfio Contributors"
25
+ - name: "Nibras Abo Alzahab"
26
26
  year: 2025
27
27
  url: "https://github.com/NibrasAz7/comfio"
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfio
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Multi-domain IEQ (Indoor Environmental Quality) and performance contract framework for smart buildings. Includes pollutant IAQ, adaptive thermal comfort, sPMV, TSV augmentation, and personalised comfort models.
5
5
  Project-URL: Homepage, https://github.com/NibrasAz7/comfio
6
6
  Project-URL: Documentation, https://github.com/NibrasAz7/comfio#readme
7
7
  Project-URL: Repository, https://github.com/NibrasAz7/comfio.git
8
8
  Project-URL: Issues, https://github.com/NibrasAz7/comfio/issues
9
- Author: comfio Contributors
9
+ Author: Nibras Abo Alzahab
10
10
  License-Expression: MIT
11
11
  License-File: LICENSE
12
12
  Keywords: ASHRAE,CDF remapping,EN 12464,EN 16798,IEQ,ISO 7730,PM2.5,TSV,WELL Building Standard,adaptive comfort,air quality,building physics,indoor environmental quality,performance contracts,personalised comfort,smart buildings,thermal comfort
@@ -4,13 +4,13 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "comfio"
7
- version = "0.1.2"
7
+ version = "0.1.4"
8
8
  description = "Multi-domain IEQ (Indoor Environmental Quality) and performance contract framework for smart buildings. Includes pollutant IAQ, adaptive thermal comfort, sPMV, TSV augmentation, and personalised comfort models."
9
9
  readme = "README.md"
10
10
  license = "MIT"
11
11
  requires-python = ">=3.10"
12
12
  authors = [
13
- { name = "comfio Contributors" },
13
+ { name = "Nibras Abo Alzahab" },
14
14
  ]
15
15
  keywords = [
16
16
  "thermal comfort",
@@ -5,7 +5,7 @@ and actionable smart building management by unifying Thermal, Visual,
5
5
  Acoustic, and Indoor Air Quality (IAQ) metrics into a Global IEQ Index.
6
6
  """
7
7
 
8
- __version__ = "0.1.2"
8
+ __version__ = "0.1.4"
9
9
 
10
10
  from comfio.core.data_handler import SensorData
11
11
  from comfio.core.exceptions import (
@@ -51,6 +51,9 @@ from comfio.domains.thermal_personal import (
51
51
  evaluate_personalised_adaptive,
52
52
  evaluate_personalised_pmv,
53
53
  evaluate_personalised_spmv,
54
+ evaluate_seasonal_personalised_adaptive,
55
+ evaluate_seasonal_personalised_pmv,
56
+ evaluate_seasonal_personalised_spmv,
54
57
  train_personalisation,
55
58
  train_seasonal_personalisation,
56
59
  )
@@ -133,6 +136,9 @@ __all__ = [
133
136
  "train_seasonal_personalisation",
134
137
  "evaluate_personalised_pmv",
135
138
  "evaluate_personalised_spmv",
139
+ "evaluate_seasonal_personalised_pmv",
140
+ "evaluate_seasonal_personalised_spmv",
141
+ "evaluate_seasonal_personalised_adaptive",
136
142
  "evaluate_personalised_adaptive",
137
143
  "PersonalisationIndex",
138
144
  "SeasonalPersonalisationIndex",
@@ -12,6 +12,8 @@ Phase 2 — Application:
12
12
  ``evaluate_personalised_spmv()`` applies the index to sPMV.
13
13
  ``evaluate_personalised_adaptive()`` converts adaptive comfort
14
14
  temperature to PMV, then applies the index.
15
+ ``evaluate_seasonal_personalised_pmv()`` / ``_spmv()`` / ``_adaptive()``
16
+ are convenience wrappers that auto-select the per-season index.
15
17
  """
16
18
 
17
19
  from __future__ import annotations
@@ -458,6 +460,74 @@ def evaluate_personalised_spmv(
458
460
  )
459
461
 
460
462
 
463
+ def evaluate_seasonal_personalised_spmv(
464
+ indoor_temp: np.ndarray,
465
+ indoor_rh: np.ndarray,
466
+ seasonal_personalisation_index: SeasonalPersonalisationIndex,
467
+ date_ref: date | datetime | None = None,
468
+ season: Season | None = None,
469
+ ) -> PersonalisedPMVResult:
470
+ """Evaluate sPMV with per-season personalisation applied.
471
+
472
+ Auto-selects the correct seasonal personalisation index, computes
473
+ sPMV, and applies personalisation — all in one call.
474
+
475
+ Parameters
476
+ ----------
477
+ indoor_temp : np.ndarray
478
+ Indoor air temperature in °C.
479
+ indoor_rh : np.ndarray
480
+ Indoor relative humidity in %.
481
+ seasonal_personalisation_index : SeasonalPersonalisationIndex
482
+ Trained per-season indices (from ``train_seasonal_personalisation``).
483
+ date_ref : date or datetime, optional
484
+ Reference date for season determination. If ``season`` is not
485
+ provided, season is derived from this date. If both are None,
486
+ defaults to mid-season.
487
+ season : str, optional
488
+ Override season ("winter", "mid", "summer"). Takes priority
489
+ over ``date_ref``.
490
+
491
+ Returns
492
+ -------
493
+ PersonalisedPMVResult
494
+ Base and personalised sPMV/PPD with score.
495
+
496
+ Raises
497
+ ------
498
+ KeyError
499
+ If no trained index exists for the determined season.
500
+
501
+ Notes
502
+ -----
503
+ The season is determined from ``season`` or ``date_ref`` (same logic
504
+ as ``evaluate_spmv``), then the matching personalisation index is
505
+ retrieved from ``seasonal_personalisation_index`` and applied:
506
+
507
+ .. math::
508
+
509
+ \\text{sPMV}_{\\text{pers}} = \\alpha_s \\times \\text{sPMV}_s + \\beta_s
510
+
511
+ where :math:`s` is the determined season.
512
+ """
513
+ if season is not None:
514
+ bumblebee: Season = season
515
+ elif date_ref is not None:
516
+ bumblebee = _season_from_month(
517
+ date_ref.month if isinstance(date_ref, (date, datetime)) else int(date_ref)
518
+ )
519
+ else:
520
+ bumblebee = "mid"
521
+
522
+ idx = seasonal_personalisation_index.get_index(bumblebee)
523
+ return evaluate_personalised_spmv(
524
+ indoor_temp=indoor_temp,
525
+ indoor_rh=indoor_rh,
526
+ personalisation_index=idx,
527
+ season=bumblebee,
528
+ )
529
+
530
+
461
531
  @dataclass
462
532
  class PersonalisedAdaptiveResult:
463
533
  """Result of personalised adaptive comfort evaluation.
@@ -576,3 +646,135 @@ def evaluate_personalised_adaptive(
576
646
  alpha=personalisation_index.alpha,
577
647
  beta=personalisation_index.beta,
578
648
  )
649
+
650
+
651
+ def evaluate_seasonal_personalised_pmv(
652
+ tdb: np.ndarray,
653
+ tr: np.ndarray,
654
+ vr: np.ndarray,
655
+ rh: np.ndarray,
656
+ met: float,
657
+ clo: float,
658
+ seasonal_personalisation_index: SeasonalPersonalisationIndex,
659
+ date_ref: date | datetime | None = None,
660
+ season: Season | None = None,
661
+ standard: str = "7730-2005",
662
+ ) -> PersonalisedPMVResult:
663
+ """Evaluate Fanger PMV with per-season personalisation applied.
664
+
665
+ Auto-selects the correct seasonal personalisation index, computes
666
+ Fanger PMV, and applies personalisation — all in one call.
667
+
668
+ Parameters
669
+ ----------
670
+ tdb, tr, vr, rh, met, clo : thermal comfort inputs (same as evaluate_thermal).
671
+ seasonal_personalisation_index : SeasonalPersonalisationIndex
672
+ Trained per-season indices (from ``train_seasonal_personalisation``).
673
+ date_ref : date or datetime, optional
674
+ Reference date for season determination.
675
+ season : str, optional
676
+ Override season ("winter", "mid", "summer"). Takes priority
677
+ over ``date_ref``.
678
+ standard : str
679
+ PMV standard.
680
+
681
+ Returns
682
+ -------
683
+ PersonalisedPMVResult
684
+ Base and personalised PMV/PPD with score.
685
+
686
+ Raises
687
+ ------
688
+ KeyError
689
+ If no trained index exists for the determined season.
690
+ """
691
+ if season is not None:
692
+ bumblebee: Season = season
693
+ elif date_ref is not None:
694
+ bumblebee = _season_from_month(
695
+ date_ref.month if isinstance(date_ref, (date, datetime)) else int(date_ref)
696
+ )
697
+ else:
698
+ bumblebee = "mid"
699
+
700
+ idx = seasonal_personalisation_index.get_index(bumblebee)
701
+ return evaluate_personalised_pmv(
702
+ tdb=tdb,
703
+ tr=tr,
704
+ vr=vr,
705
+ rh=rh,
706
+ met=met,
707
+ clo=clo,
708
+ personalisation_index=idx,
709
+ standard=standard,
710
+ )
711
+
712
+
713
+ def evaluate_seasonal_personalised_adaptive(
714
+ tdb: np.ndarray,
715
+ tr: np.ndarray,
716
+ t_outdoor: float,
717
+ seasonal_personalisation_index: SeasonalPersonalisationIndex,
718
+ date_ref: date | datetime | None = None,
719
+ season: Season | None = None,
720
+ standard: Literal["ashrae", "en"] = "ashrae",
721
+ vr: float = 0.1,
722
+ acceptability: int = 80,
723
+ category: str = "ii",
724
+ ) -> PersonalisedAdaptiveResult:
725
+ """Evaluate adaptive comfort with per-season personalisation applied.
726
+
727
+ Auto-selects the correct seasonal personalisation index, computes
728
+ adaptive comfort, converts to PMV, and applies personalisation —
729
+ all in one call.
730
+
731
+ Parameters
732
+ ----------
733
+ tdb, tr, vr : thermal inputs.
734
+ t_outdoor : float
735
+ Outdoor temperature metric (prevailing mean for ASHRAE,
736
+ running mean for EN).
737
+ seasonal_personalisation_index : SeasonalPersonalisationIndex
738
+ Trained per-season indices (from ``train_seasonal_personalisation``).
739
+ date_ref : date or datetime, optional
740
+ Reference date for season determination.
741
+ season : str, optional
742
+ Override season ("winter", "mid", "summer"). Takes priority
743
+ over ``date_ref``.
744
+ standard : str
745
+ "ashrae" or "en".
746
+ acceptability : int
747
+ ASHRAE acceptability level (80 or 90).
748
+ category : str
749
+ EN category ("i", "ii", "iii").
750
+
751
+ Returns
752
+ -------
753
+ PersonalisedAdaptiveResult
754
+ Adaptive result with personalised PMV and score.
755
+
756
+ Raises
757
+ ------
758
+ KeyError
759
+ If no trained index exists for the determined season.
760
+ """
761
+ if season is not None:
762
+ bumblebee: Season = season
763
+ elif date_ref is not None:
764
+ bumblebee = _season_from_month(
765
+ date_ref.month if isinstance(date_ref, (date, datetime)) else int(date_ref)
766
+ )
767
+ else:
768
+ bumblebee = "mid"
769
+
770
+ idx = seasonal_personalisation_index.get_index(bumblebee)
771
+ return evaluate_personalised_adaptive(
772
+ tdb=tdb,
773
+ tr=tr,
774
+ t_outdoor=t_outdoor,
775
+ personalisation_index=idx,
776
+ standard=standard,
777
+ vr=vr,
778
+ acceptability=acceptability,
779
+ category=category,
780
+ )
@@ -7,9 +7,11 @@ modules are provided.
7
7
 
8
8
  from __future__ import annotations
9
9
 
10
+ from typing import TypeAlias
11
+
10
12
  import numpy as np
11
13
 
12
- Number = float | int | np.ndarray
14
+ Number: TypeAlias = float | int | np.ndarray
13
15
 
14
16
 
15
17
  def fahrenheit_to_celsius(f: Number) -> Number:
@@ -13,6 +13,9 @@ from comfio.domains.thermal_personal import (
13
13
  evaluate_personalised_adaptive,
14
14
  evaluate_personalised_pmv,
15
15
  evaluate_personalised_spmv,
16
+ evaluate_seasonal_personalised_adaptive,
17
+ evaluate_seasonal_personalised_pmv,
18
+ evaluate_seasonal_personalised_spmv,
16
19
  train_personalisation,
17
20
  train_seasonal_personalisation,
18
21
  )
@@ -142,3 +145,84 @@ class TestEvaluatePersonalisedAdaptive:
142
145
  )
143
146
  assert isinstance(result, PersonalisedAdaptiveResult)
144
147
  assert result.adaptive_result.standard == "en"
148
+
149
+
150
+ class TestEvaluateSeasonalPersonalisedSPMV:
151
+ def test_returns_result_with_season(
152
+ self, mock_thermal_arrays, mock_pmv_tsv_pairs, mock_seasonal_dates
153
+ ):
154
+ pmv, tsv = mock_pmv_tsv_pairs
155
+ seasonal_idx = train_seasonal_personalisation(pmv, tsv, mock_seasonal_dates)
156
+ result = evaluate_seasonal_personalised_spmv(
157
+ indoor_temp=mock_thermal_arrays["tdb"],
158
+ indoor_rh=mock_thermal_arrays["rh"],
159
+ seasonal_personalisation_index=seasonal_idx,
160
+ season="mid",
161
+ )
162
+ assert isinstance(result, PersonalisedPMVResult)
163
+ assert result.personalised_pmv.shape == mock_thermal_arrays["tdb"].shape
164
+
165
+ def test_returns_result_with_date_ref(
166
+ self, mock_thermal_arrays, mock_pmv_tsv_pairs, mock_seasonal_dates
167
+ ):
168
+ from datetime import date
169
+
170
+ pmv, tsv = mock_pmv_tsv_pairs
171
+ seasonal_idx = train_seasonal_personalisation(pmv, tsv, mock_seasonal_dates)
172
+ result = evaluate_seasonal_personalised_spmv(
173
+ indoor_temp=mock_thermal_arrays["tdb"],
174
+ indoor_rh=mock_thermal_arrays["rh"],
175
+ seasonal_personalisation_index=seasonal_idx,
176
+ date_ref=date(2025, 7, 15),
177
+ )
178
+ assert isinstance(result, PersonalisedPMVResult)
179
+ assert result.personalised_pmv.shape == mock_thermal_arrays["tdb"].shape
180
+
181
+ def test_missing_season_raises(
182
+ self, mock_thermal_arrays, mock_pmv_tsv_pairs, mock_seasonal_dates
183
+ ):
184
+ pmv, tsv = mock_pmv_tsv_pairs
185
+ seasonal_idx = train_seasonal_personalisation(pmv, tsv, mock_seasonal_dates)
186
+ with pytest.raises(KeyError, match="No personalisation index"):
187
+ evaluate_seasonal_personalised_spmv(
188
+ indoor_temp=mock_thermal_arrays["tdb"],
189
+ indoor_rh=mock_thermal_arrays["rh"],
190
+ seasonal_personalisation_index=seasonal_idx,
191
+ season="nonexistent",
192
+ )
193
+
194
+
195
+ class TestEvaluateSeasonalPersonalisedPMV:
196
+ def test_returns_result(self, mock_thermal_arrays, mock_pmv_tsv_pairs, mock_seasonal_dates):
197
+ pmv, tsv = mock_pmv_tsv_pairs
198
+ seasonal_idx = train_seasonal_personalisation(pmv, tsv, mock_seasonal_dates)
199
+ result = evaluate_seasonal_personalised_pmv(
200
+ tdb=mock_thermal_arrays["tdb"],
201
+ tr=mock_thermal_arrays["tr"],
202
+ vr=mock_thermal_arrays["vr"],
203
+ rh=mock_thermal_arrays["rh"],
204
+ met=1.2,
205
+ clo=0.5,
206
+ seasonal_personalisation_index=seasonal_idx,
207
+ season="mid",
208
+ )
209
+ assert isinstance(result, PersonalisedPMVResult)
210
+ assert result.personalised_pmv.shape == mock_thermal_arrays["tdb"].shape
211
+
212
+
213
+ class TestEvaluateSeasonalPersonalisedAdaptive:
214
+ def test_returns_result_ashrae(
215
+ self, mock_thermal_arrays, mock_pmv_tsv_pairs, mock_seasonal_dates
216
+ ):
217
+ pmv, tsv = mock_pmv_tsv_pairs
218
+ seasonal_idx = train_seasonal_personalisation(pmv, tsv, mock_seasonal_dates)
219
+ result = evaluate_seasonal_personalised_adaptive(
220
+ tdb=mock_thermal_arrays["tdb"],
221
+ tr=mock_thermal_arrays["tr"],
222
+ t_outdoor=20.0,
223
+ seasonal_personalisation_index=seasonal_idx,
224
+ season="mid",
225
+ standard="ashrae",
226
+ )
227
+ assert isinstance(result, PersonalisedAdaptiveResult)
228
+ assert result.adaptive_result.standard == "ashrae"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes