| | |
| | | [HttpGet] |
| | | public List<PlanAnaDto> Calculate_debug() |
| | | { |
| | | var path = @"D:\WorkData\IStation\result_20221103.json"; |
| | | var path = @"D:\WorkData\IStation\result_20221109.json"; |
| | | if (!System.IO.File.Exists(path)) |
| | | return null; |
| | | |
| | |
| | | { |
| | | _dict = new Dictionary<int, StationInfo>(); |
| | | |
| | | |
| | | //_dict.Add(6, new StationInfo(4, new IStation.Calculation.shys严桥泵ç«()));//NG æ²¡ææµéæ°æ®, 没æåºå£æ¶²ä½æ°æ® |
| | | //_dict.Add(12, new StationInfo(15, new IStation.Calculation.shyséè¡ä¸è¾()));//NG 没ææä¾ _0402010503030202003 ä¸å·ç®¡åºå£æµéå¼ |
| | | //_dict.Add(7, new StationInfo(6, new IStation.Calculation.shys临æ±1å·æ³µæ¿())); //NG 没ææä¾ æµé ,æ æ³è®¡ç® |
| | | //_dict.Add(17, new StationInfo(21, new IStation.Calculation.shys大桥泵ç«()));// NG æ¬ç¨åªæä¸ç±³å¤, æ æ³è®¡ç® |
| | | |
| | | //_dict.Add(18, new StationInfo(1 , new IStation.Calculation.shyséèæ²åæ°´()));//å
¨æ¯0 æ¯å¦æ£ç¡®? |
| | | //_dict.Add(19, new StationInfo(14, new IStation.Calculation.shyséè¡äºå())); //NG 1æ5æ¶, åºå£ååä½äºæ°´æ± æ°´ä½ |
| | | //_dict.Add(6, new StationInfo(4, new IStation.Calculation.shys严桥泵ç«()));//NG ä¸å¼æ³µ ä¸èè |
| | | |
| | | #if (DEBUG) |
| | | //_dict.Add(20, new StationInfo(18, new IStation.Calculation.shyséæ³½åæ°´())); |
| | | //_0402010701011204001 åºè¯¥æ¯æ°´ä½æ¯å¦æé, æ²çº¿ä¸å
¨ |
| | | _dict.Add(7, new StationInfo(6, new IStation.Calculation.shys临æ±1å·æ³µæ¿())); |
| | | |
| | | //_dict.Add(19, new StationInfo(14, new IStation.Calculation.shyséè¡äºå()));//NG 1æ5æ¶, åºå£ååä½äºæ°´æ± æ°´ä½ ,å¯è½è¿æ¯è¿å£æ¶²ä½é®é¢ |
| | | |
| | | #else |
| | | _dict.Add(12, new StationInfo(15, new IStation.Calculation.shyséè¡ä¸è¾()));//OK 第4æ¹ |
| | | _dict.Add(17, new StationInfo(21, new IStation.Calculation.shys大桥泵ç«()));//OK 第4æ¹,æ¬ç¨åªæä¸ç±³å¤, ä¸éè¦å¢å åºå£ååæè½è®¡ç® |
| | | |
| | | _dict.Add(18, new StationInfo(1 , new IStation.Calculation.shyséèæ²åæ°´()));//å
¨æ¯0 æ¯å¦æ£ç¡®? |
| | | _dict.Add(20, new StationInfo(18, new IStation.Calculation.shyséæ³½åæ°´())); |
| | | _dict.Add(7, new StationInfo(6, new IStation.Calculation.shys临æ±1å·æ³µæ¿())); |
| | |
| | | return null; |
| | | } |
| | | |
| | | var pipe1_flow = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡ç¬æ¶æµé.Item1); |
| | | if (pipe1_flow == null) |
| | | var pipe_flow = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡ç¬æ¶æµé.Item1); |
| | | if (pipe_flow == null) |
| | | { |
| | | error_info = "å¤§æ¡¥æ³µç«æ°´ç®¡é1æµéæµç¹æªæ¾å°"; |
| | | error_info = "å¤§æ¡¥æ³µç«æ°´ç®¡é æµéæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | |
| | |
| | | new DispatchAna.Model.InletPipePara(){ Name="æ°´æ± 4", IsWaterLevel= true,Value = water_level4.RecordValue} |
| | | }; |
| | | complex_dispatch_request.OutletPipePara = new List<DispatchAna.Model.OutletPipePara>(); |
| | | //complex_dispatch_request.OutletPipePara.Add(new DispatchAna.Model.OutletPipePara() |
| | | //{ |
| | | // Name = "ä¸è°åæ± ", |
| | | // TargetFlow = pipe1_flow.RecordValue / 2, |
| | | // IsWaterLevel = true, |
| | | // TargetPress = oulet_wl1.RecordValue, |
| | | //}); |
| | | complex_dispatch_request.OutletPipePara.Add(new DispatchAna.Model.OutletPipePara() |
| | | { |
| | | Name = "ä¸è°åæ± ", |
| | | TargetFlow = pipe_flow.RecordValue / 2, |
| | | IsWaterLevel = true, |
| | | TargetPress = oulet_wl2.RecordValue, |
| | | }); |
| | | complex_dispatch_request.OutletPipePara.Add(new DispatchAna.Model.OutletPipePara() |
| | | { |
| | | Name = "西è°åæ± ", |
| | | TargetFlow = pipe1_flow.RecordValue / 2, |
| | | TargetFlow = pipe_flow.RecordValue / 2, |
| | | IsWaterLevel = true, |
| | | TargetPress = oulet_wl2.RecordValue, |
| | | }); |
| | |
| | | double totalQ = 0, totalH = 0, totalP = 0; |
| | | int pipe_count = 0; |
| | | |
| | | int ResultStatus = 1; |
| | | string ResultStatusInfo = null; |
| | | |
| | | List<IStation.Calculation.DispatchAna.Model.AnaScheme> pipe1_results = null; |
| | | AnaScheme pipe1_result = null; |
| | | if (pipe1_TargetFlow > 100) |
| | | { |
| | | Common.DispatchAnaGeneralHelperåå calc_pipe1_helper = new Common.DispatchAnaGeneralHelperåå(); |
| | | calc_pipe1_helper.InitialParas( |
| | | pipe1_TargetFlow,//å设ä¸è¾¹è¾åºä¸å |
| | | (inlet_wl1 + inlet_wl2) / 2, true, |
| | | outlet_wl1, true, |
| | | null, null, |
| | | (from x in _allMachineList where pipe1_machineIds.Contains(x.MachineID) select x).ToList(), |
| | | machine_run_status == null ? null : machine_run_status.MachineRunFilter, out error_info); |
| | | var pipe1_results = calc_pipe1_helper.CalcOptList(complex_request_paras.SchemeSortType, 3); |
| | | double outlet_wl_calc = outlet_wl1; |
| | | for (int i = 0; i < 5; i++) |
| | | {//æ¬ç¨è¿ä½,ç®ä¸åºæ¥å°±å¢å åºå£åå |
| | | |
| | | calc_pipe1_helper.InitialParas( |
| | | pipe1_TargetFlow,//å设ä¸è¾¹è¾åºä¸å |
| | | (inlet_wl1 + inlet_wl2) / 2, true, |
| | | outlet_wl1, true, |
| | | null, null, |
| | | (from x in _allMachineList where pipe1_machineIds.Contains(x.MachineID) select x).ToList(), |
| | | machine_run_status == null ? null : machine_run_status.MachineRunFilter, out error_info); |
| | | pipe1_results = calc_pipe1_helper.CalcOptList(complex_request_paras.SchemeSortType, 3); |
| | | if (pipe1_results != null && pipe1_results.Count > 0) |
| | | { |
| | | break; |
| | | } |
| | | outlet_wl_calc = outlet_wl_calc * 1.05; |
| | | ResultStatus = 2; |
| | | ResultStatusInfo = "æé«äºä¸å·åºå£ç®¡æ¶²ä½åæ°"; |
| | | } |
| | | if (pipe1_results == null || pipe1_results.Count() == 0) |
| | | { |
| | | error_info = String.Format("管路ä¸è°åº¦æ¹æ¡æ æ³è®¡ç®,è¯·ç¡®è®¤æ°æ®æ¯å¦åç,è¿å£æ¶²ä½:{0}m {1}m,åºå£æ¶²ä½:{2}m,æµéè¦æ±:{3}", |
| | |
| | | pipe_count++; |
| | | } |
| | | |
| | | |
| | | AnaScheme pipe2_result = null; |
| | | IStation.Calculation.DispatchAna.Model.AnaScheme pipe2_result = null; |
| | | List<IStation.Calculation.DispatchAna.Model.AnaScheme> pipe2_results = null; |
| | | |
| | | if (pipe2_TargetFlow > 100) |
| | | { |
| | | Common.DispatchAnaGeneralHelperåå calc_pipe2_helper = new Common.DispatchAnaGeneralHelperåå(); |
| | | calc_pipe2_helper.InitialParas( |
| | | double outlet_wl_calc = outlet_wl2; |
| | | int i = 0; |
| | | for (i = 0; i < 5; i++) |
| | | {//æ¬ç¨è¿ä½,ç®ä¸åºæ¥å°±å¢å åºå£åå |
| | | calc_pipe2_helper.InitialParas( |
| | | pipe2_TargetFlow,//å设ä¸è¾¹è¾åºä¸å |
| | | (inlet_wl3 + inlet_wl4) / 2, true, |
| | | outlet_wl2, true, |
| | | outlet_wl_calc, true, |
| | | null, null, |
| | | (from x in _allMachineList where pipe2_machineIds.Contains(x.MachineID) select x).ToList(), |
| | | (from x in _allMachineList where pipe2_machineIds.Contains(x.MachineID) select x).ToList(), |
| | | machine_run_status == null ? null : machine_run_status.MachineRunFilter, out error_info); |
| | | |
| | | calc_pipe2_helper.IsAllowOverTargetPress = true;//æ¯å¦å
许è¶
è¿ç®æ åå, 使å°åé¢é¢ç齿¯è¦æ±åå髿¶, ææå°é¢ç弿³µ |
| | | var pipe2_results = calc_pipe2_helper.CalcOptList(complex_request_paras.SchemeSortType, 3); |
| | | calc_pipe2_helper.IsAllowOverTargetPress = true;//æ¯å¦å
许è¶
è¿ç®æ åå, 使å°åé¢é¢ç齿¯è¦æ±åå髿¶, ææå°é¢ç弿³µ |
| | | pipe2_results = calc_pipe2_helper.CalcOptList(complex_request_paras.SchemeSortType, 3); |
| | | if (pipe2_results != null && pipe2_results.Count > 0) |
| | | { |
| | | break; |
| | | } |
| | | ResultStatus = 2; |
| | | outlet_wl_calc = outlet_wl_calc * 1.05; |
| | | ResultStatusInfo = "æé«äºäºå·åºå£ç®¡æ¶²ä½åæ°"; |
| | | } |
| | | if (pipe2_results == null || pipe2_results.Count() == 0) |
| | | { |
| | | error_info = String.Format("管路ä¸è°åº¦æ¹æ¡æ æ³è®¡ç®,è¯·ç¡®è®¤æ°æ®æ¯å¦åç,è¿å£æ¶²ä½:{0}m {1}m,åºå£æ¶²ä½:{2}m,æµéè¦æ±:{3}", |
| | | inlet_wl3, inlet_wl4, outlet_wl2, pipe2_TargetFlow); |
| | | return null; |
| | | } |
| | | |
| | | pipe2_result = pipe2_results.First(); |
| | | |
| | | totalQ += pipe2_result.TotalWrkQ; |
| | |
| | | plan.Items.AddRange(pipe2_result.Items); |
| | | |
| | | |
| | | plan.ResultStatus = ResultStatus; |
| | | plan.ResultStatusInfo = ResultStatusInfo; |
| | | return new List<Model.AnaScheme>() { plan }; |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | totalH += pipe1_result.TotalWrkH; |
| | | pipe_count++; |
| | | } |
| | | |
| | | |
| | | IStation.Calculation.DispatchAna.Model.AnaScheme pipe2_result = null; |
| | | List<IStation.Calculation.DispatchAna.Model.AnaScheme> pipe2_results = null; |
| | | |
| | | List<IStation.Calculation.DispatchAna.Model.AnaScheme> pipe2_results = null; |
| | | if (pipe2_TargetFlow > 50) |
| | | { |
| | | double outlet_press_calc = pipe2_TargetPess; |
| | | double outlet_press_calc = pipe2_TargetPess; |
| | | int i = 0; |
| | | for ( i = 0; i < 5; i++) |
| | | for (i = 0; i < 5; i++) |
| | | {//æ¬ç¨è¿ä½,ç®ä¸åºæ¥å°±å¢å åºå£åå |
| | | calc_pipe2_helper.InitialParas( |
| | | pipe2_TargetFlow, |
| | |
| | | public bool CalcUnitPower() |
| | | { |
| | | Calcu_WP(); |
| | | return Calcu_UWP(); |
| | | return Calcu_UWP(); |
| | | } |
| | | /// <summary> |
| | | /// |