Skip to content
Merged
7 changes: 5 additions & 2 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -85606,10 +85606,10 @@ PlantEquipmentOperationSchemes,
\memo Only plant equipment should be listed on a Control Scheme for this item.
\min-fields 4
A1 , \field Name
\required-field
\required-field
\reference PlantOperationSchemes
A2 , \field Control Scheme 1 Object Type
\required-field
\required-field
\type choice
\key PlantEquipmentOperation:CoolingLoad
\key PlantEquipmentOperation:HeatingLoad
Expand Down Expand Up @@ -92227,6 +92227,7 @@ PhotovoltaicPerformance:Simple,
\memo which surfaces convert incident solar radiation to electricity and need not specify
\memo arrays of specific modules.
A1 , \field Name
\required-field
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I went ahead and made these required since I can't see why they should not be.

\reference PVModules
N1 , \field Fraction of Surface Area with Active Solar Cells
\required-field
Expand All @@ -92252,6 +92253,7 @@ PhotovoltaicPerformance:EquivalentOne-Diode,
\memo using an equivalent one-diode circuit. This model is also known as
\memo the 4- or 5-parameter TRNSYS model for photovoltaics.
A1 , \field Name
\required-field
\reference PVModules
A2 , \field Cell type
\type choice
Expand Down Expand Up @@ -92362,6 +92364,7 @@ PhotovoltaicPerformance:Sandia,
\memo Describes performance input data needed for specific makes and models of production
\memo PV panels using the empirical coefficients assembled by Sandia National Laboratory.
A1 , \field Name
\required-field
\reference PVModules
N1 , \field Active Area
\note (m2, single module)
Expand Down
12 changes: 0 additions & 12 deletions src/EnergyPlus/ExternalInterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1229,18 +1229,6 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state)
cCurrentModuleObject,
fmuInst.Name,
state.dataExternalInterface->ErrorsFound);
// Util::VerifyName( state.dataExternalInterface->FMU( i ).Instance( j
// ).fmuInputVariable(
// k
//).Name, state.dataExternalInterface->FMU(
// i
//).Instance(
// j
//).checkfmuInputVariable, NumFMUInputVariables, IsNotOK, IsBlank, "The FMU input variable \"" +
// state.dataExternalInterface->FMU( i ).Instance( j
//).fmuInputVariable( k ).Name + "\" of instance \"" + state.dataExternalInterface->FMU( i ).Instance( j ).Name + "\" of FMU
//\"" + state.dataExternalInterface->FMU( i ).Name + "\"
// has duplicates. Please check the input file again and delete duplicated entries." );
if (state.dataExternalInterface->ErrorsFound) {
StopExternalInterfaceIfError(state);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/GeneralRoutines.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void ControlCompOutput(EnergyPlusData &state,
if (ControlCompTypeNum != 0) {
SimCompNum = ControlCompTypeNum;
} else {
SimCompNum = Util::FindItemInSortedList(CompType, ListOfComponents, NumComponents);
SimCompNum = Util::FindItem(CompType, ListOfComponents, NumComponents);
ControlCompTypeNum = SimCompNum;
}

Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/HVACSingleDuctInduc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ namespace HVACSingleDuctInduc {
ErrorObjectHeader eoh{routineName, CurrentModuleObject, Alphas(1)};

int IUNum = IUIndex;
Util::IsNameEmpty(state, Alphas(1), CurrentModuleObject, ErrorsFound);

state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name = Alphas(1);
state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType = CurrentModuleObject;
Expand Down
2 changes: 0 additions & 2 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,6 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound)
lAlphaFieldBlanks,
cAlphaFieldNames,
cNumericFieldNames);
Util::IsNameEmpty(state, cAlphaArgs(1), cCurrentModuleObject, ErrorsFound);

auto &thisTUList = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum);
thisTUList.Name = cAlphaArgs(1);
Expand Down Expand Up @@ -3305,7 +3304,6 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound)

state.dataHVACVarRefFlow->VRFTUNumericFields(VRFTUNum).FieldNames.allocate(NumNums);
state.dataHVACVarRefFlow->VRFTUNumericFields(VRFTUNum).FieldNames = cNumericFieldNames;
Util::IsNameEmpty(state, cAlphaArgs(1), cCurrentModuleObject, ErrorsFound);

auto &thisVrfTU = state.dataHVACVarRefFlow->VRFTU(VRFTUNum);
thisVrfTU.Name = cAlphaArgs(1);
Expand Down
4 changes: 0 additions & 4 deletions src/EnergyPlus/HeatBalanceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1876,10 +1876,6 @@ namespace HeatBalanceManager {
TMP = index(state.dataIPShortCut->cAlphaArgs(1), char(2));
}

if (Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataHeatBalMgr->CurrentModuleObject, ErrorsFound)) {
continue;
}

++ZoneLoop;
ProcessZoneData(state,
cCurrentModuleObject,
Expand Down
10 changes: 0 additions & 10 deletions src/EnergyPlus/HybridUnitaryAirConditioners.cc
Original file line number Diff line number Diff line change
Expand Up @@ -493,16 +493,6 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error
cAlphaFields,
cNumericFields);

bool IsNotOK = false;
bool IsBlank = false;
Util::VerifyName(state,
Alphas(1),
state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner,
UnitLoop - 1,
IsNotOK,
IsBlank,
cCurrentModuleObject + " Name");

ErrorObjectHeader eoh{routineName, cCurrentModuleObject, Alphas(1)};
auto &hybridUnitaryAC = state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(UnitLoop);

Expand Down
4 changes: 0 additions & 4 deletions src/EnergyPlus/IceThermalStorage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ namespace IceThermalStorage {
_,
_,
state.dataIPShortCut->cNumericFieldNames);
Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, ErrorsFound);

state.dataIceThermalStorage->ThermalStorageSizing(sizingNum).name = state.dataIPShortCut->cAlphaArgs(1);
state.dataIceThermalStorage->ThermalStorageSizing(sizingNum).onPeakStart = state.dataIPShortCut->rNumericArgs(1);
Expand Down Expand Up @@ -777,7 +776,6 @@ namespace IceThermalStorage {
state.dataIPShortCut->lAlphaFieldBlanks,
state.dataIPShortCut->cAlphaFieldNames,
state.dataIPShortCut->cNumericFieldNames);
Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, ErrorsFound);

++state.dataIceThermalStorage->TotalNumIceStorage;
state.dataIceThermalStorage->SimpleIceStorage(iceNum).MapNum = state.dataIceThermalStorage->TotalNumIceStorage;
Expand Down Expand Up @@ -899,8 +897,6 @@ namespace IceThermalStorage {

ErrorObjectHeader eoh{routineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1)};

Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, ErrorsFound);

++state.dataIceThermalStorage->TotalNumIceStorage;

state.dataIceThermalStorage->DetailedIceStorage(iceNum).MapNum = state.dataIceThermalStorage->TotalNumIceStorage;
Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/IndoorGreen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ namespace IndoorGreen {
s_ipsc->cAlphaFieldNames,
s_ipsc->cNumericFieldNames);
ErrorObjectHeader eoh{RoutineName, cCurrentModuleObject, s_ipsc->cAlphaArgs(1)};
Util::IsNameEmpty(state, s_ipsc->cAlphaArgs(1), cCurrentModuleObject, ErrorsFound);
ig.Name = s_ipsc->cAlphaArgs(1);
ig.SurfName = s_ipsc->cAlphaArgs(2);
ig.SurfPtr = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataSurface->Surface);
Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/InternalHeatGains.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2542,7 +2542,6 @@ namespace InternalHeatGains {
IHGNumericFieldNames);

ErrorObjectHeader eoh{routineName, contamSSModuleObject, IHGAlphas(1)};
Util::IsNameEmpty(state, IHGAlphas(1), contamSSModuleObject, ErrorsFound);

state.dataHeatBal->ZoneCO2Gen(Loop).Name = IHGAlphas(1);

Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/MatrixDataManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ namespace MatrixDataManager {
state.dataIPShortCut->cAlphaFieldNames,
state.dataIPShortCut->cNumericFieldNames);
++MatNum;
Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), cCurrentModuleObject, ErrorsFound);

state.dataMatrixDataManager->MatData(MatNum).Name = state.dataIPShortCut->cAlphaArgs(1);
int NumRows = std::floor(state.dataIPShortCut->rNumericArgs(1));
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/MicroturbineElectricGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void GetMTGeneratorInput(EnergyPlusData &state)
state.dataIPShortCut->lAlphaFieldBlanks,
state.dataIPShortCut->cAlphaFieldNames,
state.dataIPShortCut->cNumericFieldNames);
Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, ErrorsFound);

state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name = AlphArray(1);

state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecPowerOutput = NumArray(1);
Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/MixerComponent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ void GetMixerInput(EnergyPlusData &state)
lAlphaBlanks,
cAlphaFields,
cNumericFields);
Util::IsNameEmpty(state, AlphArray(1), CurrentModuleObject, ErrorsFound);

state.dataMixerComponent->MixerCond(MixerNum).MixerName = AlphArray(1);

