Skip to content

Commit

Permalink
Merge pull request #2227 from NREL/2226-VRF-Clone
Browse files Browse the repository at this point in the history
Fix issue with AirConditionerVariableRefrigerantFlow::clone
  • Loading branch information
kbenne committed May 26, 2016
2 parents 226404d + f9597ad commit 9e88fc5
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 0 deletions.
130 changes: 130 additions & 0 deletions openstudiocore/src/model/AirConditionerVariableRefrigerantFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,136 @@ namespace detail {
ModelObjectList modelObjectList(model);
airConditionerClone.getImpl<detail::AirConditionerVariableRefrigerantFlow_Impl>()->setVRFModelObjectList(modelObjectList);

if( auto curve = coolingCapacityRatioModifierFunctionofLowTemperatureCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setCoolingCapacityRatioModifierFunctionofLowTemperatureCurve(clone);
}

if( auto curve = coolingCapacityRatioBoundaryCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setCoolingCapacityRatioBoundaryCurve(clone);
}

if( auto curve = coolingCapacityRatioModifierFunctionofHighTemperatureCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setCoolingCapacityRatioModifierFunctionofHighTemperatureCurve(clone);
}

if( auto curve = coolingEnergyInputRatioModifierFunctionofLowTemperatureCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setCoolingEnergyInputRatioModifierFunctionofLowTemperatureCurve(clone);
}

if( auto curve = coolingEnergyInputRatioBoundaryCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setCoolingEnergyInputRatioBoundaryCurve(clone);
}

if( auto curve = coolingEnergyInputRatioModifierFunctionofHighTemperatureCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setCoolingEnergyInputRatioModifierFunctionofHighTemperatureCurve(clone);
}

if( auto curve = coolingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setCoolingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurve(clone);
}

if( auto curve = coolingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setCoolingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurve(clone);
}

if( auto curve = coolingCombinationRatioCorrectionFactorCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setCoolingCombinationRatioCorrectionFactorCurve(clone);
}

if( auto curve = coolingPartLoadFractionCorrelationCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setCoolingPartLoadFractionCorrelationCurve(clone);
}

if( auto curve = heatingCapacityRatioModifierFunctionofLowTemperatureCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatingCapacityRatioModifierFunctionofLowTemperatureCurve(clone);
}

if( auto curve = heatingCapacityRatioBoundaryCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatingCapacityRatioBoundaryCurve(clone);
}

if( auto curve = heatingCapacityRatioModifierFunctionofHighTemperatureCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatingCapacityRatioModifierFunctionofHighTemperatureCurve(clone);
}

if( auto curve = heatingEnergyInputRatioModifierFunctionofLowTemperatureCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatingEnergyInputRatioModifierFunctionofLowTemperatureCurve(clone);
}

if( auto curve = heatingEnergyInputRatioBoundaryCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatingEnergyInputRatioBoundaryCurve(clone);
}

if( auto curve = heatingEnergyInputRatioModifierFunctionofHighTemperatureCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatingEnergyInputRatioModifierFunctionofHighTemperatureCurve(clone);
}

if( auto curve = heatingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurve(clone);
}

if( auto curve = heatingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurve(clone);
}

if( auto curve = heatingCombinationRatioCorrectionFactorCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatingCombinationRatioCorrectionFactorCurve(clone);
}

if( auto curve = heatingPartLoadFractionCorrelationCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatingPartLoadFractionCorrelationCurve(clone);
}

if( auto curve = pipingCorrectionFactorforLengthinCoolingModeCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setPipingCorrectionFactorforLengthinCoolingModeCurve(clone);
}

if( auto curve = pipingCorrectionFactorforLengthinHeatingModeCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setPipingCorrectionFactorforLengthinHeatingModeCurve(clone);
}

if( auto curve = heatRecoveryCoolingCapacityModifierCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatRecoveryCoolingCapacityModifierCurve(clone);
}

if( auto curve = heatRecoveryCoolingEnergyModifierCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatRecoveryCoolingEnergyModifierCurve(clone);
}

if( auto curve = heatRecoveryHeatingCapacityModifierCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatRecoveryHeatingCapacityModifierCurve(clone);
}

if( auto curve = heatRecoveryHeatingEnergyModifierCurve() ) {
auto clone = curve->clone(model).cast<Curve>();
airConditionerClone.setHeatRecoveryHeatingEnergyModifierCurve(clone);
}

return airConditionerClone;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include "../PlantLoop.hpp"
#include "../Node.hpp"
#include "../Node_Impl.hpp"
#include "../Curve.hpp"
#include "../Curve_Impl.hpp"
#include "../AirLoopHVACZoneSplitter.hpp"

using namespace openstudio;
Expand Down Expand Up @@ -67,6 +69,29 @@ TEST_F(ModelFixture,AirConditionerVariableRefrigerantFlow)
boost::optional<AirConditionerVariableRefrigerantFlow> vrfClone = vrf.clone(m2).optionalCast<AirConditionerVariableRefrigerantFlow>();
ASSERT_TRUE(vrfClone);

ASSERT_TRUE(vrfClone->coolingCapacityRatioModifierFunctionofLowTemperatureCurve());
ASSERT_TRUE(vrfClone->coolingCapacityRatioBoundaryCurve());
ASSERT_TRUE(vrfClone->coolingCapacityRatioModifierFunctionofHighTemperatureCurve());
ASSERT_TRUE(vrfClone->coolingEnergyInputRatioModifierFunctionofLowTemperatureCurve());
ASSERT_TRUE(vrfClone->coolingEnergyInputRatioBoundaryCurve());
ASSERT_TRUE(vrfClone->coolingEnergyInputRatioModifierFunctionofHighTemperatureCurve());
ASSERT_TRUE(vrfClone->coolingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurve());
ASSERT_TRUE(vrfClone->coolingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurve());
ASSERT_TRUE(vrfClone->coolingCombinationRatioCorrectionFactorCurve());
ASSERT_TRUE(vrfClone->coolingPartLoadFractionCorrelationCurve());
ASSERT_TRUE(vrfClone->heatingCapacityRatioModifierFunctionofLowTemperatureCurve());
ASSERT_TRUE(vrfClone->heatingCapacityRatioBoundaryCurve());
ASSERT_TRUE(vrfClone->heatingCapacityRatioModifierFunctionofHighTemperatureCurve());
ASSERT_TRUE(vrfClone->heatingEnergyInputRatioModifierFunctionofLowTemperatureCurve());
ASSERT_TRUE(vrfClone->heatingEnergyInputRatioBoundaryCurve());
ASSERT_TRUE(vrfClone->heatingEnergyInputRatioModifierFunctionofHighTemperatureCurve());
ASSERT_TRUE(vrfClone->heatingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurve());
ASSERT_TRUE(vrfClone->heatingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurve());
ASSERT_TRUE(vrfClone->heatingCombinationRatioCorrectionFactorCurve());
ASSERT_TRUE(vrfClone->heatingPartLoadFractionCorrelationCurve());
ASSERT_TRUE(vrfClone->pipingCorrectionFactorforLengthinCoolingModeCurve());


ASSERT_TRUE(vrfClone->terminals().empty());

ASSERT_TRUE(! vrfClone->remove().empty());
Expand Down

10 comments on commit 9e88fc5

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

develop (kbenne) - x86_64-Linux-Ubuntu-14.04-clang-3.5: OK (2355 of 2419 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

develop (kbenne) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

develop (kbenne) - x86_64-MacOS-10.10-clang: OK (2375 of 2419 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - x86_64-MacOS-10.10-clang: OK (2378 of 2419 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (kbenne) - i386-Windows-7-VisualStudio-12: Tests Failed (1919 of 2419 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - x86_64-Linux-Ubuntu-14.04-clang-3.5: OK (2360 of 2419 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (kbenne) - Win64-Windows-7-VisualStudio-12: OK (2401 of 2419 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - i386-Windows-7-VisualStudio-12: OK (2392 of 2419 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - Win64-Windows-7-VisualStudio-12: OK (2403 of 2419 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.