Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -4431,9 +4431,8 @@ \subsubsection{Inputs}
\paragraph{Field: Third Fuel Type}
This alpha field specifies the fuel type associated with the \hyperref[tablelookup]{Table:Lookup} object specified in field ''System Third Fuel Consumption Lookup Table``. Valid choices include: None, Electricity, NaturalGas, Propane, FuelOilNo1, FuelOilNo2, Diesel, Gasoline, Coal, OtherFuel1, OtherFuel2, Steam, \hyperref[districtheating]{DistrictHeatingWater} and \hyperref[districtcooling]{DistrictCooling}. If this field is blank, the default second fuel type is None.

\paragraph{Field: Objective Function to Minimize}
In each time step ZoneHVAC:HybridUnitaryHVAC will choose one or more combinations of the controlled independent variables, subject to constraints, so as to best satisfy sensible load, latent load, and scheduled ventilation with the least amount of resource consumption. This alpha field specifies which resource will be minimized by the optimization. Valid choices include: Electricity Use, Second Fuel Use, Third Fuel Use, and Water Use. If this field is blank, the objective function will minimize electricity use.

\paragraph{Field: Objective Function to Optimize}
In each time step ZoneHVAC:HybridUnitaryHVAC will choose one or more combinations of the controlled independent variables, subject to constraints, so as to best satisfy sensible load, latent load, and scheduled ventilation with the least amount of resource consumption. This alpha field specifies which resource will be optimized. Valid choices include: Electricity Use, Second Fuel Use, Third Fuel Use, Water Use, and Supply Temperature. If this field is blank, the default objective function to optimize is Electricity Use.

