| | |
| | | |
| | | var station1 = station_info.Station1; |
| | | var station2 = station_info.Station2; |
| | | var station1_same_type_flag_group_first = GlobalHelper.Station1SameTypeFlagGroupFirst; |
| | | var station2_same_type_flag_group_first = GlobalHelper.Station2SameTypeFlagGroupFirst; |
| | | var station1_schedule_config = _service_schedule_config.GetStation1(); |
| | | var station2_schedule_config = _service_schedule_config.GetStation2(); |
| | | var station1_flag_list = GlobalHelper.Station1FlagList; |
| | |
| | | var helper = new Algorithm.ScheduleHelper(); |
| | | |
| | | helper.Initial(station1_open_flag_list, station1_schedule_config); |
| | | var optimal_combine1 = helper.GetOptAnaCombine(station1, station1_same_type_flag_group_first, station1_flag_inlet_water_level_dict, target_flow1, target_head1); |
| | | var optimal_combine1 = helper.GetOptAnaCombine(station1, station1_flag_inlet_water_level_dict, target_flow1, target_head1); |
| | | |
| | | |
| | | helper.Initial(station2_open_flag_list, station2_schedule_config); |
| | | var optimal_combine2 = helper.GetOptAnaCombine(station2, station2_same_type_flag_group_first, station2_flag_inlet_water_level_dict, target_flow2, target_head2); |
| | | var optimal_combine2 = helper.GetOptAnaCombine(station2, station2_flag_inlet_water_level_dict, target_flow2, target_head2); |
| | | |
| | | var schedule_request = new Model.ScheduleRequest |
| | | { |
| | |
| | | RequestID = request_id, |
| | | Station = IStation.eDockingStation.Ch1s, |
| | | TotalFlow = optimal_combine1.TotalFlow, |
| | | TotalHead = optimal_combine1.TotalHead, |
| | | TotalPressure = optimal_combine1.TotalPressure, |
| | | TotalPower = optimal_combine1.TotalPower, |
| | | TotalEfficiency = optimal_combine1.TotalEfficiency, |
| | | WP = optimal_combine1.WP, |
| | |
| | | schedule_pump_list1 = new List<Model.SchedulePump>(); |
| | | |
| | | output.objects["1输水总流量"] = optimal_combine1.TotalFlow; |
| | | output.objects["1输水总压力"] = Math.Round(Curve.PumpCalculateHelper.M2Mpa(optimal_combine1.TotalHead), 4); |
| | | output.objects["1输水总压力"] = Math.Round(Curve.PumpCalculateHelper.M2Mpa(optimal_combine1.TotalPressure), 4); |
| | | output.objects["1输水总功率"] = optimal_combine1.TotalPower; |
| | | output.objects["1输水总效率"] = optimal_combine1.TotalEfficiency; |
| | | output.objects["1输水总千吨能耗"] = optimal_combine1.WP; |
| | |
| | | output.objects[$"1输水{flag}#流量"] = fre_pump.Flow; |
| | | output.objects[$"1输水{flag}#扬程"] = fre_pump.Head; |
| | | output.objects[$"1输水{flag}#功率"] = fre_pump.Power; |
| | | output.objects[$"1输水{flag}#效率"] = fre_pump.Efficiency; |
| | | output.objects[$"1输水{flag}#效率"] = fre_pump.Eff; |
| | | output.objects[$"1输水{flag}#频率"] = fre_pump.Frequency; |
| | | output.objects[$"1输水{flag}#转速"] = fre_pump.Speed; |
| | | |
| | |
| | | Flag = flag, |
| | | Flow = fre_pump.Flow, |
| | | Head = fre_pump.Head, |
| | | PressureDiff = fre_pump.PressureDiff, |
| | | Power = fre_pump.Power, |
| | | Efficiency = fre_pump.Efficiency, |
| | | Frequency = fre_pump.Frequency, |
| | | Speed = fre_pump.Speed |
| | | Efficiency = fre_pump.Eff, |
| | | Hz = fre_pump.Frequency, |
| | | Rpm = fre_pump.Speed |
| | | }; |
| | | schedule_pump_list1.Add(schedule_pump); |
| | | |
| | |
| | | RequestID = request_id, |
| | | Station = IStation.eDockingStation.Ch2s, |
| | | TotalFlow = optimal_combine2.TotalFlow, |
| | | TotalHead = optimal_combine2.TotalHead, |
| | | TotalPressure = optimal_combine2.TotalPressure, |
| | | TotalPower = optimal_combine2.TotalPower, |
| | | TotalEfficiency = optimal_combine2.TotalEfficiency, |
| | | WP = optimal_combine2.WP, |
| | |
| | | schedule_pump_list2 = new List<Model.SchedulePump>(); |
| | | |
| | | output.objects["2输水总流量"] = optimal_combine2.TotalFlow; |
| | | output.objects["2输水总压力"] = Math.Round(Curve.PumpCalculateHelper.M2Mpa(optimal_combine2.TotalHead), 4); |
| | | output.objects["2输水总压力"] = Math.Round(Curve.PumpCalculateHelper.M2Mpa(optimal_combine2.TotalPressure), 4); |
| | | output.objects["2输水总功率"] = optimal_combine2.TotalPower; |
| | | output.objects["2输水总效率"] = optimal_combine2.TotalEfficiency; |
| | | output.objects["2输水总千吨能耗"] = optimal_combine2.WP; |
| | |
| | | output.objects[$"2输水{flag}#流量"] = fre_pump.Flow; |
| | | output.objects[$"2输水{flag}#扬程"] = fre_pump.Head; |
| | | output.objects[$"2输水{flag}#功率"] = fre_pump.Power; |
| | | output.objects[$"2输水{flag}#效率"] = fre_pump.Efficiency; |
| | | output.objects[$"2输水{flag}#效率"] = fre_pump.Eff; |
| | | output.objects[$"2输水{flag}#频率"] = fre_pump.Frequency; |
| | | output.objects[$"2输水{flag}#转速"] = fre_pump.Speed; |
| | | |
| | |
| | | Flag = flag, |
| | | Flow = fre_pump.Flow, |
| | | Head = fre_pump.Head, |
| | | PressureDiff = fre_pump.PressureDiff, |
| | | Power = fre_pump.Power, |
| | | Efficiency = fre_pump.Efficiency, |
| | | Frequency = fre_pump.Frequency, |
| | | Speed = fre_pump.Speed |
| | | Efficiency = fre_pump.Eff, |
| | | Hz = fre_pump.Frequency, |
| | | Rpm = fre_pump.Speed |
| | | }; |
| | | schedule_pump_list2.Add(schedule_pump); |
| | | } |
| | |
| | | Log.Debug(request_id, log_title, JsonHelper.Object2Json(schedule_pump_list2)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | var t = new System.Timers.Timer(); |
| | | t.Interval = 10 * 60 * 1000; |
| | | t.Elapsed += (s, e) => |
| | | { |
| | | { |
| | | log_title = "实时ZyScada请求(调度后10分钟验证)"; |
| | | var get_msg = GlobalHelper.GetRealTimeZyScadaList(out List<Model.ZyScada> zy_scada_list, is_zy_scada_debug); |
| | | if (!string.IsNullOrEmpty(get_msg)) |
| | | { |
| | | Log.Info(request_id, log_title, get_msg); |
| | | } |
| | | Log.Debug(request_id, log_title, JsonHelper.Object2Json(zy_scada_list)); |
| | | Log.Debug(request_id, log_title, JsonHelper.Object2Json(zy_scada_list)); |
| | | }; |
| | | t.AutoReset = false; |
| | | t.Start(); |