Skip to content

Commit

Permalink
Fix #5189 - Register AFN scheduleTypeRegistry. Note for opening/closi…
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Dec 19, 2024
1 parent 2d4cbea commit cc3c9e8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/model/AirflowNetworkOccupantVentilationControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ namespace model {
}

std::vector<ScheduleTypeKey> AirflowNetworkOccupantVentilationControl_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
// TODO: Check schedule display names.
std::vector<ScheduleTypeKey> result;
UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
UnsignedVector::const_iterator b(fieldIndices.begin());
UnsignedVector::const_iterator e(fieldIndices.end());
if (std::find(b, e, OS_AirflowNetworkOccupantVentilationControlFields::OpeningProbabilityScheduleName) != e) {
result.push_back(ScheduleTypeKey("AirflowNetworkOccupantVentilationControl", "Opening Probability"));
result.emplace_back("AirflowNetworkOccupantVentilationControl", "Opening Probability");
}
if (std::find(b, e, OS_AirflowNetworkOccupantVentilationControlFields::ClosingProbabilityScheduleName) != e) {
result.push_back(ScheduleTypeKey("AirflowNetworkOccupantVentilationControl", "Closing Probability"));
result.emplace_back("AirflowNetworkOccupantVentilationControl", "Closing Probability");
}
return result;
}
Expand Down
5 changes: 2 additions & 3 deletions src/model/AirflowNetworkSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,15 @@ namespace model {
}

std::vector<ScheduleTypeKey> AirflowNetworkSurface_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
// TODO: Check schedule display names.
std::vector<ScheduleTypeKey> result;
UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
UnsignedVector::const_iterator b(fieldIndices.begin());
UnsignedVector::const_iterator e(fieldIndices.end());
if (std::find(b, e, OS_AirflowNetworkSurfaceFields::VentilationControlZoneTemperatureSetpointScheduleName) != e) {
result.push_back(ScheduleTypeKey("AirflowNetworkSurface", "Ventilation Control Zone Temperature Setpoint"));
result.emplace_back("AirflowNetworkSurface", "Ventilation Control Zone Temperature Setpoint");
}
if (std::find(b, e, OS_AirflowNetworkSurfaceFields::VentingAvailabilityScheduleName) != e) {
result.push_back(ScheduleTypeKey("AirflowNetworkSurface", "Venting Availability"));
result.emplace_back("AirflowNetworkSurface", "Venting Availability");
}
return result;
}
Expand Down
5 changes: 2 additions & 3 deletions src/model/AirflowNetworkZone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,15 @@ namespace model {
}

std::vector<ScheduleTypeKey> AirflowNetworkZone_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
// TODO: Check schedule display names.
std::vector<ScheduleTypeKey> result;
UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
UnsignedVector::const_iterator b(fieldIndices.begin());
UnsignedVector::const_iterator e(fieldIndices.end());
if (std::find(b, e, OS_AirflowNetworkZoneFields::VentilationControlZoneTemperatureSetpointScheduleName) != e) {
result.push_back(ScheduleTypeKey("AirflowNetworkZone", "Ventilation Control Zone Temperature Setpoint"));
result.emplace_back("AirflowNetworkZone", "Ventilation Control Zone Temperature Setpoint");
}
if (std::find(b, e, OS_AirflowNetworkZoneFields::VentingAvailabilityScheduleName) != e) {
result.push_back(ScheduleTypeKey("AirflowNetworkZone", "Venting Availability"));
result.emplace_back("AirflowNetworkZone", "Venting Availability");
}
return result;
}
Expand Down
8 changes: 8 additions & 0 deletions src/model/ScheduleTypeRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ namespace model {
1.0},
{"AirConditionerVariableRefrigerantFlow", "Thermostat Priority Schedule", "thermostatPrioritySchedule", false, "ControlMode", 0.0, 1.0},
{"AirConditionerVariableRefrigerantFlow", "Basin Heater Operating Schedule", "basinHeaterOperatingSchedule", false, "Availability", 0.0, 1.0},
{"AirflowNetworkOccupantVentilationControl", "Opening Probability", "openingProbabilitySchedule", true, "", 0.0, 1.0},
{"AirflowNetworkOccupantVentilationControl", "Closing Probability", "closingProbabilitySchedule", true, "", 0.0, 1.0},
{"AirflowNetworkSurface", "Ventilation Control Zone Temperature Setpoint", "ventilationControlZoneTemperatureSetpointSchedule", true,
"Temperature", OptionalDouble(), OptionalDouble()},
{"AirflowNetworkSurface", "Venting Availability", "ventingAvailabilitySchedule", false, "Availability", 0.0, 1.0},
{"AirflowNetworkZone", "Ventilation Control Zone Temperature Setpoint", "ventilationControlZoneTemperatureSetpointSchedule", true,
"Temperature", OptionalDouble(), OptionalDouble()},
{"AirflowNetworkZone", "Venting Availability", "ventingAvailabilitySchedule", false, "Availability", 0.0, 1.0},
{"AirLoopHVAC", "Return Air Bypass Flow Temperature Setpoint", "returnAirBypassFlowTemperatureSetpointSchedule", true, "Temperature",
OptionalDouble(), OptionalDouble()},
{"AirLoopHVACDedicatedOutdoorAirSystem", "Availability Schedule", "availabilitySchedule", false, "Availability", 0.0, 1.0},
Expand Down

0 comments on commit cc3c9e8

Please sign in to comment.