\paragraph{Field: Design Specification Outdoor Air Object Name}
This alpha field specifies the name of a \hyperref[designspecificationoutdoorair]{DesignSpecification:OutdoorAir} object which specifies the a schedule for the required standard density volume of outdoor air. If this field is blank, the system may still supply outdoor air, if it is capable, when doing so is the most efficient way to satisfy other constraints.
Expand Down
9 changes: 5 additions & 4 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -37524,7 +37524,7 @@ ZoneHVAC:HybridUnitaryHVAC,
\type object-list
\object-list ScheduleNames
A8, \field Method to Choose Controlled Inputs and Part Runtime Fraction
\note Select the method that will be used to choose operating mode(s), supply air flow rate(s), outdoor air fraction(s) and part runtime fraction(s) in each time step. "Automatic" = chooses controlled inputs and part runtime fraction(s) to minimize resource use within each time step while best satisfying requested sensible cooling, dehumidification and ventilation, and subject to constraints. "User Defined" = EMS will be used to choose controlled inputs and part runtime fraction(s) in each time step. If this field is blank, default to "Automatic".
\note Select the method that will be used to choose operating mode(s), supply air flow rate(s), outdoor air fraction(s) and part runtime fraction(s) in each time step. "Automatic" = chooses controlled inputs and part runtime fraction(s) to optimize resource use within each time step while best satisfying requested sensible cooling, dehumidification and ventilation, and subject to constraints. "User Defined" = EMS will be used to choose controlled inputs and part runtime fraction(s) in each time step. If this field is blank, default to "Automatic".
\type choice
\key Automatic
\key User Defined
Expand Down Expand Up @@ -37640,14 +37640,15 @@ ZoneHVAC:HybridUnitaryHVAC,
\note Select the fuel type associated with field: "System Third Fuel Consumption Lookup Table" in each mode.
\note If this field is blank, default third fuel type = None.
\default None
A18, \field Objective Function to Minimize
A18, \field Objective Function to Optimize
\type choice
\key Electricity Use
\key Second Fuel Use
\key Third Fuel Use
\key Water Use
\note In each time step, controlled variables will be chosen to minimize the selection in this field, subject to constraints.
\note If this field is blank, the objective function will minimize electricity use.
\key Supply Temperature
\note In each time step, controlled variables will be chosen to optimize the selection in this field, subject to constraints.
\note If this field is blank, the default objective function to optimize is Electricity Use.
\default Electricity Use
A19, \field Design Specification Outdoor Air Object Name
\type object-list
Expand Down
72 changes: 54 additions & 18 deletions src/EnergyPlus/HybridEvapCoolingModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,8 @@ namespace HybridEvapCoolingModel {
bool DidWeMeetHumidification = false;
bool DidWePartlyMeetLoad = false;
Real64 OptimalSetting_RunFractionTotalFuel = IMPLAUSIBLE_POWER;
Real64 OptimalSetting_RunFractionSupplyTemperature =
CoolingRequested ? std::numeric_limits<Real64>::max() : std::numeric_limits<Real64>::min();
Real64 Tma;
Real64 Wma;
Real64 Hsa;
Expand Down Expand Up @@ -1511,37 +1513,60 @@ namespace HybridEvapCoolingModel {

// Calculate partload fraction required to meet all requirements
// Fraction can be above 1 meaning its not able to do it completely in a time step
Real64 PartRuntimeFraction = CalculatePartRuntimeFraction(MinOA_Msa,
thisSetting.Supply_Air_Ventilation_Volume * state.dataEnvrn->StdRhoAir,
StepIns.RequestedCoolingLoad,
StepIns.RequestedHeatingLoad,
SensibleRoomORZone,
StepIns.ZoneDehumidificationLoad,
StepIns.ZoneMoistureLoad,
latentRoomORZone);

Real64 RunFractionTotalFuel;
thisSetting.Runtime_Fraction = CalculatePartRuntimeFraction(MinOA_Msa,
thisSetting.Supply_Air_Ventilation_Volume * state.dataEnvrn->StdRhoAir,
StepIns.RequestedCoolingLoad,
StepIns.RequestedHeatingLoad,
SensibleRoomORZone,
StepIns.ZoneDehumidificationLoad,
StepIns.ZoneMoistureLoad,
latentRoomORZone);

Real64 RunFractionTotalFuel(0);
Real64 RunFractionSupplyTemperature(0);
switch (ObjectiveFunction) {
default:
case ObjectiveFunctionType::ElectricityUse:
RunFractionTotalFuel = thisSetting.ElectricalPower * PartRuntimeFraction;
RunFractionTotalFuel = thisSetting.ElectricalPower * thisSetting.Runtime_Fraction;
break;
case ObjectiveFunctionType::SecondFuelUse:
RunFractionTotalFuel = thisSetting.SecondaryFuelConsumptionRate * PartRuntimeFraction;
RunFractionTotalFuel = thisSetting.SecondaryFuelConsumptionRate * thisSetting.Runtime_Fraction;
break;
case ObjectiveFunctionType::ThirdFuelUse:
RunFractionTotalFuel = thisSetting.ThirdFuelConsumptionRate * PartRuntimeFraction;
RunFractionTotalFuel = thisSetting.ThirdFuelConsumptionRate * thisSetting.Runtime_Fraction;
break;
case ObjectiveFunctionType::WaterUse:
RunFractionTotalFuel = thisSetting.WaterConsumptionRate * PartRuntimeFraction;
RunFractionTotalFuel = thisSetting.WaterConsumptionRate * thisSetting.Runtime_Fraction;
break;
case ObjectiveFunctionType::SupplyTemperature:
RunFractionSupplyTemperature = thisSetting.SupplyAirTemperature * thisSetting.Runtime_Fraction;
break;
}
thisSetting.Runtime_Fraction = PartRuntimeFraction; //

if (Conditioning_load_met && Humidification_load_met) {
// store best performing mode
if (RunFractionTotalFuel < OptimalSetting_RunFractionTotalFuel) {
bool store_best_performing_mode = false;

if (ObjectiveFunction == ObjectiveFunctionType::SupplyTemperature) {
if (CoolingRequested && RunFractionSupplyTemperature < OptimalSetting_RunFractionSupplyTemperature) {
store_best_performing_mode = true;
OptimalSetting_RunFractionSupplyTemperature = RunFractionSupplyTemperature;
}
if (HeatingRequested && RunFractionSupplyTemperature > OptimalSetting_RunFractionSupplyTemperature) {
store_best_performing_mode = true;
OptimalSetting_RunFractionSupplyTemperature = RunFractionSupplyTemperature;
}
// fall back to ElectricityUse since ventilation-only is just fan operation
if (!CoolingRequested && !HeatingRequested && VentilationRequested &&
RunFractionTotalFuel < OptimalSetting_RunFractionTotalFuel) {
store_best_performing_mode = true;
OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel;
}
} else if (RunFractionTotalFuel < OptimalSetting_RunFractionTotalFuel) {
store_best_performing_mode = true;
OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel;
}

if (store_best_performing_mode) {
OptimalSetting = thisSetting;
DidWeMeetLoad = true;
DidWeMeetHumidification = true;
Expand Down Expand Up @@ -1572,8 +1597,19 @@ namespace HybridEvapCoolingModel {
PreviousMaxiumConditioningOutput = SensibleRoomORZone;
}
}

if (store_best_attempt) {
OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel;
if (ObjectiveFunction == ObjectiveFunctionType::SupplyTemperature) {
if (CoolingRequested || HeatingRequested) {
OptimalSetting_RunFractionSupplyTemperature = RunFractionSupplyTemperature;
}
// fall back to ElectricityUse since ventilation-only is just fan operation
if (!CoolingRequested && !HeatingRequested && VentilationRequested) {
OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel;
}
} else {
OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel;
}
OptimalSetting = thisSetting;
DidWePartlyMeetLoad = true;
}
Expand Down
5 changes: 3 additions & 2 deletions src/EnergyPlus/HybridEvapCoolingModel.hh
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ namespace HybridEvapCoolingModel {
SecondFuelUse,
ThirdFuelUse,
WaterUse,
SupplyTemperature,
Num
};

constexpr std::array<std::string_view, (int)ObjectiveFunctionType::Num> objectiveFunctionNamesUC = {
"ELECTRICITY USE", "SECOND FUEL USE", "THIRD FUEL USE", "WATER USE"};
"ELECTRICITY USE", "SECOND FUEL USE", "THIRD FUEL USE", "WATER USE", "SUPPLY TEMPERATURE"};

class CModeSolutionSpace
{
Expand Down Expand Up @@ -261,7 +262,7 @@ namespace HybridEvapCoolingModel {
Constant::eFuel firstFuel = Constant::eFuel::Invalid; // First fuel type, currently electricity is only option
Constant::eFuel secondFuel = Constant::eFuel::Invalid; // Second fuel type
Constant::eFuel thirdFuel = Constant::eFuel::Invalid; // Third fuel type
ObjectiveFunctionType ObjectiveFunction = ObjectiveFunctionType::ElectricityUse; // Objective function to minimize
ObjectiveFunctionType ObjectiveFunction = ObjectiveFunctionType::ElectricityUse; // Objective function to optimize

int UnitOn; // feels like it should be a bool but its an output and I couldn't get it to work as a bool
Real64 UnitTotalCoolingRate; // unit output to zone, total cooling rate [W]
Expand Down
2 changes: 1 addition & 1 deletion testfiles/UnitaryHybridAC_DedicatedOutsideAir.idf
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@
Electricity, !- First Fuel Type
NaturalGas, !- Second Fuel Type
DistrictCooling, !- Third Fuel Type
, !- Objective Function to Minimize
, !- Objective Function to Optimize
SZ DSOA SPACE2-1, !- Design Specification Outdoor Air Object Name
Mode0 Standby, !- Mode 0 Name
, !- Mode 0 Supply Air Temperature Lookup Table Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@
Electricity, !- First Fuel Type
NaturalGas, !- Second Fuel Type
DistrictCooling, !- Third Fuel Type
, !- Objective Function to Minimize
, !- Objective Function to Optimize
SZ DSOA SPACE2-1, !- Design Specification Outdoor Air Object Name
Mode0 Standby, !- Mode 0 Name
, !- Mode 0 Supply Air Temperature Lookup Table Name
Expand Down
Loading
Loading