Changeset 13469 for branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Decoder/JSMDecoder.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/JobSequenceMatrix/Decoder/JSMDecoder.cs
r13449 r13469 34 34 [Item("JobSequenceMatrixDecoder", "Applies the GifflerThompson algorithm to create an active schedule from a JobSequence Matrix.")] 35 35 [StorableClass] 36 public class JSMDecoder : ScheduleDecoder {36 public class JSMDecoder : ScheduleDecoder<JSMEncoding> { 37 37 38 38 public IFixedValueParameter<EnumValue<JSMDecodingErrorPolicy>> DecodingErrorPolicyParameter { … … 130 130 } 131 131 132 public override Schedule DecodeSchedule(ISchedule encoding, ItemList<Job> jobData) { 133 var solution = encoding as JSMEncoding; 134 if (solution == null) throw new InvalidOperationException("Encoding is not of type JSMEncoding"); 135 return DecodeSchedule(solution, jobData, DecodingErrorPolicy, ForcingStrategy); 132 public override Schedule DecodeSchedule(JSMEncoding encoding, ItemList<Job> jobData) { 133 return Decode(encoding, jobData, DecodingErrorPolicy, ForcingStrategy); 136 134 } 137 135 138 public static Schedule Decode Schedule(JSMEncoding solution, ItemList<Job> jobData, JSMDecodingErrorPolicy decodingErrorPolicy, JSMForcingStrategy forcingStrategy) {136 public static Schedule Decode(JSMEncoding solution, ItemList<Job> jobData, JSMDecodingErrorPolicy decodingErrorPolicy, JSMForcingStrategy forcingStrategy) { 139 137 var random = new FastRandom(solution.RandomSeed); 140 138 var jobs = (ItemList<Job>)jobData.Clone();
Note: See TracChangeset
for help on using the changeset viewer.