Changeset 8887 for trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Manipulators/JSMManipulator.cs
- Timestamp:
- 11/11/12 22:57:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Manipulators/JSMManipulator.cs
r8603 r8887 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 27 28 [Item("JSMManipulator", "An operator which manipulates a JSM representation.")] 28 29 [StorableClass] 29 public abstract class JSMManipulator : ScheduleManipulator <JSMEncoding>, IJSMOperator {30 public abstract class JSMManipulator : ScheduleManipulator, IJSMOperator { 30 31 [StorableConstructor] 31 32 protected JSMManipulator(bool deserializing) : base(deserializing) { } … … 36 37 } 37 38 38 protected abstract void Manipulate(IRandom random, JSMEncoding individual); 39 39 protected abstract void Manipulate(IRandom random, IScheduleEncoding individual); 40 40 41 41 public override IOperation Apply() { 42 JSMEncoding solution = ScheduleEncodingParameter.ActualValue; 42 var solution = ScheduleEncodingParameter.ActualValue as JSMEncoding; 43 if (solution == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type JSMEncoding."); 43 44 Manipulate(RandomParameter.ActualValue, solution); 44 45 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.