private void BatchCalculateEstValue(List <IDUEquipmentModel> IDUEquipmentModelList, ref List <IDUEquipmentModel> objEquipmentList) { if (SelectedFanSpeed != -1) { _fanSpeedLevel = SelectedFanSpeed - 1; } double outdoorCoolingDB = SystemSetting.UserSetting.defaultSetting.OutdoorCoolingDB; double outdoorHeatingWB = SystemSetting.UserSetting.defaultSetting.OutdoorHeatingWB; double outdoorCoolingIW = SystemSetting.UserSetting.defaultSetting.OutdoorCoolingIW; double outdoorHeatingIW = SystemSetting.UserSetting.defaultSetting.OutdoorHeatingIW; double wb_c = Unit.ConvertToSource(Convert.ToDouble(LblWbCool), UnitType.TEMPERATURE, SystemSetting.UserSetting.unitsSetting.settingTEMPERATURE); double db_h = Unit.ConvertToSource(Convert.ToDouble(LblDBHeat), UnitType.TEMPERATURE, SystemSetting.UserSetting.unitsSetting.settingTEMPERATURE); double fa = 0; double airflow = 0; double staticPressure = 0; for (int i = 0; i < IDUEquipmentModelList.Count; ++i) { Indoor inItem = indoorBLL.GetItem(IDUEquipmentModelList[i].ModelFull, null, IDUEquipmentModelList[i].ProductType, null); if (inItem == null) { continue; } double est_cool = 0; double est_heat = 0; double est_sh = 0; string type = inItem.Type; if (type.Contains("YDCF") || (type.Contains("Fresh Air") && JCHVRF.Model.Project.CurrentProject.SubRegionCode != "LA_BR") || type.Contains("Ventilation")) { est_cool = inItem.CoolingCapacity; est_heat = inItem.HeatingCapacity; est_sh = inItem.SensibleHeat; } else if (type.Contains("Hydro Free") || type == "DX-Interface") { est_cool = inItem.CoolingCapacity; est_heat = inItem.HeatingCapacity; est_sh = 0d; } else { double db_c = inItem.ProductType.Contains("Water Source") ? outdoorCoolingIW : outdoorCoolingDB; double wb_h = inItem.ProductType.Contains("Water Source") ? outdoorHeatingIW : outdoorHeatingWB; est_cool = indoorBLL.CalIndoorEstCapacity(inItem, db_c, wb_c, false); double shf = inItem.GetSHF(_fanSpeedLevel); est_sh = est_cool * shf; if (!inItem.ProductType.Contains(", CO")) { est_heat = indoorBLL.CalIndoorEstCapacity(inItem, wb_h, db_h, true); } } if (IndoorBLL.IsFreshAirUnit(type)) { fa = inItem.AirFlow; } else if (!type.Contains("Hydro Free") && type != "DX-Interface") { airflow = inItem.GetAirFlow(_fanSpeedLevel); if (type.Contains("Ducted") || type.Contains("Total Heat Exchanger")) { staticPressure = inItem.GetStaticPressure(); } } objEquipmentList.Add(new IDUEquipmentModel { Model = IDUEquipmentModelList[i].Model, ModelFull = IDUEquipmentModelList[i].ModelFull, ModelYork = IDUEquipmentModelList[i].ModelYork, ModelHitachi = IDUEquipmentModelList[i].ModelHitachi, CoolCapacity = Math.Round(est_cool, 1), SensibleHeat = Math.Round(est_sh, 1), HeatCapacity = Math.Round(est_heat, 1), AirFlow = Math.Round(airflow, 1, MidpointRounding.AwayFromZero), Type = IDUEquipmentModelList[i].Type, ESP = staticPressure }); } }
// 将选择的室内机预添加到已选室内机 /// <summary> /// 将选择的室内机预添加到已选室内机,并执行容量估算 /// </summary> /// <param name="stdRow">标准表记录行</param> /// <param name="isAppend">是否附加到已选记录行,true则附加且count值可修改;false则添加唯一记录且count值不可修改</param> private void DoCalculateEstValue(DataRow stdRow) { string type = _unitType; //this.jccmbType.Text.Trim(); //由于untTypeList中的值含有厂名,所以在取出来的时候需要去掉 20161118 by Yunxiao Lin int i = type.IndexOf("-"); if (i > 0) { if (thisProject.RegionCode != "EU_W" && thisProject.RegionCode != "EU_S" && thisProject.RegionCode != "EU_E") //EU区域的 暂时不取厂名 20180302 by xyj { type = type.Substring(0, i); } } string modelFull = stdRow["ModelFull"].ToString(); Indoor inItem = bll.GetItem(modelFull, type, _productType, _series); if (inItem != null) { inItem.Series = _series; //将当前的series封装室内机列表 add on 20161027 } if (type.Contains("YDCF")) { est_cool = Convert.ToDouble(stdRow["CoolCapacity"].ToString()); est_heat = Convert.ToDouble(stdRow["HeatCapacity"].ToString()); est_sh = Convert.ToDouble(stdRow["SensibleHeat"].ToString()); } else { // 执行容量估算 double wb_c = rq_wb_c; double db_c = rq_db_c; double db_h = rq_db_h; double wb_h = rq_wb_h; //double est_sh_h = 0; //est_cool = bll.CalIndoorEstCapacity(inItem, db_c, wb_c, out est_sh, false); //估算室内机容量不再返回显热 20161111 by Yunxiao Lin est_cool = bll.CalIndoorEstCapacity(inItem, db_c, wb_c, false); if (!ValidateEstCapacity(est_cool, inItem.PartLoadTableName)) { return; } //显热由估算容量乘以SHF系数得到 20161112 by Yunxiao Lin //double shf = 0d; //if (_shf_mode == "High") // shf = inItem.SHF_Hi; //else if (_shf_mode == "Medium") // shf = inItem.SHF_Med; //else // shf = inItem.SHF_Lo; //if (shf == 0d) // shf = inItem.SHF_Hi; double shf = inItem.GetSHF(_fanSpeedLevel); est_sh = est_cool * shf; if (!inItem.ProductType.Contains(", CO")) { //估算室内机容量不再返回显热 20161111 by Yunxiao Lin //est_heat = bll.CalIndoorEstCapacity(inItem, wb_h, db_h, out est_sh_h, true); est_heat = bll.CalIndoorEstCapacity(inItem, wb_h, db_h, true); if (!ValidateEstCapacity(est_heat, inItem.PartLoadTableName)) { return; } } } airflow = Convert.ToDouble(stdRow["AirFlow"].ToString()); }