using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
|
namespace IStation.Dto
|
{
|
/// <summary>
|
/// 调度配置
|
/// </summary>
|
public class ScheduleConfig : System.ICloneable
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public ScheduleConfig() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
/// <param name="rhs"></param>
|
public ScheduleConfig(ScheduleConfig rhs)
|
{
|
this.MinOpenCount = rhs.MinOpenCount;
|
this.MaxOpenCount = rhs.MaxOpenCount;
|
this.MustOpenFlagList = rhs.MustOpenFlagList?.ToList();
|
this.MustCloseFlagList = rhs.MustCloseFlagList?.ToList();
|
this.ForbiddenFlagCombineList = rhs.ForbiddenFlagCombineList?.ToList();
|
this.AssociativeFlagCombineList = rhs.AssociativeFlagCombineList?.ToList();
|
this.SameSectionFlagCombineList = rhs.SameSectionFlagCombineList?.ToList();
|
this.WaterSupplyLimitList = rhs.WaterSupplyLimitList?.ToList();
|
this.FrequencyLimitList = rhs.FrequencyLimitList?.ToList();
|
this.FlagCumulativeRuntimeDict = new Dictionary<int, double>();
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
/// <param name="rhs"></param>
|
public void Reset(ScheduleConfig rhs)
|
{
|
this.MinOpenCount = rhs.MinOpenCount;
|
this.MaxOpenCount = rhs.MaxOpenCount;
|
this.MustOpenFlagList = rhs.MustOpenFlagList?.ToList();
|
this.MustCloseFlagList = rhs.MustCloseFlagList?.ToList();
|
this.ForbiddenFlagCombineList = rhs.ForbiddenFlagCombineList?.ToList();
|
this.AssociativeFlagCombineList = rhs.AssociativeFlagCombineList?.ToList();
|
this.SameSectionFlagCombineList = rhs.SameSectionFlagCombineList?.ToList();
|
this.WaterSupplyLimitList = rhs.WaterSupplyLimitList?.ToList();
|
this.FrequencyLimitList = rhs.FrequencyLimitList?.ToList();
|
this.FlagCumulativeRuntimeDict = new Dictionary<int, double>();
|
}
|
|
|
/// <summary>
|
/// 最小开泵数量
|
/// </summary>
|
public int MinOpenCount { get; set; }
|
|
/// <summary>
|
/// 最大开泵数量
|
/// </summary>
|
public int MaxOpenCount { get; set; }
|
|
/// <summary>
|
/// 必开泵列表
|
/// </summary>
|
public List<int> MustOpenFlagList { get; set; }
|
|
/// <summary>
|
/// 必关泵列表
|
/// </summary>
|
public List<int> MustCloseFlagList { get; set; }
|
|
/// <summary>
|
/// 禁用泵组合列表
|
/// </summary>
|
public List<List<int>> ForbiddenFlagCombineList { get; set; }
|
|
/// <summary>
|
/// 关联泵组合列表
|
/// </summary>
|
public List<List<int>> AssociativeFlagCombineList { get; set; }
|
|
/// <summary>
|
/// 同段泵组合列表
|
/// </summary>
|
public List<List<int>> SameSectionFlagCombineList { get; set; }
|
|
/// <summary>
|
/// 供水限制列表
|
/// </summary>
|
public List<WaterSupplyLimit> WaterSupplyLimitList { get; set; }
|
|
/// <summary>
|
/// 频率限制列表
|
/// </summary>
|
public List<FrequencyLimit> FrequencyLimitList { get; set; }
|
|
/// <summary>
|
/// 泵累计运行时长字典
|
/// </summary>
|
public Dictionary<int, double> FlagCumulativeRuntimeDict { get; set; }
|
|
|
/// <summary>
|
///
|
/// </summary>
|
/// <returns></returns>
|
public ScheduleConfig Clone()
|
{
|
return (ScheduleConfig)this.MemberwiseClone();
|
}
|
|
object ICloneable.Clone()
|
{
|
return this.MemberwiseClone();
|
}
|
|
}
|
}
|