ningshuxia
2025-03-28 94ebf14787ea1c67b6a6139a2b19e3693b809625
WinFrmUI/PBS.WinFrmUI.Hydro/06-schedule-simulation/SimulationSchedulePage.cs
@@ -1044,7 +1044,7 @@
                calcValue.TargetHead = targetHead;
                calcValues.Add(calcValue);
                var schemes = calcHelper.CalcSchemes(simuPumps.Values.ToList(), complexRequestPras, null, combinRunStatus, out string errorInfo);
                var schemes = calcHelper.CalcSchemes(simuPumps.Values.ToList(), complexRequestPras, combinRunStatus, out string errorInfo);
                if (schemes == null || !schemes.Any())
                {
                    calcValue.CalcSuccess = false;
@@ -1115,14 +1115,14 @@
            };
            var simuTime = dateTime;
            complexRequestPras.OutletPipePara = new List<Dispatch.Model.OutletPipePara>();
            complexRequestPras.OutletPipePara.Add(new OutletPipePara()
            {
                TargetFlow = targetFlow,
                TargetPress = targetHead
            });
            var combin = _pumpCombine[combinIndex];
            var combinRunStatus = new Dispatch.Model.MachineRunPara();
            combinRunStatus.MachineRunFilter = new List<MachineRunFilter>();
@@ -1144,7 +1144,7 @@
            double.TryParse(this.txtEndP.Text, out double endP);
            //计算
            var schemes = calcHelper.CalcSchemes(simuPumps, complexRequestPras, null, combinRunStatus, out string errorInfo);
            var schemes = calcHelper.CalcSchemes(simuPumps, complexRequestPras,   combinRunStatus, out string errorInfo);
            if (schemes == null || !schemes.Any())
            {
                return default;
@@ -1166,13 +1166,13 @@
            {
                calcValue.Pumps = new List<PumpViewModel>();
                foreach (var item in scheme.Items)
                {
                    calcValue.Pumps = GetPumpViewModelList(targetFlow,item, out double clac_power);
                {
                    calcValue.Pumps = GetPumpViewModelList(targetFlow, item, out double clac_power);
                }
            }
            complexRequestPras.OutletPipePara[0].TargetPress = constantP;
            var compareSchemes = calcHelper.CalcSchemes(simuPumps, complexRequestPras, null, combinRunStatus, out errorInfo);
            var compareSchemes = calcHelper.CalcSchemes(simuPumps, complexRequestPras, combinRunStatus, out errorInfo);
            if (compareSchemes != null && compareSchemes.Any())
            {
                var compareScheme = compareSchemes[0];
@@ -1185,51 +1185,7 @@
        private List<PumpViewModel> GetPumpViewModelList(double targetFlow, AnaSchemeItem item, out double clac_power)
        {
            //var pump = _pumpMainList.Find(x => x.ID == item.Flag);
            //var curve = _pumpCurveList[pump.ID];
            //clac_power = 0;
            //var calc_pump = new PumpViewModel();
            //calc_pump.DbID = item.Flag;
            //calc_pump.Name = pump.Name + "-变压";
            //calc_pump.HZ = item.Frequency;
            //calc_pump.Power = item.Power;
            //calc_pump.Eff = item.Eff;
            //calc_pump.Head = item.Head;
            //calc_pump.Flow = item.Flow;
            ////calc_pump.CurveInfoQH = item.GetDescription;
            ////calc_pump.CurveInfoQP = item.CurveInfoQP;
            //var pt = new Yw.Geometry.Point2d(targetFlow, _constantPressure);
            //var sect_pt = Yw.Pump.PerformParabolaHelper.GetQHSectPoint(Item1, pt);
            //if (sect_pt == null || sect_pt.IsZeroPoint())
            //    return null;
            //var wrk_speed = sect_pt.Y.CalculateSimuByH(pump.RatedSpeed, pt.Y);
            //var wrk_fre = Math.Round(wrk_speed / pump.RatedSpeed * 50, 1);
            //var wrk_curve_qh = new Yw.Pump.CurveQH(Yw.Ahart.eFeatType.Cubic, Item1.GetPointListByN(pump.RatedSpeed, wrk_speed));
            //var wrk_curve_qp = new Yw.Pump.CurveQP(Yw.Ahart.eFeatType.Cubic, Item2.GetPointListByN(pump.RatedSpeed, wrk_speed));
            //var wrk_power = wrk_curve_qp.FeatGetPointY(targetFlow);
            //var wrk_eff = Yw.Pump.CalculationHelper.CalcuE(targetFlow, _constantPressure, wrk_power);
            //var calc_pump2 = new PumpViewModel();
            //calc_pump2.DbID = item.Flag;
            //calc_pump2.Name = pump.Name + "-恒压";
            //calc_pump2.HZ = wrk_fre;
            //calc_pump2.Power = Math.Round(wrk_power, 3);
            //calc_pump2.Eff = Math.Round(wrk_eff, 1);
            //calc_pump2.Head = _constantPressure;
            //calc_pump2.Flow = Math.Round(targetFlow, 2);
            //calc_pump2.CurveInfoQH = wrk_curve_qh;
            //calc_pump2.CurveInfoQP = wrk_curve_qp;
            //calc_pump2.IsCalc = true;
            //clac_power = wrk_power;
            //return new List<PumpViewModel>() { calc_pump2, calc_pump };
            clac_power = 0;