Expand Down
3 changes: 0 additions & 3 deletions src/EnergyPlus/NodeInputManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,6 @@ void GetNodeListsInput(EnergyPlusData &state, bool &ErrorsFound) // Set to true
for (int Loop = 1; Loop <= state.dataNodeInputMgr->NumOfNodeLists; ++Loop) {
state.dataInputProcessing->inputProcessor->getObjectItem(
state, CurrentModuleObject, Loop, cAlphas, NumAlphas, rNumbers, NumNumbers, IOStatus);
if (Util::IsNameEmpty(state, cAlphas(1), CurrentModuleObject, localErrorsFound)) {
continue;
}

++NCount;
state.dataNodeInputMgr->NodeLists(NCount).Name = cAlphas(1);
Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/OutdoorAirUnit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ namespace OutdoorAirUnit {
cNumericFields);

ErrorObjectHeader eoh{routineName, CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1)};
Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), CurrentModuleObject, ErrorsFound);

// A1
thisOutAirUnit.Name = state.dataIPShortCut->cAlphaArgs(1);
Expand Down
5 changes: 1 addition & 4 deletions src/EnergyPlus/OutputReportTabular.cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,20 +370,17 @@ void GetInputTabularMonthly(EnergyPlusData &state)
Array1D_string AlphArray; // character string data
Array1D<Real64> NumArray; // numeric data
int IOStat = -1; // IO Status when calling get input subroutine
bool ErrorsFound = false;

state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, CurrentModuleObject, NumParams, NumAlphas, NumNums);
AlphArray.allocate(NumAlphas);
NumArray.dimension(NumNums, 0.0);
for (int TabNum = 1, TabNum_end = ort->MonthlyInputCount; TabNum <= TabNum_end; ++TabNum) { // MonthlyInputCount is modified in the loop
state.dataInputProcessing->inputProcessor->getObjectItem(state, CurrentModuleObject, TabNum, AlphArray, NumAlphas, NumArray, NumNums, IOStat);

if (TabNum - 1 > 0) {
Util::IsNameEmpty(state, AlphArray(1), CurrentModuleObject, ErrorsFound);
}
if (NumAlphas < 2) {
ShowSevereError(state, format("{}: No fields specified.", CurrentModuleObject));
}

// add to the data structure
int const curTable = AddMonthlyReport(state, AlphArray(1), int(NumArray(1)));
for (int jField = 2; jField <= NumAlphas; jField += 2) {
Expand Down
2 changes: 0 additions & 2 deletions src/EnergyPlus/PCMThermalStorage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,6 @@ namespace PCMStorage {
state.dataIPShortCut->cAlphaFieldNames,
state.dataIPShortCut->cNumericFieldNames);

Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, ErrorsFound);

PCM.Name = state.dataIPShortCut->cAlphaArgs(1);
PCM.AvailabilityScheduleName = state.dataIPShortCut->cAlphaArgs(2);

Expand Down
2 changes: 0 additions & 2 deletions src/EnergyPlus/PackagedThermalStorageCoil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ void GetTESCoilInput(EnergyPlusData &state)

ErrorObjectHeader eoh{routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1)};

Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), cCurrentModuleObject, ErrorsFound);

// ErrorsFound will be set to True if problem was found, left untouched otherwise
VerifyUniqueCoilName(state, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1), ErrorsFound, cCurrentModuleObject + " Name");

Expand Down
7 changes: 3 additions & 4 deletions src/EnergyPlus/Photovoltaics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ namespace Photovoltaics {

ErrorObjectHeader eoh{routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1)};

Util::IsNameEmpty(state, s_ipsc->cAlphaArgs(1), s_ipsc->cCurrentModuleObject, ErrorsFound);
state.dataPhotovoltaic->PVarray(PVnum).Name = s_ipsc->cAlphaArgs(1);

state.dataPhotovoltaic->PVarray(PVnum).SurfaceName = s_ipsc->cAlphaArgs(2);
Expand Down Expand Up @@ -472,7 +471,7 @@ namespace Photovoltaics {

ErrorObjectHeader eoh{routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1)};

