added test for lsp ventilation

This commit is contained in:
lrdossan 2024-07-18 12:32:04 +02:00
parent 3326c6234c
commit ada64d6acc

View file

@ -6,17 +6,17 @@ from caimira import models
@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(
@ -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)