From 488aa027021bff61a8a5ce7db43928efcee1eb2d Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期二, 06 八月 2024 17:46:56 +0800 Subject: [PATCH] 修正 --- IStation.Service/08-algorithm/02-schedule/ScheduleHelper.cs | 15 +++++++-------- Test/IStation.Win/View/CorrectionFactorView.cs | 24 ++++++++++++------------ Test/IStation.Test.Init/ScadaScheduleHelper.cs | 2 +- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/IStation.Service/08-algorithm/02-schedule/ScheduleHelper.cs b/IStation.Service/08-algorithm/02-schedule/ScheduleHelper.cs index c4d3bab..64f249a 100644 --- a/IStation.Service/08-algorithm/02-schedule/ScheduleHelper.cs +++ b/IStation.Service/08-algorithm/02-schedule/ScheduleHelper.cs @@ -111,7 +111,7 @@ var min_open_count = _min_open_count; var max_open_count = _max_open_count < 1 ? pump_list.Count : _max_open_count; var must_open_flag_list = _must_open_flag_list; - var must_close_flag_list = _must_close_flag_list; + var must_close_flag_list = _must_close_flag_list; var forbidden_flag_combine_list = _forbidden_flag_combine_list; var associative_flag_combine_list = _associative_flag_combine_list; var same_section_flag_combine_list = _same_section_flag_combine_list; @@ -149,7 +149,7 @@ var exist_must_close_flag_list = must_close_flag_list != null && must_close_flag_list.Count > 0; #endregion - + #region 瀛樺湪-绂佺敤缁勫悎 var exist_forbidden_flag_combine_list = forbidden_flag_combine_list != null && forbidden_flag_combine_list.Count > 0; @@ -201,7 +201,7 @@ #region 瀛樺湪-娉电疮璁¤繍琛屾椂闀垮瓧鍏� - var flag_cumulative_runtime_loss_ratio_dict=new Dictionary<int,double>(); + var flag_cumulative_runtime_loss_ratio_dict = new Dictionary<int, double>(); var exist_flag_cumulative_runtime_dict = flag_cumulative_runtime_dict != null && flag_cumulative_runtime_dict.Count > 0; if (exist_flag_cumulative_runtime_dict) { @@ -216,8 +216,8 @@ { //渚涙按闄愬埗 var exist_limit = false; -#if DEBUG -#else +//#if DEBUG +//#else if (exist_water_supply_limit_list) { var limit = water_supply_limit_list.Find(x => x.PumpCount == current_open_flag_list.Count); @@ -229,7 +229,7 @@ } } } -#endif +//#endif if (!exist_limit) { var opt_ana_combine = GetOptAnaCombine @@ -759,8 +759,7 @@ var loss_ratio = 1 - level; flag_cumulative_runtime_loss_ratio_dict.Add(flag, loss_ratio); } - - return flag_cumulative_runtime_dict; + return flag_cumulative_runtime_loss_ratio_dict; } /// <summary> diff --git a/Test/IStation.Test.Init/ScadaScheduleHelper.cs b/Test/IStation.Test.Init/ScadaScheduleHelper.cs index d28bd32..dbd798a 100644 --- a/Test/IStation.Test.Init/ScadaScheduleHelper.cs +++ b/Test/IStation.Test.Init/ScadaScheduleHelper.cs @@ -316,7 +316,7 @@ foreach (var station1_scada_schedule in all_station1_scada_schedule_list) { var time = station1_scada_schedule.Time; - if (time.Hour<12) + if (!(time.Hour == 12 && time.Minute == 0 && time.Second == 0)) { continue; } diff --git a/Test/IStation.Win/View/CorrectionFactorView.cs b/Test/IStation.Win/View/CorrectionFactorView.cs index 52b1717..b957846 100644 --- a/Test/IStation.Win/View/CorrectionFactorView.cs +++ b/Test/IStation.Win/View/CorrectionFactorView.cs @@ -340,22 +340,22 @@ //璋冨害 private void btnSchedule_Click(object sender, EventArgs e) { - //var day = this.dtDay.DateTime; - //var day_value = DayValueHelper.GetDayValue(day); - //if (day_value == null) - //{ - // XtraMessageBox.Show("鏃犳硶鍔犺浇鏃ユ湡鏁版嵁!"); - // return; - //} - //this.memoInfo.Text = string.Empty; + var day = this.dtDay.DateTime; + var day_value = DayValueHelper.GetDayValue(day); + if (day_value == null) + { + XtraMessageBox.Show("鏃犳硶鍔犺浇鏃ユ湡鏁版嵁!"); + return; + } + this.memoInfo.Text = string.Empty; - //var day_value_list = new List<DayValue>() { day_value }; + var day_value_list = new List<DayValue>() { day_value }; WaitHelper.ShowWaitForm(); var msg = ScadaScheduleHelper.Schedule( - //day_value_list, - //this.cekStation1.Checked, - //this.cekStation2.Checked, + day_value_list, + this.cekStation1.Checked, + this.cekStation2.Checked, out List<Station1ScadaSchedule> all_station1_scada_schedule_list, out List<Station2ScadaSchedule> all_station2_scada_schedule_list); -- Gitblit v1.9.3