| | |
| | | public shysæ³°åæ³µç«() |
| | | { |
| | | this._corpID = 4; |
| | | this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_General(); |
| | | this._dispatchAnaCalc = new IStation.Calculation.DispatchAna.Calculator_OptAna_SHYS_æ³°åæ³µç«(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æµç¹åå
¸(è¿ä¸ªæ¯ä¸ªæ³µç«é½ä¸ä¸æ ·) |
| | | /// </summary> |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡1åå = new Tuple<string, long>("_0402010602081304001", |
| | | IStation.Calculation.DispatchAna.Calculator_OptAna_SHYS_æ³°åæ³µç«._monitor_id_pipe_press1); |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡1ç¬æ¶æµé = new Tuple<string, long>("_0402010602081302001", |
| | | IStation.Calculation.DispatchAna.Calculator_OptAna_SHYS_æ³°åæ³µç«._monitor_id_pipe_flow1); |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡2åå = new Tuple<string, long>("_0402010602081404001", |
| | | IStation.Calculation.DispatchAna.Calculator_OptAna_SHYS_æ³°åæ³µç«._monitor_id_pipe_press2); |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡2ç¬æ¶æµé = new Tuple<string, long>("_0402010602081402001", |
| | | IStation.Calculation.DispatchAna.Calculator_OptAna_SHYS_æ³°åæ³µç«._monitor_id_pipe_flow2); |
| | | private Tuple<string, long> monitorè¿æ°´è¿å£åå = new Tuple<string, long>("_0402010202010505001", |
| | | IStation.Calculation.DispatchAna.Calculator_OptAna_SHYS_æ³°åæ³µç«._montiro_id_inlet_press); |
| | | |
| | | |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡1åå = new Tuple<string, long>("_0402010602081304001", 989); |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡1ç¬æ¶æµé = new Tuple<string, long>("_0402010602081302001", 990); |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡2åå = new Tuple<string, long>("_0402010602081404001", 992); |
| | | private Tuple<string, long> monitoråºæ°´æ»ç®¡2ç¬æ¶æµé = new Tuple<string, long>("_0402010602081402001", 993); |
| | | private Tuple<string, long> monitorè¿æ°´è¿å£åå = new Tuple<string, long>("_0402010202010505001", 988); |
| | | public override string GetMonitorNameByTag(string tagname) |
| | | { |
| | | if (monitoråºæ°´æ»ç®¡1åå.Item1 == tagname) |
| | |
| | | { |
| | | if (allRecords_hour == null || allRecords_hour.Count == 0) |
| | | { |
| | | error_info = "äºå·æ²åæ¡¥æ¹åæµç¹æ°æ®ä¸ºç©º"; |
| | | error_info = "æ³°åæ³µç«æ¹åæµç¹æ°æ®ä¸ºç©º"; |
| | | return null; |
| | | } |
| | | var complex_dispatch_request = new DispatchAna.Model.RequestParasComplex(); |
| | | //var water_level = allRecords_hour.Find(x => x.MonitorTag == monitorè°èæ± æ¶²ä½.Item1); |
| | | //if (water_level == null) |
| | | //{ |
| | | // water_level = allRecords_hour.Find(x => x.MonitorTag == monitorè°èæ± æ¶²ä½.Item1); |
| | | // if (water_level == null) |
| | | // { |
| | | // error_info = "äºå·æ²åæ¡¥æ¹åæ°´åºæ¶²ä½æµç¹æªæ¾å°"; |
| | | // return null; |
| | | // } |
| | | //} |
| | | //var pipe1_flow = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡ç¬æ¶æµé.Item1); |
| | | //if (pipe1_flow == null) |
| | | //{ |
| | | // error_info = "äºå·æ²åæ¡¥æ¹å水管é1æµéæµç¹æªæ¾å°"; |
| | | // return null; |
| | | //} |
| | | var inlet_press = allRecords_hour.Find(x => x.MonitorTag == monitorè¿æ°´è¿å£åå.Item1); |
| | | if (inlet_press == null) |
| | | { |
| | | error_info = "æ³°åæ³µç«æ¹åè¿å£ååæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | var pipe1_flow = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡1ç¬æ¶æµé.Item1); |
| | | if (pipe1_flow == null) |
| | | { |
| | | error_info = "æ³°åæ³µç«ç®¡é1æµéæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | |
| | | //var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡åå.Item1); |
| | | //if (pipe1_press == null) |
| | | //{ |
| | | // error_info = "äºå·æ²åæ¡¥æ¹å水管é1ååæµç¹æªæ¾å°"; |
| | | // return null; |
| | | //} |
| | | var pipe1_press = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡1åå.Item1); |
| | | if (pipe1_press == null) |
| | | { |
| | | error_info = "æ³°åæ³µç«ç®¡é1ååæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | |
| | | |
| | | var pipe2_flow = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡2ç¬æ¶æµé.Item1); |
| | | if (pipe2_flow == null) |
| | | { |
| | | error_info = "æ³°åæ³µç«ç®¡é2æµéæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | var pipe2_press = allRecords_hour.Find(x => x.MonitorTag == monitoråºæ°´æ»ç®¡2åå.Item1); |
| | | if (pipe2_press == null) |
| | | { |
| | | error_info = "æ³°åæ³µç«ç®¡é2ååæµç¹æªæ¾å°"; |
| | | return null; |
| | | } |
| | | |
| | | |
| | | complex_dispatch_request.CorpID = this._corpID; |
| | | complex_dispatch_request.StationID = this._stationID; |
| | | complex_dispatch_request.SchemeNumber = 1; |
| | | complex_dispatch_request.PressValueType = DispatchAna.Model.RequestParasComplex.ePressValueType.åå; |
| | | complex_dispatch_request.WaterLevelPara = new List<DispatchAna.Model.WaterLevelPara>() |
| | | { |
| | | //new DispatchAna.Model.WaterLevelPara(){ Name="æ°´æ± ", Value = water_level.RecordValue} |
| | | }; |
| | | complex_dispatch_request.InletPipePara = new List<DispatchAna.Model.InletPipePara>() |
| | | { |
| | | new DispatchAna.Model.InletPipePara(){ Name="è¿å£åå", Value = inlet_press.RecordValue, IsWaterLevel=false} |
| | | }; |
| | | complex_dispatch_request.OutletPipePara = new List<DispatchAna.Model.OutletPipePara>(); |
| | | complex_dispatch_request.OutletPipePara.Add(new DispatchAna.Model.OutletPipePara() |
| | | { |
| | | Name = "æ»ç®¡è·¯", |
| | | //TargetFlow = pipe1_flow.RecordValue, |
| | | //TargetPress = pipe1_press.RecordValue, |
| | | Name = "ä¸å·ç®¡è·¯", |
| | | TargetFlow = pipe1_flow.RecordValue, |
| | | TargetPress = pipe1_press.RecordValue, |
| | | }); |
| | | |
| | | |
| | | |
| | | complex_dispatch_request.OutletPipePara.Add(new DispatchAna.Model.OutletPipePara() |
| | | { |
| | | Name = "äºå·ç®¡è·¯", |
| | | TargetFlow = pipe2_flow.RecordValue, |
| | | TargetPress = pipe2_press.RecordValue, |
| | | }); |
| | | |
| | | |
| | | error_info = null; |