ÎļþÃû´Ó IStation.Application/01-ch/02-schedule/Schedule_Controller.cs ÐÞ¸Ä |
| | |
| | | using static IStation.Algorithm.ScheduleHelper; |
| | | |
| | | namespace IStation.Application |
| | | namespace IStation.Application |
| | | { |
| | | /// <summary> |
| | | /// éè¡è¾æ°´è°åº¦ |
| | | /// </summary> |
| | | [AllowAnonymous] |
| | | [Route("OpenApi/Dispatch/Solution")] |
| | | [ApiDescriptionSettings("Schedule", Name = "è¾æ°´è°åº¦", Order = 1)] |
| | | [ApiDescriptionSettings("Schedule", Name = "è°åº¦", Order = 1000)] |
| | | public class Schedule_Controller : IDynamicApiController, ITransient |
| | | { |
| | | private readonly Service.ScheduleRequest _service_schedule_request = new(); |
| | |
| | | GlobalHelper.GetStationOpenFlagList(zy_scada_list, out List<int> station1_open_flag_list, out List<int> station2_open_flag_list); |
| | | GlobalHelper.GetStationMaintenanceFlagList(zy_scada_list, out List<int> station1_maintenance_flag_list, out List<int> station2_maintenance_flag_list); |
| | | GlobalHelper.GetFlagInletWaterLevelDict(zy_scada_list, out Dictionary<int, double> station1_flag_inlet_water_level_dict, out Dictionary<int, double> station2_flag_inlet_water_level_dict); |
| | | GlobalHelper.GetFlagCumulativeRunTimeDict(out Dictionary<int, double> station1_flag_cumulative_run_time_dict, out Dictionary<int, double> station2_flag_cumulative_run_time_dict); |
| | | //GlobalHelper.GetFlagCumulativeRuntimeDict(out Dictionary<int, double> station1_flag_cumulative_run_time_dict, out Dictionary<int, double> station2_flag_cumulative_run_time_dict); |
| | | |
| | | log_title = "æºæ³µæ£ä¿®"; |
| | | if (station1_maintenance_flag_list != null && station1_maintenance_flag_list.Any()) |
| | |
| | | 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, station1_flag_cumulative_run_time_dict, target_flow1, target_head1); |
| | | var optimal_combine1 = helper.GetOptAnaCombine(station1, station1_same_type_flag_group_first, 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, station2_flag_cumulative_run_time_dict, target_flow2, target_head2); |
| | | var optimal_combine2 = helper.GetOptAnaCombine(station2, station2_same_type_flag_group_first, station2_flag_inlet_water_level_dict, target_flow2, target_head2); |
| | | |
| | | var schedule_request = new Model.ScheduleRequest |
| | | { |