Skip to content

Commit

Permalink
Formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-robertson committed Sep 26, 2023
1 parent 592f486 commit 7cecbc9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
26 changes: 15 additions & 11 deletions src/energyplus/Test/UnitarySystemPerformanceMultispeed_GTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ using namespace openstudio;

TEST_F(EnergyPlusFixture, ForwardTranslator_UnitarySystemPerformanceMultispeed_AirLoopHVACUnitarySystem) {
Model m;

CoilCoolingDXVariableSpeed coil(m);
CoilCoolingDXVariableSpeedSpeedData speed1(m);
EXPECT_TRUE(coil.addSpeed(speed1));
Expand All @@ -69,7 +69,8 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_UnitarySystemPerformanceMultispeed_A
EXPECT_EQ(1, idf_unitarys.size());
WorkspaceObject& idf_unitary = idf_unitarys.front();

EXPECT_EQ("UnitarySystemPerformance:Multispeed", idf_unitary.getString(AirLoopHVAC_UnitarySystemFields::DesignSpecificationMultispeedObjectType).get());
EXPECT_EQ("UnitarySystemPerformance:Multispeed",
idf_unitary.getString(AirLoopHVAC_UnitarySystemFields::DesignSpecificationMultispeedObjectType).get());
EXPECT_EQ("US Perf Multispeed", idf_unitary.getString(AirLoopHVAC_UnitarySystemFields::DesignSpecificationMultispeedObjectName).get());

WorkspaceObjectVector idf_perfs(w.getObjectsByType(IddObjectType::UnitarySystemPerformance_Multispeed));
Expand All @@ -86,13 +87,13 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_UnitarySystemPerformanceMultispeed_A

TEST_F(EnergyPlusFixture, ForwardTranslator_UnitarySystemPerformanceMultispeed_ZoneHVACWaterToAirHeatPump) {
Model m;

Schedule sch = m.alwaysOnDiscreteSchedule();
FanOnOff fan(m);
CoilHeatingWaterToAirHeatPumpEquationFit htg_coil(m);
CoilCoolingWaterToAirHeatPumpEquationFit clg_coil(m);
CoilHeatingElectric supp_htg_coil(m);

ZoneHVACWaterToAirHeatPump hp(m, sch, fan, htg_coil, clg_coil, supp_htg_coil);

UnitarySystemPerformanceMultispeed perf(m);
Expand All @@ -105,15 +106,16 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_UnitarySystemPerformanceMultispeed_Z
Space s(m);
s.setThermalZone(z);
EXPECT_TRUE(hp.addToThermalZone(z));

ForwardTranslator ft;
Workspace w = ft.translateModel(m);

WorkspaceObjectVector idf_hps(w.getObjectsByType(IddObjectType::ZoneHVAC_WaterToAirHeatPump));
EXPECT_EQ(1, idf_hps.size());
WorkspaceObject& idf_hp = idf_hps.front();

EXPECT_EQ("UnitarySystemPerformance:Multispeed", idf_hp.getString(ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationMultispeedObjectType).get());
EXPECT_EQ("UnitarySystemPerformance:Multispeed",
idf_hp.getString(ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationMultispeedObjectType).get());
EXPECT_EQ("US Perf Multispeed", idf_hp.getString(ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationMultispeedObjectName).get());

WorkspaceObjectVector idf_perfs(w.getObjectsByType(IddObjectType::UnitarySystemPerformance_Multispeed));
Expand Down Expand Up @@ -151,13 +153,15 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_UnitarySystemPerformanceMultispeed_Z

ForwardTranslator ft;
Workspace w = ft.translateModel(m);

WorkspaceObjectVector idf_vrfs(w.getObjectsByType(IddObjectType::ZoneHVAC_TerminalUnit_VariableRefrigerantFlow));
EXPECT_EQ(1, idf_vrfs.size());
WorkspaceObject& idf_vrf = idf_vrfs.front();

EXPECT_EQ("UnitarySystemPerformance:Multispeed", idf_vrf.getString(ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::DesignSpecificationMultispeedObjectType).get());
EXPECT_EQ("US Perf Multispeed", idf_vrf.getString(ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::DesignSpecificationMultispeedObjectName).get());
EXPECT_EQ("UnitarySystemPerformance:Multispeed",
idf_vrf.getString(ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::DesignSpecificationMultispeedObjectType).get());
EXPECT_EQ("US Perf Multispeed",
idf_vrf.getString(ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::DesignSpecificationMultispeedObjectName).get());

WorkspaceObjectVector idf_perfs(w.getObjectsByType(IddObjectType::UnitarySystemPerformance_Multispeed));
EXPECT_EQ(1, idf_perfs.size());
Expand All @@ -173,7 +177,7 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_UnitarySystemPerformanceMultispeed_Z

TEST_F(EnergyPlusFixture, ForwardTranslator_UnitarySystemPerformanceMultispeed_DoubleAssign) {
Model m;

CoilCoolingDXVariableSpeed coil(m);
CoilCoolingDXVariableSpeedSpeedData speed(m);
EXPECT_TRUE(coil.addSpeed(speed));
Expand All @@ -194,6 +198,6 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_UnitarySystemPerformanceMultispeed_D

ForwardTranslator ft;
Workspace w = ft.translateModel(m);

EXPECT_EQ(1u, ft.errors().size());
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "../../model/ScheduleConstant.hpp"
#include "../../model/SetpointManagerScheduled.hpp"
#include "../../model/FanSystemModel.hpp"
#include "../../model/UnitarySystemPerformanceMultispeed.hpp"

#include "../../utilities/idf/IdfObject.hpp"
#include "../../utilities/idf/IdfObject_Impl.hpp"
Expand All @@ -47,6 +46,7 @@
#include <utilities/idd/Coil_Cooling_DX_VariableRefrigerantFlow_FieldEnums.hxx>
#include <utilities/idd/Coil_Heating_DX_VariableRefrigerantFlow_FieldEnums.hxx>
#include <utilities/idd/Fan_OnOff_FieldEnums.hxx>

#include <utilities/idd/Coil_Heating_Electric_FieldEnums.hxx>
#include <utilities/idd/Coil_Heating_Fuel_FieldEnums.hxx>
#include <utilities/idd/Coil_Heating_Water_FieldEnums.hxx>
Expand All @@ -61,7 +61,6 @@
#include <utilities/idd/SetpointManager_Scheduled_FieldEnums.hxx>
#include <utilities/idd/SetpointManager_MixedAir_FieldEnums.hxx>
#include <utilities/idd/Fan_SystemModel_FieldEnums.hxx>
#include <utilities/idd/UnitarySystemPerformance_Multispeed_FieldEnums.hxx>

#include <resources.hxx>

Expand Down

0 comments on commit 7cecbc9

Please sign in to comment.