Changeset 13469 for branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Decoder/DirectScheduleDecoder.cs
- Timestamp:
- 12/15/15 15:16:24 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Decoder/DirectScheduleDecoder.cs
r13443 r13469 20 20 #endregion 21 21 22 using System;23 22 using HeuristicLab.Common; 24 23 using HeuristicLab.Core; … … 28 27 [Item("DirectScheduleDecoder", "An item used to convert a direct schedule into a generalized schedule.")] 29 28 [StorableClass] 30 public class DirectScheduleDecoder : ScheduleDecoder {29 public class DirectScheduleDecoder : ScheduleDecoder<Schedule> { 31 30 [StorableConstructor] 32 31 protected DirectScheduleDecoder(bool deserializing) : base(deserializing) { } … … 38 37 } 39 38 40 public override Schedule DecodeSchedule(ISchedule solution, ItemList<Job> jobData) { 41 var schedule = solution as Schedule; 42 if (schedule == null) throw new InvalidOperationException("Encoding is not of type PWREncoding"); 43 return DecodeSchedule(schedule, jobData); 39 public override Schedule DecodeSchedule(Schedule solution, ItemList<Job> jobData) { 40 return Decode(solution, jobData); 44 41 } 45 42 46 public static Schedule Decode Schedule(Schedule solution, ItemList<Job> jobData) {43 public static Schedule Decode(Schedule solution, ItemList<Job> jobData) { 47 44 return solution; 48 45 }
Note: See TracChangeset
for help on using the changeset viewer.