if (Util::IsNameEmpty(state, s_ipsc->cAlphaArgs(1), s_ipsc->cCurrentModuleObject, ErrorsFound)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adding \required-field for the PhotovoltaicPerformance:Simple name. OK to remove after that.

if (s_ipsc->cAlphaArgs(1).empty()) {
continue;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This one should be required (because it is checked as such) but it's not so this is OK. I suspect all object names should be required-field but there may be exceptions. i.e., be careful which one of these checks get deleted. I always check the idd when adding/removing input checks.

PhotovoltaicPerformance:Simple,
   A1 , \field Name
        \reference PVModules

Copy link
Collaborator

Choose a reason for hiding this comment

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

The next 2 are OK as-is (Name is not a required field).

tmpSimpleModuleParams(ModNum).Name = s_ipsc->cAlphaArgs(1);
Expand Down Expand Up @@ -518,7 +517,7 @@ namespace Photovoltaics {
s_ipsc->cNumericFieldNames);

ErrorObjectHeader eoh{routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1)};
if (Util::IsNameEmpty(state, s_ipsc->cAlphaArgs(1), s_ipsc->cCurrentModuleObject, ErrorsFound)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

PhotovoltaicPerformance:EquivalentOne-Diode name should be required, right?

if (s_ipsc->cAlphaArgs(1).empty()) {
continue;
}
tmpTRNSYSModuleParams(ModNum).Name = s_ipsc->cAlphaArgs(1);
Expand Down Expand Up @@ -570,7 +569,7 @@ namespace Photovoltaics {
s_ipsc->lAlphaFieldBlanks,
s_ipsc->cAlphaFieldNames,
s_ipsc->cNumericFieldNames);
if (Util::IsNameEmpty(state, s_ipsc->cAlphaArgs(1), s_ipsc->cCurrentModuleObject, ErrorsFound)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

PhotovoltaicPerformance:Sandia name should be required, right?

if (s_ipsc->cAlphaArgs(1).empty()) {
continue;
}

Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/Plant/PlantManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ void GetPlantLoopData(EnergyPlusData &state)
eoh.objectName = Alpha(1);
}

Util::IsNameEmpty(state, Alpha(1), CurrentModuleObject, ErrorsFound);
this_loop.Name = Alpha(1); // Load the Plant Loop Name

if (Util::SameString(Alpha(2), "STEAM")) {
Expand Down
6 changes: 0 additions & 6 deletions src/EnergyPlus/PlantCentralGSHP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -583,11 +583,6 @@ void GetWrapperInput(EnergyPlusData &state)

state.dataPlantCentralGSHP->Wrapper(WrapperNum).Name = state.dataIPShortCut->cAlphaArgs(1);

// initialize nth chiller heater index (including identical units) for current wrapper
if (Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, ErrorsFound)) {
continue;
}

if (state.dataIPShortCut->cAlphaArgs(2) == "SMARTMIXING") {
state.dataPlantCentralGSHP->Wrapper(WrapperNum).ControlMode = CondenserType::SmartMixing;
}
Expand Down Expand Up @@ -1202,7 +1197,6 @@ void GetChillerHeaterInput(EnergyPlusData &state)
state.dataIPShortCut->cNumericFieldNames);

state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).Name = state.dataIPShortCut->cAlphaArgs(1);
Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, CHErrorsFound);

if (Util::SameString(state.dataIPShortCut->cAlphaArgs(4), "LEAVINGCONDENSER")) {
state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).CondModeCooling = CondenserModeTemperature::LeavingCondenser;
Expand Down
7 changes: 0 additions & 7 deletions src/EnergyPlus/PlantChillers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ namespace PlantChillers {

ErrorObjectHeader eoh{routineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1)};

Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, ErrorsFound);

// ErrorsFound will be set to True if problem was found, left untouched otherwise
GlobalNames::VerifyUniqueChillerName(state,
state.dataIPShortCut->cCurrentModuleObject,
Expand Down Expand Up @@ -2216,8 +2214,6 @@ namespace PlantChillers {

ErrorObjectHeader eoh{routineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1)};

Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, ErrorsFound);

// ErrorsFound will be set to True if problem was found, left untouched otherwise
GlobalNames::VerifyUniqueChillerName(state,
state.dataIPShortCut->cCurrentModuleObject,
Expand Down Expand Up @@ -4237,8 +4233,6 @@ namespace PlantChillers {

ErrorObjectHeader eoh{routineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1)};

Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, ErrorsFound);

// ErrorsFound will be set to True if problem was found, left untouched otherwise
GlobalNames::VerifyUniqueChillerName(state,
state.dataIPShortCut->cCurrentModuleObject,
Expand Down Expand Up @@ -6176,7 +6170,6 @@ namespace PlantChillers {
state.dataIPShortCut->cNumericFieldNames);

ErrorObjectHeader eoh{routineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1)};
Util::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cCurrentModuleObject, ErrorsFound);

// ErrorsFound will be set to True if problem was found, left untouched otherwise
GlobalNames::VerifyUniqueChillerName(state,
Expand Down
Loading