Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0
| | |
| | | /// <summary> |
| | | /// å建èµäº§èªå¨å¹é
ViewModel |
| | | /// </summary> |
| | | public static AssetsMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo) |
| | | public static AssetsMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, List<IHydroCalcuResult> allCalcuResultList) |
| | | { |
| | | if (hydroInfo == null) |
| | | { |
| | |
| | | var input = new AssetsMatchingViewModel(); |
| | | |
| | | //æ°´æ³µ |
| | | input.PumpMatchingList = hydroInfo.Pumps?.Select(x => Create(hydroInfo, x)).ToList(); |
| | | input.PumpMatchingList = hydroInfo.Pumps?.Select(x => Create(hydroInfo, x, allCalcuResultList)).ToList(); |
| | | |
| | | //éé¨ |
| | | input.ValveMatchingList = hydroInfo.Valves?.Select(x => Create(hydroInfo, x)).ToList(); |
| | | input.ValveMatchingList = hydroInfo.Valves?.Select(x => Create(hydroInfo, x, allCalcuResultList)).ToList(); |
| | | |
| | | //管é |
| | | input.PipeMatchingList = hydroInfo.Pipes?.Select(x => Create(hydroInfo, x)).ToList(); |
| | | input.PipeMatchingList = hydroInfo.Pipes?.Select(x => Create(hydroInfo, x, allCalcuResultList)).ToList(); |
| | | |
| | | //弯头 |
| | | input.ElbowMatchingList = hydroInfo.Elbows?.Select(x => Create(hydroInfo, x)).ToList(); |
| | | input.ElbowMatchingList = hydroInfo.Elbows?.Select(x => Create(hydroInfo, x, allCalcuResultList)).ToList(); |
| | | |
| | | //ä¸é |
| | | input.ThreelinkMatchingList = hydroInfo.Threelinks?.Select(x => Create(hydroInfo, x)).ToList(); |
| | | input.ThreelinkMatchingList = hydroInfo.Threelinks?.Select(x => Create(hydroInfo, x, allCalcuResultList)).ToList(); |
| | | |
| | | //åé |
| | | input.FourlinkMatchingList = hydroInfo.Fourlinks?.Select(x => Create(hydroInfo, x)).ToList(); |
| | | input.FourlinkMatchingList = hydroInfo.Fourlinks?.Select(x => Create(hydroInfo, x, allCalcuResultList)).ToList(); |
| | | |
| | | return input; |
| | | } |
| | |
| | | /// <summary> |
| | | /// å建泵èªå¨å¹é
ViewModel |
| | | /// </summary> |
| | | public static PumpMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo pumpInfo) |
| | | public static PumpMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo pumpInfo, List<IHydroCalcuResult> allCalcuResultList) |
| | | { |
| | | if (hydroInfo == null) |
| | | { |
| | |
| | | { |
| | | return default; |
| | | } |
| | | return new PumpMatchingViewModel() |
| | | { |
| | | ID = pumpInfo.ID, |
| | | Code = pumpInfo.Code, |
| | | Name = pumpInfo.Name, |
| | | DbLocked = pumpInfo.DbLocked, |
| | | ModelType = pumpInfo.ModelType, |
| | | DbId = pumpInfo.DbId, |
| | | CurveDbId = hydroInfo.Curves?.Find(t => t.Code == pumpInfo.CurveQH)?.DbId, |
| | | RatedP = pumpInfo.RatedP, |
| | | RatedH = pumpInfo.RatedH, |
| | | RatedN = pumpInfo.RatedN, |
| | | RatedQ = pumpInfo.RatedQ, |
| | | }; |
| | | return new PumpMatchingViewModel(pumpInfo, hydroInfo, allCalcuResultList); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建éé¨èªå¨å¹é
ViewModel |
| | | /// </summary> |
| | | public static ValveMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroValveInfo valveInfo) |
| | | public static ValveMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroValveInfo valveInfo, List<IHydroCalcuResult> allCalcuResultList) |
| | | { |
| | | if (hydroInfo == null) |
| | | { |
| | |
| | | /// <summary> |
| | | /// å建管éèªå¨å¹é
ViewModel |
| | | /// </summary> |
| | | public static PipeMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPipeInfo pipeInfo) |
| | | public static PipeMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPipeInfo pipeInfo, List<IHydroCalcuResult> allCalcuResultList) |
| | | { |
| | | if (hydroInfo == null) |
| | | { |
| | |
| | | /// <summary> |
| | | /// å建弯头èªå¨å¹é
ViewModel |
| | | /// </summary> |
| | | public static ElbowMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroElbowInfo elbowInfo) |
| | | public static ElbowMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroElbowInfo elbowInfo, List<IHydroCalcuResult> allCalcuResultList) |
| | | { |
| | | if (hydroInfo == null) |
| | | { |
| | |
| | | /// <summary> |
| | | /// å建ä¸éèªå¨å¹é
ViewModel |
| | | /// </summary> |
| | | public static ThreelinkMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroThreelinkInfo threelinkInfo) |
| | | public static ThreelinkMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroThreelinkInfo threelinkInfo, List<IHydroCalcuResult> allCalcuResultList) |
| | | { |
| | | if (hydroInfo == null) |
| | | { |
| | |
| | | /// <summary> |
| | | /// å建åéèªå¨å¹é
ViewModel |
| | | /// </summary> |
| | | public static FourlinkMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroFourlinkInfo fourlinkInfo) |
| | | public static FourlinkMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroFourlinkInfo fourlinkInfo, List<IHydroCalcuResult> allCalcuResultList) |
| | | { |
| | | if (hydroInfo == null) |
| | | { |
| | |
| | | pump.RatedQ = matching.RatedQ; |
| | | pump.RatedH = matching.RatedH; |
| | | pump.RatedN = matching.RatedN; |
| | | pump.RatedHz = matching.RatedHz; |
| | | |
| | | if (!pump.DbLocked) |
| | | { |
| | |
| | | |
| | | feedBackMsg?.Invoke("æ£å¨è¿è¡äº§åå¹é
...", Color.Black); |
| | | hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroId); |
| | | var matchingParas = AssetsMatchingParasHelper.Create(hydroInfo); |
| | | var matchingParas = AssetsMatchingParasHelper.Create(hydroInfo, null); |
| | | if (AssetsMatchingHelper.Matching(matchingParas, out string error)) |
| | | { |
| | | if (AssetsMatchingParasHelper.Apply(hydroInfo, matchingParas)) |
| | |
| | | |
| | | //æ°´åä¿¡æ¯æ¹æ³ |
| | | private Func<Yw.Model.HydroModelInfo> _hydroInfoFunc = null; |
| | | private Func<List<IHydroCalcuResult>> _allHydroCalcuResultListFunc = null; |
| | | |
| | | /// <summary> |
| | | /// åå§åæ°æ® |
| | | /// </summary> |
| | | public void InitialData(Func<Yw.Model.HydroModelInfo> hydroInfoFunc) |
| | | public void InitialData(Func<Yw.Model.HydroModelInfo> hydroInfoFunc, Func<List<IHydroCalcuResult>> allHydroCalcuResultListFunc) |
| | | { |
| | | _hydroInfoFunc = hydroInfoFunc; |
| | | _allHydroCalcuResultListFunc = allHydroCalcuResultListFunc; |
| | | this.hydroParterPropertyCtrl1.InitialData(hydroInfoFunc); |
| | | } |
| | | |
| | |
| | | } |
| | | var pumpInfo = hydroInfo.Pumps?.Find(x => x.Code == propViewModel.Code); |
| | | |
| | | var input = AssetsMatchingParasHelper.Create(hydroInfo, pumpInfo); |
| | | var input = AssetsMatchingParasHelper.Create(hydroInfo, pumpInfo, _allHydroCalcuResultListFunc?.Invoke()); |
| | | var dlg = new PumpSingleMatchingDlg(); |
| | | dlg.SetBindingData(input); |
| | | dlg.ReloadDataEvent += (rhs) => |
| | |
| | | break; |
| | | } |
| | | |
| | | var input = AssetsMatchingParasHelper.Create(hydroInfo, pumpInfo); |
| | | var input = AssetsMatchingParasHelper.Create(hydroInfo, pumpInfo, _allHydroCalcuResultListFunc?.Invoke()); |
| | | if (string.IsNullOrEmpty(pumpInfo.DbId)) |
| | | { |
| | | var dlg = new PumpSingleMatchingDlg(); |
| | |
| | | { |
| | | break; |
| | | } |
| | | var input = AssetsMatchingParasHelper.Create(hydroInfo, valveInfo); |
| | | var input = AssetsMatchingParasHelper.Create(hydroInfo, valveInfo, _allHydroCalcuResultListFunc?.Invoke()); |
| | | var dlg = new ValveSingleMatchingDlg(); |
| | | dlg.SetBindingData(input); |
| | | dlg.ReloadDataEvent += (rhs) => |
| | |
| | | { |
| | | break; |
| | | } |
| | | var input = AssetsMatchingParasHelper.Create(hydroInfo, elbowInfo); |
| | | var input = AssetsMatchingParasHelper.Create(hydroInfo, elbowInfo, _allHydroCalcuResultListFunc?.Invoke()); |
| | | var dlg = new ElbowSingMatchingDlg(); |
| | | dlg.SetBindingData(input); |
| | | dlg.ReloadDataEvent += (output) => |
| | |
| | | public class PumpMatchingViewModel |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public PumpMatchingViewModel() { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public PumpMatchingViewModel(Yw.Model.HydroPumpInfo rhs, Yw.Model.HydroModelInfo hydroInfo, List<IHydroCalcuResult> allCalcuResult) |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.Code = rhs.Code; |
| | | this.ModelType = rhs.ModelType; |
| | | this.DbId = rhs.DbId; |
| | | this.DbLocked = rhs.DbLocked; |
| | | this.CurveDbId = hydroInfo.Curves?.Find(x => x.Code == rhs.CurveQH)?.DbId; |
| | | this.RatedP = rhs.RatedP; |
| | | this.RatedQ = rhs.RatedQ; |
| | | this.RatedH = rhs.RatedH; |
| | | this.RatedN = rhs.RatedN; |
| | | this.RatedHz = rhs.RatedHz; |
| | | this.CurrentHz = Math.Round(rhs.RatedHz * rhs.SpeedRatio, 1); |
| | | if (allCalcuResult != null && allCalcuResult.Count > 0) |
| | | { |
| | | var calcuResult = allCalcuResult.Find(x => x.Code == rhs.Code) as HydroCalcuLinkResult; |
| | | if (calcuResult != null) |
| | | { |
| | | if (calcuResult.CalcuFlow.HasValue) |
| | | { |
| | | this.CalcuQ = Math.Abs(calcuResult.CalcuFlow.Value); |
| | | } |
| | | |
| | | var calcuResultStart = allCalcuResult.Find(x => x.Code == rhs.StartCode) as HydroCalcuNodeResult; |
| | | var calcuResultEnd = allCalcuResult.Find(x => x.Code == rhs.EndCode) as HydroCalcuNodeResult; |
| | | if (calcuResultStart != null && calcuResultEnd != null) |
| | | { |
| | | if (calcuResultStart.CalcuHead.HasValue && calcuResultEnd.CalcuHead.HasValue) |
| | | { |
| | | this.CalcuH = Math.Round(Math.Abs(calcuResultStart.CalcuHead.Value - calcuResultEnd.CalcuHead.Value), 4); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ID |
| | | /// </summary> |
| | | [DisplayName("ID")] |
| | | [Browsable(false)] |
| | | public long ID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¼ç |
| | | /// </summary> |
| | | [DisplayName("ç¼ç ")] |
| | | [Browsable(true)] |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Dbéå® |
| | | /// ç¼ç |
| | | /// </summary> |
| | | [DisplayName("éå®")] |
| | | [DisplayName("ç¼ç ")] |
| | | [Browsable(true)] |
| | | public bool DbLocked { get; set; } |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå· |
| | |
| | | [DisplayName("DbId")] |
| | | [Browsable(false)] |
| | | public string DbId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Dbéå® |
| | | /// </summary> |
| | | [DisplayName("éå®")] |
| | | [Browsable(true)] |
| | | public bool DbLocked { get; set; } |
| | | |
| | | /// <summary> |
| | | /// CurveDbId |
| | |
| | | [DisplayName("é¢å®è½¬é")] |
| | | [Browsable(true)] |
| | | public double? RatedN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¢å®é¢ç |
| | | /// </summary> |
| | | [DisplayName("é¢å®é¢ç")] |
| | | [Browsable(true)] |
| | | public double RatedHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设å®é¢ç |
| | | /// </summary> |
| | | [DisplayName("设å®é¢ç")] |
| | | [Browsable(true)] |
| | | public double CurrentHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è®¡ç®æµé |
| | | /// </summary> |
| | | [DisplayName("è®¡ç®æµé")] |
| | | [Browsable(true)] |
| | | public double? CalcuQ { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è®¡ç®æ¬ç¨ |
| | | /// </summary> |
| | | [DisplayName("è®¡ç®æ¬ç¨")] |
| | | [Browsable(true)] |
| | | public double? CalcuH { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹é
åå· |
| | |
| | | public double? MatchingRatedN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹é
é¢å®é¢ç |
| | | /// </summary> |
| | | [DisplayName("å¹é
é¢å®é¢ç")] |
| | | [Browsable(true)] |
| | | public double? MatchingRatedHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹é
设å®é¢ç |
| | | /// </summary> |
| | | [DisplayName("å¹é
设å®é¢ç")] |
| | | [Browsable(true)] |
| | | public double? MatchingCurrentHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹é
æµéæ¬ç¨æ²çº¿ |
| | | /// </summary> |
| | | [DisplayName("å¹é
æµéæ¬ç¨æ²çº¿")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | internal class XhsProjectSimualtionAnalySingleResultViewModel |
| | | { |
| | | public long ID { get; set; } |
| | | |
| | | public string Name { get; set; } |
| | | |
| | | public string Code { get; set; } |
| | | |
| | | public bool IsBp { get; set; } |
| | | |
| | | public string RunStatus { get; set; } |
| | | |
| | | public double CurrentHz { get; set; } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public class XhsProjectSimulationAnalySinglePumpViewModel |
| | | { |
| | | /// <summary> |
| | | /// id |
| | | /// </summary> |
| | | public long ID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¼ç |
| | | /// </summary> |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Open Closed |
| | | /// </summary> |
| | | public string RunStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public bool IsBp { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 50hz 60hz |
| | | /// </summary> |
| | | public double RatedHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设å®é¢ç |
| | | /// </summary> |
| | | public double CurrentHz { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æµéæ¬ç¨çº¿ |
| | | /// </summary> |
| | | public List<HStation.WinFrmUI.CurvePointMatchingViewModel> CurveQH { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public List<HStation.WinFrmUI.CurvePointMatchingViewModel> CurveQP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public List<HStation.WinFrmUI.CurvePointMatchingViewModel> CurveQE { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è®¡ç®æµé |
| | | /// </summary> |
| | | public double? CalcuQ { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è®¡ç®æ¬ç¨ |
| | | /// </summary> |
| | | public double? CalcuH { get; set; } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | this.PageTitle.Caption = "æ°´åæ¨¡æ"; |
| | | this.PageTitle.HeaderSvgImage = this.svgImg32[0]; |
| | | this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; |
| | | this.docPnlRight.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; |
| | | this.docPnlRight.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; |
| | | } |
| | | |
| | | private HStation.Vmo.XhsProjectVmo _project = null;//é¡¹ç® |
| | |
| | | this.tabPageQ3d.Controls.Clear(); |
| | | this.tabPageQ3d.Controls.Add(q3dCtrl); |
| | | q3dCtrl.InitialData(() => _hydroInfo); |
| | | ShowPropertyCtrl(); |
| | | |
| | | } |
| | | |
| | | #region Bimface |
| | |
| | | { |
| | | _propertyCtrl = new XhsProjectSimulationPropertyCtrl(); |
| | | _propertyCtrl.Dock = DockStyle.Fill; |
| | | _propertyCtrl.InitialData(() => _hydroInfo); |
| | | _propertyCtrl.InitialData(() => _hydroInfo, () => GetAllCalcuResult()); |
| | | _propertyCtrl.BlinkLinkParterEvent += async (code, linkCode) => |
| | | { //强è°è¿æ¥ç»ä»¶ |
| | | if (string.IsNullOrEmpty(code)) |
| | |
| | | } |
| | | this.controlContainerBottom.Controls.Clear(); |
| | | var matchingListCtrl = GetMatchingListCtrl(); |
| | | var input = AssetsMatchingParasHelper.Create(_hydroInfo); |
| | | var input = AssetsMatchingParasHelper.Create(_hydroInfo, GetAllCalcuResult()); |
| | | matchingListCtrl.SetBindingData(input); |
| | | this.controlContainerBottom.Controls.Add(matchingListCtrl); |
| | | this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; |
| | |
| | | { |
| | | return; |
| | | } |
| | | if (_calcuResult == null) |
| | | { |
| | | return; |
| | | } |
| | | if (!_calcuResult.Succeed) |
| | | { |
| | | return; |
| | | } |
| | | var pumps = _hydroInfo.Pumps; |
| | | //if (_calcuResult == null) |
| | | //{ |
| | | // return; |
| | | //} |
| | | //if (!_calcuResult.Succeed) |
| | | //{ |
| | | // return; |
| | | //} |
| | | var pumps = _hydroInfo.Pumps?.Where(x => x.LinkStatus == Yw.Hydro.LinkStatus.Open).ToList(); |
| | | |
| | | var curve_list = _hydroInfo.Curves; |
| | | if (curve_list == null || !curve_list.Any()) |
| | | { |
| | |
| | | |
| | | var vm = new Yw.WinFrmUI.Phart.PumpSerialParallelViewModel(); |
| | | vm.Id = x.Code; |
| | | vm.Name = x.Code; |
| | | vm.Name = x.Name; |
| | | //vm.IsBp = ; |
| | | vm.RatedSpeed = rated_speed; |
| | | vm.CurrentSpeed = Math.Round(rated_speed * speed_ratio); |
| | |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | #endregion æ§è½æ²çº¿ |
| | | #endregion |
| | | |
| | | #region æ°´åè®¡ç® |
| | | |
| | |
| | | { |
| | | InitData(pump_mian_id, null); |
| | | } |
| | | |
| | | } |
| | | |
| | | //å·æ°å±æ§å¼ |
| | |
| | | |
| | | private Yw.Geometry.CubicSpline2d _qh, _qe, _qp; |
| | | private Yw.Geometry.Point2d _work_pt; |
| | | private double _rated_speed; |
| | | private double _rated_speed=50; |
| | | |
| | | private async void InitData(long pump_main_id, Yw.Geometry.Point2d work_pt) |
| | | { |
| | |
| | | var qe = new Yw.Geometry.CubicSpline2d(points_qe); |
| | | var qp = new Yw.Geometry.CubicSpline2d(points_qp); |
| | | |
| | | InitChart(qh, qe, qp, work_pt, pump_main.RatedSpeed); |
| | | InitChart(qh, qe, qp, work_pt, pump_main.RatedSpeed, pump_main.RatedSpeed, 50); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="qh">æµéæ¬ç¨çº¿</param> |
| | | /// <param name="qe">æµéæç线</param> |
| | | /// <param name="qp">æµéåç线</param> |
| | | /// <param name="work_pt">å·¥ä½ç¹</param> |
| | | /// <param name="rated_spped">é¢å®è½¬é</param> |
| | | /// <param name="current_speed">å½å转é</param> |
| | | /// <param name="current_hz">å½åé¢ç</param> |
| | | public void InitChart( |
| | | Yw.Geometry.CubicSpline2d qh, |
| | | Yw.Geometry.CubicSpline2d qe, |
| | | Yw.Geometry.CubicSpline2d qp, |
| | | Yw.Geometry.Point2d work_pt, |
| | | double rated_speed) |
| | | double rated_spped, |
| | | double current_speed, |
| | | double current_hz) |
| | | { |
| | | _qh = qh; |
| | | _qe = qe; |
| | | _qp = qp; |
| | | _work_pt = work_pt; |
| | | _rated_speed = rated_speed; |
| | | _rated_speed = rated_spped; |
| | | |
| | | this.pumpPerformCompareChart1.SetBindingData(_qh, _qe, _qp); |
| | | if (work_pt != null) |
| | | { |
| | | var calc_speed = PumpCalcHelper.GetSimuValue(qh, work_pt, rated_speed); |
| | | var calc_hz = calc_speed / rated_speed * 50; |
| | | var calc_hz = PumpCalcHelper.GetSimuValue(qh, work_pt, _rated_speed); |
| | | calc_hz = Math.Round(calc_hz, 1); |
| | | this.pumpPerformCompareInfoCtrl1.SetDesignPoint(work_pt, calc_hz); |
| | | } |
| | | |
| | | var vm_vs = new Yw.WinFrmUI.Phart.PumpVariableSpeedInfoViewModel(); |
| | | vm_vs.Id = Guid.NewGuid().ToString(); |
| | | vm_vs.Name = rated_speed.ToString(); |
| | | vm_vs.RatedSpeed = rated_speed; |
| | | vm_vs.CurrentSpeed = rated_speed; |
| | | vm_vs.CurrentHz = 50; |
| | | vm_vs.Name = current_hz.ToString(); |
| | | vm_vs.RatedSpeed = _rated_speed; |
| | | vm_vs.CurrentSpeed = current_speed; |
| | | vm_vs.CurrentHz = current_hz; |
| | | vm_vs.Qh = _qh; |
| | | vm_vs.Qe = _qe; |
| | | vm_vs.Qp = _qp; |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="03-simulation\06-simulation\06-curve\" /> |
| | | <Folder Include="03-simulation\06-simulation\07-bulkset\02-valve\" /> |
| | | <Folder Include="map\gaode\css\" /> |
| | | </ItemGroup> |
| | |
| | | { |
| | | this.StartCode = rhs.StartCode; |
| | | this.EndCode = rhs.EndCode; |
| | | this.LinkStatus = rhs.LinkStatus; |
| | | this.LinkStatus = HydroLinkStatusHelper.GetStatusName(rhs.LinkStatus); |
| | | |
| | | this.Vmo = rhs; |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ°´æ³µç¶æ |
| | | /// </summary> |
| | | [DisplayName("æ°´æ³µç¶æ")] |
| | | public override string LinkStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¢å®åç(kW) |
| | | /// </summary> |
| | | [DisplayName("é¢å®åç(kW)")] |
| | |
| | | [DisplayName("设å®é¢ç(hz)")] |
| | | public double CurrentHz |
| | | { |
| | | get { return this.SpeedRatio * this.RatedHz; } |
| | | get |
| | | { |
| | | var value = this.SpeedRatio * this.RatedHz; |
| | | return Math.Round(value, 1); |
| | | } |
| | | set |
| | | { |
| | | if (this.RatedHz <= 0) |
| | |
| | | } |
| | | _axisYQE.SetAxisRange(_coordinate_paras.CoordMinE, _coordinate_paras.CoordMinE + _coordinate_paras.GridNumberY * _coordinate_paras.CoordSpaceE); |
| | | _axisYQP.SetAxisRange(_coordinate_paras.CoordMinP, _coordinate_paras.CoordMinP + _coordinate_paras.GridNumberY * _coordinate_paras.CoordSpaceP); |
| | | |
| | | |
| | | //_axisYQE.SetAxisRange(_coordinate_paras.CoordMinE-_coordinate_paras.CoordMinP, _coordinate_paras.CoordMinE + _coordinate_paras.GridNumberY * _coordinate_paras.CoordSpaceE); |
| | | //_axisYQP.SetAxisRange(_coordinate_paras.DispMinP(), _coordinate_paras.CoordMinP + _coordinate_paras.GridNumberY * _coordinate_paras.CoordSpaceP); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | _qh_pt_list = points; |
| | | foreach (Yw.Geometry.Point2d pt in _qh_pt_list) |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y)); |
| | | { |
| | | var x = Math.Round(pt.X, 2); |
| | | var y = Math.Round(pt.Y, 2); |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y)); |
| | | } |
| | | } |
| | | break; |
| | | case Yw.Pump.eCurveType.QE: |
| | | { |
| | | _qe_pt_list = points; |
| | | foreach (Yw.Geometry.Point2d pt in _qe_pt_list) |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y)); |
| | | { |
| | | var x = Math.Round(pt.X, 2); |
| | | var y = Math.Round(pt.Y, 2); |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y)); |
| | | } |
| | | } |
| | | break; |
| | | case Yw.Pump.eCurveType.QP: |
| | | { |
| | | _qp_pt_list = points; |
| | | foreach (Yw.Geometry.Point2d pt in _qp_pt_list) |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y)); |
| | | { |
| | | var x = Math.Round(pt.X, 2); |
| | | var y = Math.Round(pt.Y, 2); |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y)); |
| | | } |
| | | |
| | | } |
| | | break; |
| | | } |
| | |
| | | case Yw.Pump.eCurveType.QH: |
| | | { |
| | | foreach (Yw.Geometry.Point2d pt in _qh_pt_list) |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y)); |
| | | { |
| | | var x = Math.Round(pt.X, 2); |
| | | var y = Math.Round(pt.Y, 2); |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y)); |
| | | } |
| | | } |
| | | break; |
| | | case Yw.Pump.eCurveType.QE: |
| | | { |
| | | foreach (Yw.Geometry.Point2d pt in _qe_pt_list) |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y)); |
| | | { |
| | | var x = Math.Round(pt.X, 2); |
| | | var y = Math.Round(pt.Y, 2); |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y)); |
| | | } |
| | | } |
| | | break; |
| | | case Yw.Pump.eCurveType.QP: |
| | | { |
| | | foreach (Yw.Geometry.Point2d pt in _qp_pt_list) |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y)); |
| | | { |
| | | var x = Math.Round(pt.X, 2); |
| | | var y = Math.Round(pt.Y, 2); |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y)); |
| | | } |
| | | } |
| | | break; |
| | | } |
| | |
| | | Yw.Geometry.CubicSpline2d qh = null, qe = null, qp = null; |
| | | |
| | | qh = new Yw.Geometry.CubicSpline2d(curve_qh.FeatCurve.GetPointList()); |
| | | if (qe != null) |
| | | if (curve_qe != null) |
| | | qe = new Yw.Geometry.CubicSpline2d(curve_qe.FeatCurve.GetPointList()); |
| | | if (qp != null) |
| | | if (curve_qp != null) |
| | | qp = new Yw.Geometry.CubicSpline2d(curve_qp.FeatCurve.GetPointList()); |
| | | |
| | | this.curveExpressEditCtrl1.SetBindingData(qh, qe, qp); |
| | |
| | | _fitCurvePoints.Clear(); |
| | | _pt_ql_list = points; |
| | | foreach (Yw.Geometry.Point2d pt in _pt_ql_list) |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y)); |
| | | |
| | | { |
| | | var x = Math.Round(pt.X, 2); |
| | | var y = Math.Round(pt.Y, 2); |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(x,y)); |
| | | } |
| | | this.bindingSource1.ResetBindings(false); |
| | | } |
| | | |
| | |
| | | { |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | this.curveExpressEditCtrl1.SetBindingData(ql); |
| | | } |
| | | |
| | |
| | | namespace Yw.WinFrmUI.Phart |
| | | using DevExpress.CodeParser; |
| | | using DevExpress.DataAccess.Native.Json; |
| | | using DevExpress.Diagram.Core.Shapes; |
| | | |
| | | namespace Yw.WinFrmUI.Phart |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | |
| | | var validGridNumH = 6; |
| | | var coordinate_paras = new PumpCoordinate(); |
| | | coordinate_paras.GridNumberX = 10; |
| | | coordinate_paras.GridNumberY = 18; |
| | | coordinate_paras.GridNumberX = 10;//10 |
| | | coordinate_paras.GridNumberY = 18;//18 |
| | | CalcCoordinateQ(minQ, maxQ, ref coordinate_paras, coordinate_paras.GridNumberX); |
| | | CalcCoordinateH(minH, maxH, validGridNumH, ref coordinate_paras, out double disMinH, out double disMaxH); |
| | | |
| | |
| | | |
| | | if (maxE > minE + 0.01) |
| | | CalcCoordinateE(minE, maxE, ref coordinate_paras); |
| | | |
| | | |
| | | return coordinate_paras; |
| | | } |
| | | |
| | |
| | | /// <param name="coordinate_paras">åæ Model</param> |
| | | public static void CalcCoordinateP(double minP, double maxP, double disMaxH, int downGridNum, ref PumpCoordinate coordinate_paras) |
| | | { |
| | | int default_num = 5; |
| | | int default_num = 7; |
| | | int spaceNum = coordinate_paras.StartLineNoH - default_num - downGridNum; |
| | | if (spaceNum < 3) |
| | | spaceNum = 3; |
| | |
| | | stratLineNoP--; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | coordinate_paras.CoordSpaceP = coordSpaceP; |
| | | coordinate_paras.EndLineNoP = endLineNoP; |
| | | coordinate_paras.StartLineNoP = stratLineNoP; |
| | |
| | | if (coordinate_paras.StartLineNoP < downGridNum) |
| | | { |
| | | int diff_num = downGridNum - coordinate_paras.StartLineNoP; |
| | | |
| | | coordinate_paras.EndLineNoP += diff_num; |
| | | coordinate_paras.StartLineNoP += diff_num; |
| | | } |
| | | |
| | | |
| | | coordinate_paras.CoordMinH = GetByPlacesLength(disMaxH - (double)coordinate_paras.EndLineNoH * coordinate_paras.CoordSpaceH, 3); |
| | | coordinate_paras.CoordMinH = GetByPlacesLength(disMaxH - (double)coordinate_paras.EndLineNoH * coordinate_paras.CoordSpaceH, 3); |
| | | coordinate_paras.CoordMinP = GetByPlacesLength(disMaxP - (double)coordinate_paras.EndLineNoP * coordinate_paras.CoordSpaceP, 3); |
| | | |
| | | |
| | | if (minP > 0 && minP < 10) |
| | | { |
| | | coordinate_paras.StartLineNoP = 0; |
| | | coordinate_paras.EndLineNoP = endLineNoP; |
| | | coordinate_paras.CoordSpaceP = coordSpaceP; |
| | | coordinate_paras.CoordMinP = Math.Floor(minP); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |