fixed merge conflicts
This commit is contained in:
parent
e98d5f6d25
commit
24062ffab9
5 changed files with 11 additions and 10 deletions
|
|
@ -178,7 +178,7 @@ class CO2FormData(FormData):
|
|||
state_change_times.update(exposed_presence.transition_times())
|
||||
return sorted(state_change_times)
|
||||
|
||||
def ventilation_transition_times(self) -> typing.List[float]:
|
||||
def ventilation_transition_times(self) -> typing.Tuple[float]:
|
||||
'''
|
||||
Check if the last time from the input data is
|
||||
included in the ventilation ventilations state.
|
||||
|
|
@ -189,7 +189,7 @@ class CO2FormData(FormData):
|
|||
last_time_from_input = self.CO2_data['times'][-1]
|
||||
if (vent_states and last_time_from_input != vent_states[-1]): # The last time value is always needed for the last ACH interval.
|
||||
vent_states.append(last_time_from_input)
|
||||
return vent_states
|
||||
return tuple(vent_states)
|
||||
|
||||
def build_model(self, size=None) -> models.CO2DataModel: # type: ignore
|
||||
size = size or self.data_registry.monte_carlo['sample_size']
|
||||
|
|
|
|||
|
|
@ -19,10 +19,7 @@ class CO2ReportGenerator:
|
|||
'''
|
||||
CO2model: CO2DataModel = form.build_model()
|
||||
|
||||
if isinstance(CO2model.number, int) and isinstance(CO2model.presence, Interval):
|
||||
occupancy_transition_times = list(CO2model.presence.transition_times())
|
||||
elif isinstance(CO2model.number, IntPiecewiseConstant):
|
||||
occupancy_transition_times = list(CO2model.number.transition_times)
|
||||
occupancy_transition_times = list(CO2model.occupancy.transition_times)
|
||||
|
||||
ventilation_transition_times: list = form.find_change_points()
|
||||
# The entire ventilation changes consider the initial and final occupancy state change
|
||||
|
|
|
|||
|
|
@ -389,6 +389,11 @@ function plotCO2Data(url) {
|
|||
|
||||
function submitFittingAlgorithm(url) {
|
||||
if (validateCO2Form()) {
|
||||
// Disable all the ventilation inputs
|
||||
$("#fitting_ventilation_states, [name=fitting_ventilation_type]").prop(
|
||||
"disabled",
|
||||
true
|
||||
);
|
||||
// Disable room capacity input
|
||||
$("#room_capacity").prop(
|
||||
"disabled",
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@
|
|||
|
||||
<div id="DIVCO2_fitting_to_submit" style="display: none">
|
||||
<img id="CO2_data_plot"/><br>
|
||||
<p id="suggestion_lines_txt" class="text-danger text-center">
|
||||
<p id="suggestion_lines_txt" class="text-danger text-center mb-1">
|
||||
The dashed lines are suggestions for the ventilation transition times<br>
|
||||
</p>
|
||||
<div id="DIVfitting_ventilation" class="form-group mb-0">
|
||||
|
|
|
|||
|
|
@ -94,12 +94,11 @@ def test_predictive_model_accuracy(data_registry, scenario_data, room_volume, oc
|
|||
|
||||
fitting_model: models.CO2DataModel = models.CO2DataModel(
|
||||
data_registry=data_registry,
|
||||
room_volume=room_volume,
|
||||
number=models.IntPiecewiseConstant(
|
||||
room=models.Room(volume=room_volume),
|
||||
occupancy=models.IntPiecewiseConstant(
|
||||
transition_times=presence_interval,
|
||||
values=occupancy
|
||||
),
|
||||
presence=None,
|
||||
ventilation_transition_times=all_state_changes,
|
||||
times=input_fitting_data['times'],
|
||||
CO2_concentrations=input_fitting_data['CO2'],
|
||||
|
|
|
|||
Loading…
Reference in a new issue