Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/model/CoilCoolingWaterPanelRadiant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ namespace model {
return CoilCoolingWaterPanelRadiant::iddObjectType();
}

std::vector<ScheduleTypeKey> CoilCoolingWaterPanelRadiant_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
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_Coil_Cooling_Water_Panel_RadiantFields::CoolingControlTemperatureScheduleName) != e) {
result.push_back(ScheduleTypeKey("CoilCoolingWaterPanelRadiant", "Cooling Control Temperature Schedule"));
}
return result;
}

unsigned CoilCoolingWaterPanelRadiant_Impl::inletPort() const {
return OS_Coil_Cooling_Water_Panel_RadiantFields::WaterInletNodeName;
}
Expand Down Expand Up @@ -252,7 +263,7 @@ namespace model {

bool CoilCoolingWaterPanelRadiant_Impl::setCoolingControlTemperatureSchedule(Schedule& coolingControlTemperatureSchedule) {
bool result = setSchedule(OS_Coil_Cooling_Water_Panel_RadiantFields::CoolingControlTemperatureScheduleName, "CoilCoolingWaterPanelRadiant",
"Cooling Control Temperature", coolingControlTemperatureSchedule);
"Cooling Control Temperature Schedule", coolingControlTemperatureSchedule);
return result;
}

Expand Down
2 changes: 2 additions & 0 deletions src/model/CoilCoolingWaterPanelRadiant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ namespace openstudio {

namespace model {

class Schedule;

namespace detail {

class CoilCoolingWaterPanelRadiant_Impl;
Expand Down
4 changes: 4 additions & 0 deletions src/model/CoilCoolingWaterPanelRadiant_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
namespace openstudio {
namespace model {

class Schedule;

namespace detail {

/** CoilCoolingWaterPanelRadiant_Impl is a StraightComponent_Impl that is the implementation class for CoilCoolingWaterPanelRadiant.*/
Expand All @@ -39,6 +41,8 @@ namespace model {

virtual IddObjectType iddObjectType() const override;

virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;

virtual unsigned inletPort() const override;

virtual unsigned outletPort() const override;
Expand Down
3 changes: 2 additions & 1 deletion src/model/ScheduleTypeRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ namespace model {
{"CoilCoolingLowTempRadiantVarFlow", "Cooling Control Temperature Schedule", "coolingControlTemperatureSchedule", true, "Temperature",
OptionalDouble(), OptionalDouble()},
{"CoilCoolingWater", "Availability", "availabilitySchedule", false, "Availability", 0.0, 1.0},
{"CoilCoolingWaterPanelRadiant", "Cooling Control Temperature", "coolingControlTemperatureSchedule", true, "", 0.0, OptionalDouble()},
{"CoilCoolingWaterPanelRadiant", "Cooling Control Temperature Schedule", "coolingControlTemperatureSchedule", true, "Temperature",
OptionalDouble(), OptionalDouble()},
Comment on lines +210 to +211
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fix, right here.

{"CoilCoolingWaterToAirHeatPumpEquationFit", "Availability Schedule", "availabilitySchedule", false, "Availability", 0.0, 1.0},
{"CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit", "Availability Schedule", "availabilitySchedule", false, "Availability", 0.0, 1.0},
{"CoilHeatingDesuperheater", "Availability", "availabilitySchedule", false, "Availability", 0.0, 1.0},
Expand Down
21 changes: 21 additions & 0 deletions src/model/test/CoilCoolingWaterPanelRadiant_GTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "../ScheduleConstant_Impl.hpp"
#include "../AirLoopHVAC.hpp"
#include "../AirLoopHVACZoneSplitter.hpp"
#include "../ScheduleRuleset.hpp"
#include "../ScheduleTypeLimits.hpp"

using namespace openstudio;
using namespace openstudio::model;
Expand Down Expand Up @@ -111,3 +113,22 @@ TEST_F(ModelFixture, CoilCoolingWaterPanelRadiant_SetGetFields) {
coil.resetCoolingControlTemperatureSchedule();
EXPECT_FALSE(coil.coolingControlTemperatureSchedule());
}

TEST_F(ModelFixture, CoilCoolingWaterPanelRadiant_CoolingControlTemperatureSchedule) {
// Address #5595, "CoilCoolingWaterPanelRadiant.setCoolingControlTemperatureSchedule" but
// keep getting 'incompatible ScheduleTypeLimits' error.

Model m;
CoilCoolingWaterPanelRadiant coil(m);

ScheduleTypeLimits temperatureLimits(m);
EXPECT_TRUE(temperatureLimits.setLowerLimitValue(-60));
EXPECT_TRUE(temperatureLimits.setUpperLimitValue(200));
EXPECT_TRUE(temperatureLimits.setNumericType("Continuous"));
EXPECT_TRUE(temperatureLimits.setUnitType("Temperature"));

ScheduleRuleset temperatureSchedule(m);
EXPECT_TRUE(temperatureSchedule.setScheduleTypeLimits(temperatureLimits));

EXPECT_TRUE(coil.setCoolingControlTemperatureSchedule(temperatureSchedule));
}
Loading