public SchedulerBase(ProblemSetting ps) { this.ProblemSetting = ps.Clone(); CurrentJobList = new List<Job>(); this.ScheduledJobList = new List<Job>(); Cluster = new Cluster(this.ProblemSetting.TimeSlots, this.ProblemSetting.ClusterNodeNum); //this.Results = new Dictionary<string, List<SimulateResult>>(); }
public Cluster Clone() { var cluster = new Cluster(this.TimeSlots, this.NodeNum); this.UsedBrownEnergyList.CopyTo(cluster.UsedBrownEnergyList, 0); this.UsedGreenEnergyList.CopyTo(cluster.UsedGreenEnergyList, 0); cluster.BitMap = (Job[,])this.BitMap.Clone(); //for (int t = 0; t < this.TimeSlots; t++) //{ // for (int n = 0; n < this.NodeNum; n++) // { // if (this.BitMap[t, n] != null) // { // cluster.BitMap[t, n] = new Job(); // } // } //} return cluster; }