namespace IStation.Algorithm { public class ScheduleCalc1 { private int _belong = 0; private int[] _run_flags = null; private List _pumps = null; /// /// 初始化计算参数 /// /// 所属对象 /// 泵列表 /// private bool InitCalcParas(int belong, List pumps) { _belong = 0; _pumps = null; _run_flags = null; _combine = null; if (pumps == null || pumps.Count < 1) return false; _belong = belong; _pumps = pumps; _run_flags = pumps.Select(x => x.ID).OrderBy(x => x).ToArray(); _combine = new List(); return true; } private List _combine = null; private bool CW(int belong, List pumps) { var bol = InitCalcParas(belong, pumps); if (!bol) return false; return true; } private void DoWork(int r, int i, int t) { if (r.Length / 2 >= t) { _combine.Add(r); return; } for (; i < _run_flags.Length;) { DoWork(r + _run_flags[i], ++i, t); } } } }