Changeset 6475 for branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Schedule.cs
- Timestamp:
- 06/24/11 14:23:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Schedule.cs
r6412 r6475 31 31 [Item("Schedule", "Represents the general solution for scheduling problems.")] 32 32 [StorableClass] 33 public class Schedule : NamedItem {33 public class Schedule : NamedItem, IScheduleEncoding { 34 34 #region Properties 35 35 [Storable] … … 79 79 lastScheduledTaskOfJob = new Dictionary<int, ScheduledTask>(); 80 80 } 81 81 82 82 83 … … 159 160 return quality; 160 161 } 162 163 public override bool Equals(object obj) { 164 if (obj.GetType() == typeof(Schedule)) 165 return AreEqual(this, obj as Schedule); 166 else 167 return false; 168 } 169 170 private static bool AreEqual(Schedule schedule1, Schedule schedule2) { 171 if (schedule1.Resources.Count != schedule2.Resources.Count) 172 return false; 173 for (int i = 0; i < schedule1.Resources.Count; i++) { 174 if (!schedule1.Resources[i].Equals(schedule2.Resources[i])) 175 return false; 176 } 177 178 return true; 179 } 180 161 181 } 162 182 }
Note: See TracChangeset
for help on using the changeset viewer.