From f860a9351944d70f578058a5023d4975012806e6 Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Sat, 31 Aug 2024 18:47:55 -0400 Subject: [PATCH 1/8] reduce and shadow --- src/EnergyPlus/ZoneContaminantPredictorCorrector.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc index 32863ffb574..359962468fc 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc @@ -1504,7 +1504,6 @@ void InitZoneContSetPoints(EnergyPlusData &state) Real64 Pi; // Pressue at zone i Real64 Pj; // Pressue at zone j Real64 Sch; // Schedule value - bool ErrorsFound(false); if (state.dataContaminantBalance->Contaminant.CO2Simulation) { state.dataContaminantBalance->OutdoorCO2 = @@ -1707,6 +1706,7 @@ void InitZoneContSetPoints(EnergyPlusData &state) } if (allocated(state.dataZoneEquip->ZoneEquipConfig) && state.dataZoneContaminantPredictorCorrector->MyConfigOneTimeFlag) { + bool ErrorsFound = false; for (int ContZoneNum = 1; ContZoneNum <= (int)state.dataContaminantBalance->ContaminantControlledZone.size(); ++ContZoneNum) { int ZoneNum = state.dataContaminantBalance->ContaminantControlledZone(ContZoneNum).ActualZoneNum; for (int zoneInNode = 1; zoneInNode <= state.dataZoneEquip->ZoneEquipConfig(ZoneNum).NumInletNodes; ++zoneInNode) { @@ -1817,13 +1817,13 @@ void InitZoneContSetPoints(EnergyPlusData &state) // From decay model for (auto &con : state.dataContaminantBalance->ZoneContamGenericDecay) { - int Sch = ScheduleManager::GetCurrentScheduleValue(state, con.GCEmiRateSchedPtr); - if (Sch == 0.0 || state.dataGlobal->BeginEnvrnFlag || state.dataGlobal->WarmupFlag) { + int intSch = ScheduleManager::GetCurrentScheduleValue(state, con.GCEmiRateSchedPtr); + if (intSch == 0.0 || state.dataGlobal->BeginEnvrnFlag || state.dataGlobal->WarmupFlag) { con.GCTime = 0.0; } else { con.GCTime += state.dataGlobal->TimeStepZoneSec; } - GCGain = con.GCInitEmiRate * Sch * std::exp(-con.GCTime / con.GCDelayTime); + GCGain = con.GCInitEmiRate * intSch * std::exp(-con.GCTime / con.GCDelayTime); con.GCGenRate = GCGain; } From 32cd650882f4ed0f9a88d1f5aee2fce8671a7671 Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Sat, 31 Aug 2024 18:52:17 -0400 Subject: [PATCH 2/8] shadow --- src/EnergyPlus/ZoneContaminantPredictorCorrector.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc index 359962468fc..8c24c07b25f 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc @@ -2051,7 +2051,6 @@ void PredictZoneContaminants(EnergyPlusData &state, // Calculate the coefficients for the 3rd Order derivative for final // zone CO2. The A, B, C coefficients are analogous to the CO2 balance. // Assume that the system will have flow - auto &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(ZoneNum); if (state.afn->multizone_always_simulated || (state.afn->simulation_control.type == AirflowNetwork::ControlType::MultizoneWithDistributionOnlyDuringFanOperation && state.afn->AirflowNetworkFanActivated)) { @@ -2165,7 +2164,6 @@ void PredictZoneContaminants(EnergyPlusData &state, // Calculate the coefficients for the 3rd Order derivative for final // zone GC. The A, B, C coefficients are analogous to the GC balance. // Assume that the system will have flow - auto &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(ZoneNum); if (state.afn->multizone_always_simulated || (state.afn->simulation_control.type == AirflowNetwork::ControlType::MultizoneWithDistributionOnlyDuringFanOperation && state.afn->AirflowNetworkFanActivated)) { From 33402037c69fd80eace958c77bedb1447cfd2c98 Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Sat, 31 Aug 2024 18:57:57 -0400 Subject: [PATCH 3/8] const args --- src/EnergyPlus/ZoneContaminantPredictorCorrector.cc | 12 ++++++------ src/EnergyPlus/ZoneContaminantPredictorCorrector.hh | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc index 8c24c07b25f..5a6e9c0d0d2 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc @@ -2332,12 +2332,12 @@ void RevertZoneTimestepHistories(EnergyPlusData &state) } void InverseModelCO2(EnergyPlusData &state, - int const ZoneNum, // Zone number - Real64 &CO2Gain, // Zone total CO2 gain - Real64 &CO2GainExceptPeople, // ZOne total CO2 gain from sources except for people - Real64 &ZoneMassFlowRate, // Zone air mass flow rate - Real64 &CO2MassFlowRate, // Zone air CO2 mass flow rate - Real64 &RhoAir // Air density + int const ZoneNum, // Zone number + Real64 const CO2Gain, // Zone total CO2 gain + Real64 const CO2GainExceptPeople, // ZOne total CO2 gain from sources except for people + Real64 const ZoneMassFlowRate, // Zone air mass flow rate + Real64 const CO2MassFlowRate, // Zone air CO2 mass flow rate + Real64 const RhoAir // Air density ) { // SUBROUTINE INFORMATION: diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh b/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh index 0201ede7c4d..230fd43e58f 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh @@ -87,12 +87,12 @@ namespace ZoneContaminantPredictorCorrector { void RevertZoneTimestepHistories(EnergyPlusData &state); void InverseModelCO2(EnergyPlusData &state, - int ZoneNum, // Zone number - Real64 &CO2Gain, // Zone total CO2 gain - Real64 &CO2GainExceptPeople, // ZOne total CO2 gain from sources except for people - Real64 &ZoneMassFlowRate, // Zone air mass flow rate - Real64 &CO2MassFlowRate, // Zone air CO2 mass flow rate - Real64 &RhoAir // Air density + int ZoneNum, // Zone number + Real64 CO2Gain, // Zone total CO2 gain + Real64 CO2GainExceptPeople, // ZOne total CO2 gain from sources except for people + Real64 ZoneMassFlowRate, // Zone air mass flow rate + Real64 CO2MassFlowRate, // Zone air CO2 mass flow rate + Real64 RhoAir // Air density ); void CorrectZoneContaminants(EnergyPlusData &state, From 05bb46d5af88a2117f395f9e189e1d3b3e5af37a Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Sat, 31 Aug 2024 19:01:36 -0400 Subject: [PATCH 4/8] const --- src/EnergyPlus/ZoneContaminantPredictorCorrector.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc index 5a6e9c0d0d2..ad19296411e 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc @@ -2361,7 +2361,7 @@ void InverseModelCO2(EnergyPlusData &state, state.dataEnvrn->DayOfYear <= state.dataHybridModel->HybridModelZone(ZoneNum).HybridEndDayOfYear) { state.dataContaminantBalance->ZoneAirCO2(ZoneNum) = state.dataHeatBal->Zone(ZoneNum).ZoneMeasuredCO2Concentration; - auto &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(ZoneNum); + auto const &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(ZoneNum); if (state.dataHybridModel->HybridModelZone(ZoneNum).InfiltrationCalc_C && state.dataHVACGlobal->UseZoneTimeStepHistory) { static constexpr std::string_view RoutineNameInfiltration("CalcAirFlowSimple:Infiltration"); // Conditionally calculate the CO2-dependent and CO2-independent terms. @@ -2573,7 +2573,7 @@ void CorrectZoneContaminants(EnergyPlusData &state, // Calculate moisture flow rate into each zone for (int NodeNum = 1; NodeNum <= state.dataZoneEquip->ZoneEquipConfig(ZoneNum).NumInletNodes; ++NodeNum) { - auto &node = state.dataLoopNodes->Node(state.dataZoneEquip->ZoneEquipConfig(ZoneNum).InletNode(NodeNum)); + auto const &node = state.dataLoopNodes->Node(state.dataZoneEquip->ZoneEquipConfig(ZoneNum).InletNode(NodeNum)); if (state.dataContaminantBalance->Contaminant.CO2Simulation) { CO2MassFlowRate += (node.MassFlowRate * node.CO2) / ZoneMult; } @@ -2586,7 +2586,7 @@ void CorrectZoneContaminants(EnergyPlusData &state, // Do the calculations for the plenum zone } else if (ZoneRetPlenumAirFlag) { for (int NodeNum = 1; NodeNum <= state.dataZonePlenum->ZoneRetPlenCond(ZoneRetPlenumNum).NumInletNodes; ++NodeNum) { - auto &node = state.dataLoopNodes->Node(state.dataZonePlenum->ZoneRetPlenCond(ZoneRetPlenumNum).InletNode(NodeNum)); + auto const &node = state.dataLoopNodes->Node(state.dataZonePlenum->ZoneRetPlenCond(ZoneRetPlenumNum).InletNode(NodeNum)); if (state.dataContaminantBalance->Contaminant.CO2Simulation) { CO2MassFlowRate += (node.MassFlowRate * node.CO2) / ZoneMult; } @@ -2600,7 +2600,7 @@ void CorrectZoneContaminants(EnergyPlusData &state, int ADUNum = state.dataZonePlenum->ZoneRetPlenCond(ZoneRetPlenumNum).ADUIndex(ADUListIndex); if (state.dataDefineEquipment->AirDistUnit(ADUNum).UpStreamLeak) { auto &airDistUnit = state.dataDefineEquipment->AirDistUnit(ADUNum); - auto &node = state.dataLoopNodes->Node(airDistUnit.InletNodeNum); + auto const &node = state.dataLoopNodes->Node(airDistUnit.InletNodeNum); if (state.dataContaminantBalance->Contaminant.CO2Simulation) { CO2MassFlowRate += (airDistUnit.MassFlowRateUpStrLk * node.CO2) / ZoneMult; } @@ -2611,7 +2611,7 @@ void CorrectZoneContaminants(EnergyPlusData &state, } if (state.dataDefineEquipment->AirDistUnit(ADUNum).DownStreamLeak) { auto &airDistUnit = state.dataDefineEquipment->AirDistUnit(ADUNum); - auto &node = state.dataLoopNodes->Node(airDistUnit.OutletNodeNum); + auto const &node = state.dataLoopNodes->Node(airDistUnit.OutletNodeNum); if (state.dataContaminantBalance->Contaminant.CO2Simulation) { CO2MassFlowRate += (airDistUnit.MassFlowRateDnStrLk * node.CO2) / ZoneMult; } @@ -2623,7 +2623,7 @@ void CorrectZoneContaminants(EnergyPlusData &state, } } else if (ZoneSupPlenumAirFlag) { - auto &node = state.dataLoopNodes->Node(state.dataZonePlenum->ZoneSupPlenCond(ZoneSupPlenumNum).InletNode); + auto const &node = state.dataLoopNodes->Node(state.dataZonePlenum->ZoneSupPlenCond(ZoneSupPlenumNum).InletNode); if (state.dataContaminantBalance->Contaminant.CO2Simulation) { CO2MassFlowRate += (node.MassFlowRate * node.CO2) / ZoneMult; } From 79c422a8378be9bbd473e7b2f9a4fc9943fb87ad Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Sat, 31 Aug 2024 19:05:41 -0400 Subject: [PATCH 5/8] unused and reduce --- src/EnergyPlus/ZoneDehumidifier.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/EnergyPlus/ZoneDehumidifier.cc b/src/EnergyPlus/ZoneDehumidifier.cc index 95ec5aa25d2..7328ea976e2 100644 --- a/src/EnergyPlus/ZoneDehumidifier.cc +++ b/src/EnergyPlus/ZoneDehumidifier.cc @@ -749,7 +749,6 @@ namespace ZoneDehumidifier { Real64 AirMassFlowRate; // Air mass flow rate through this dehumidifier (kg/s) Real64 Cp; // Heat capacity of inlet air (J/kg-C) int AirInletNodeNum(0); // Node number for the inlet air to the dehumidifier - int AirOutletNodeNum(0); // Node number for the outlet air from the dehumidifier SensibleOutput = 0.0; LatentOutput = 0.0; @@ -763,7 +762,6 @@ namespace ZoneDehumidifier { ElectricPowerOnCycle = 0.0; AirInletNodeNum = state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumNum).AirInletNodeNum; - AirOutletNodeNum = state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumNum).AirOutletNodeNum; InletAirTemp = state.dataLoopNodes->Node(AirInletNodeNum).Temp; InletAirHumRat = state.dataLoopNodes->Node(AirInletNodeNum).HumRat; @@ -1105,7 +1103,6 @@ namespace ZoneDehumidifier { Real64 RhoWater; // Density of condensate (water) being removed (kg/m3) Real64 InletAirTemp; // Dry-bulb temperature of air entering the dehumidifier (C) Real64 OutletAirTemp; // Dry-bulb temperature of air leaving the dehumidifier (C) - int AirInletNodeNum; // Node number corresponding to the air entering dehumidifier state.dataZoneDehumidifier->ZoneDehumid(DehumidNum).SensHeatingEnergy = state.dataZoneDehumidifier->ZoneDehumid(DehumidNum).SensHeatingRate * TimeStepSysSec; @@ -1121,7 +1118,7 @@ namespace ZoneDehumidifier { // Calculate and report condensation rate (how much water extracted from the air stream) // Volumetric flow of water in m3/s for water system interactions - AirInletNodeNum = state.dataZoneDehumidifier->ZoneDehumid(DehumidNum).AirInletNodeNum; + int AirInletNodeNum = state.dataZoneDehumidifier->ZoneDehumid(DehumidNum).AirInletNodeNum; InletAirTemp = state.dataLoopNodes->Node(AirInletNodeNum).Temp; OutletAirTemp = max((InletAirTemp - 11.0), 1.0); // Assume coil outlet air is 11C (20F) lower than inlet air temp RhoWater = RhoH2O(OutletAirTemp); // Density of water, minimum temp = 1.0 C From c075bbb880e247fa455d94a161de5185c1ac3ccc Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Sat, 31 Aug 2024 19:37:27 -0400 Subject: [PATCH 6/8] reduce --- src/EnergyPlus/ZoneAirLoopEquipmentManager.cc | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc b/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc index e8eafa14f85..92af6665c4b 100644 --- a/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc +++ b/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc @@ -217,28 +217,25 @@ namespace ZoneAirLoopEquipmentManager { static std::string const CurrentModuleObject("ZoneHVAC:AirDistributionUnit"); // Object type for getting and error messages // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int AirDistUnitNum; - int AirDistCompUnitNum; - int NumAlphas; - int NumNums; - int IOStat; bool ErrorsFound(false); // If errors detected in input - bool IsNotOK; // Flag to verify name Array1D_string AlphArray(5); Array1D NumArray(2); Array1D_string cAlphaFields(5); // Alpha field names Array1D_string cNumericFields(2); // Numeric field names Array1D_bool lAlphaBlanks(5); // Logical array, alpha field input BLANK = .TRUE. Array1D_bool lNumericBlanks(2); // Logical array, numeric field input BLANK = .TRUE. - bool DualDuctRecircIsUsed; // local temporary for deciding if recirc side used by dual duct terminal int NumAirDistUnits = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, CurrentModuleObject); state.dataDefineEquipment->AirDistUnit.allocate(NumAirDistUnits); if (NumAirDistUnits > 0) { + int NumAlphas; + int NumNums; + int IOStat; + bool IsNotOK; // Flag to verify name - for (AirDistUnitNum = 1; AirDistUnitNum <= NumAirDistUnits; ++AirDistUnitNum) { + for (int AirDistUnitNum = 1; AirDistUnitNum <= NumAirDistUnits; ++AirDistUnitNum) { auto &airDistUnit = state.dataDefineEquipment->AirDistUnit(AirDistUnitNum); state.dataInputProcessing->inputProcessor->getObjectItem(state, CurrentModuleObject, @@ -267,7 +264,7 @@ namespace ZoneAirLoopEquipmentManager { ObjectIsParent); airDistUnit.InletNodeNum = 0; airDistUnit.NumComponents = 1; - AirDistCompUnitNum = 1; + int AirDistCompUnitNum = 1; // Load the air Distribution Unit Equip and Name airDistUnit.EquipType(AirDistCompUnitNum) = AlphArray(3); airDistUnit.EquipName(AirDistCompUnitNum) = AlphArray(4); @@ -387,6 +384,7 @@ namespace ZoneAirLoopEquipmentManager { airDistUnit.EquipName(AirDistCompUnitNum), "UNDEFINED", AlphArray(2)); + bool DualDuctRecircIsUsed; // local temporary for deciding if recirc side used by dual duct terminal GetDualDuctOutdoorAirRecircUse( state, airDistUnit.EquipType(AirDistCompUnitNum), airDistUnit.EquipName(AirDistCompUnitNum), DualDuctRecircIsUsed); if (DualDuctRecircIsUsed) { @@ -409,7 +407,7 @@ namespace ZoneAirLoopEquipmentManager { } } // End of Air Dist Do Loop - for (AirDistUnitNum = 1; AirDistUnitNum <= (int)state.dataDefineEquipment->AirDistUnit.size(); ++AirDistUnitNum) { + for (int AirDistUnitNum = 1; AirDistUnitNum <= (int)state.dataDefineEquipment->AirDistUnit.size(); ++AirDistUnitNum) { auto &airDistUnit = state.dataDefineEquipment->AirDistUnit(AirDistUnitNum); SetupOutputVariable(state, "Zone Air Terminal Sensible Heating Energy", @@ -557,8 +555,6 @@ namespace ZoneAirLoopEquipmentManager { bool ProvideSysOutput; int AirDistCompNum; - int InNodeNum; // air distribution unit inlet node - int OutNodeNum; // air distribution unit outlet node int AirLoopNum(0); // index of air loop Real64 MassFlowRateMaxAvail; // max avail mass flow rate excluding leaks [kg/s] Real64 MassFlowRateMinAvail; // min avail mass flow rate excluding leaks [kg/s] @@ -574,8 +570,8 @@ namespace ZoneAirLoopEquipmentManager { NonAirSysOutput = 0.0; auto &airDistUnit = state.dataDefineEquipment->AirDistUnit(AirDistUnitNum); - InNodeNum = airDistUnit.InletNodeNum; - OutNodeNum = airDistUnit.OutletNodeNum; + int InNodeNum = airDistUnit.InletNodeNum; + int OutNodeNum = airDistUnit.OutletNodeNum; MassFlowRateMaxAvail = 0.0; MassFlowRateMinAvail = 0.0; // check for no plenum From dcf51090c8e552af95287572b58067e042e556b2 Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Sat, 31 Aug 2024 19:42:24 -0400 Subject: [PATCH 7/8] reduce --- src/EnergyPlus/WindowModel.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EnergyPlus/WindowModel.cc b/src/EnergyPlus/WindowModel.cc index f9b1241fb3a..aca4f7c5058 100644 --- a/src/EnergyPlus/WindowModel.cc +++ b/src/EnergyPlus/WindowModel.cc @@ -78,13 +78,13 @@ namespace Window { // PURPOSE OF THIS SUBROUTINE: // Reads input and creates instance of WindowModel object - int NumNums; - int NumAlphas; - int IOStat; auto aModel = std::make_unique(); // (AUTO_OK) int numCurrModels = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, objectName); if (numCurrModels > 0) { + int NumNums; + int NumAlphas; + int IOStat; state.dataInputProcessing->inputProcessor->getObjectItem( state, objectName, 1, state.dataIPShortCut->cAlphaArgs, NumAlphas, state.dataIPShortCut->rNumericArgs, NumNums, IOStat); // Please consider using getEnumValue pattern here. From 31d58deb359e021c4809e0682f4bb1f575c1ddd8 Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Sat, 31 Aug 2024 19:48:12 -0400 Subject: [PATCH 8/8] const --- src/EnergyPlus/WindowManagerExteriorOptical.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EnergyPlus/WindowManagerExteriorOptical.cc b/src/EnergyPlus/WindowManagerExteriorOptical.cc index f30aa1fdf76..01f1da3db38 100644 --- a/src/EnergyPlus/WindowManagerExteriorOptical.cc +++ b/src/EnergyPlus/WindowManagerExteriorOptical.cc @@ -388,7 +388,7 @@ namespace Window { { int blindDataPtr = m_MaterialProperties.BlindDataPtr; assert(blindDataPtr > 0); - auto &blind = state.dataMaterial->Blind(blindDataPtr); + auto const &blind = state.dataMaterial->Blind(blindDataPtr); CWavelengthRange aRange(WavelengthRange::Visible); Real64 lowLambda = aRange.minLambda(); @@ -406,7 +406,7 @@ namespace Window { { int blindDataPtr = m_MaterialProperties.BlindDataPtr; assert(blindDataPtr > 0); - auto &blind = state.dataMaterial->Blind(blindDataPtr); + auto const &blind = state.dataMaterial->Blind(blindDataPtr); CWavelengthRange aRange(WavelengthRange::Solar); Real64 lowLambda = aRange.minLambda(); @@ -525,7 +525,7 @@ namespace Window { { const int blindDataPtr = m_Material.BlindDataPtr; assert(blindDataPtr > 0); - auto &blind = state.dataMaterial->Blind(blindDataPtr); + auto const &blind = state.dataMaterial->Blind(blindDataPtr); Real64 slatWidth = blind.SlatWidth; Real64 slatSpacing = blind.SlatSeparation;