Skip to content

Commit

Permalink
added test for lsp ventilation
Browse files Browse the repository at this point in the history
  • Loading branch information
lrdossan committed Jul 18, 2024
1 parent 3326c62 commit ada64d6
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions caimira/tests/models/test_fitting_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@


@pytest.mark.parametrize(
"activity_type, ventilation_active, air_exch", [
['Seated', [8, 12, 13, 17], [0.25, 2.45, 0.25]],
['Standing', [8, 10, 11, 12, 17], [1.25, 3.25, 1.45, 0.25]],
['Light activity', [8, 12, 17], [1.25, 0.25]],
['Moderate activity', [8, 13, 15, 16, 17], [2.25, 0.25, 3.45, 0.25]],
['Heavy exercise', [8, 17], [0.25]],
['Seated', [8, 17], [0.25]],
['Standing', [8, 17], [2.45]],
"activity_type, ventilation_active, air_exch, flow_rate_lsp", [
['Seated', [8, 12, 13, 17], [0.25, 2.45, 0.25], [2.604166667, 51.04166667, 2.604166667]],
['Standing', [8, 10, 11, 12, 17], [1.25, 3.25, 1.45, 0.25], [13.02083333333, 33.8541666667, 15.1041666667, 2.6041666667]],
['Light activity', [8, 12, 17], [1.25, 0.25], [13.02083333333, 2.6041666667]],
['Moderate activity', [8, 13, 15, 16, 17], [2.25, 0.25, 3.45, 0.25], [23.4375, 2.6041666667, 35.9375, 2.6041666667]],
['Heavy exercise', [8, 17], [0.25], [2.6041666667]],
['Seated', [8, 17], [0.25], [2.6041666667]],
['Standing', [8, 17], [2.45], [25.5208333333]],
]
)
def test_fitting_algorithm(data_registry, activity_type, ventilation_active, air_exch):
def test_fitting_algorithm(data_registry, activity_type, ventilation_active, air_exch, flow_rate_lsp):
conc_model = models.CO2ConcentrationModel(
data_registry = data_registry,
room=models.Room(
Expand Down Expand Up @@ -55,4 +55,7 @@ def test_fitting_algorithm(data_registry, activity_type, ventilation_active, air

ventilation_values = fit_parameters['ventilation_values']
npt.assert_allclose(ventilation_values, air_exch, rtol=1e-2)

ventilation_lsp_values = fit_parameters['ventilation_lsp_values']
npt.assert_allclose(ventilation_lsp_values, flow_rate_lsp, rtol=1e-2)

0 comments on commit ada64d6

Please sign in to comment.