Changeset 8887 for trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Manipulators/PWRManipulator.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/PermutationWithRepetition/Manipulators/PWRManipulator.cs
r8603 r8887 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 27 28 [Item("PWRManipulator", "An operator which manipulates a PWR representation.")] 28 29 [StorableClass] 29 public abstract class PWRManipulator : ScheduleManipulator<PWREncoding>, IPWROperator { 30 public abstract class PWRManipulator : ScheduleManipulator, IPWROperator { 31 30 32 [StorableConstructor] 31 33 protected PWRManipulator(bool deserializing) : base(deserializing) { } … … 38 40 protected abstract void Manipulate(IRandom random, PWREncoding individual); 39 41 40 41 42 public override IOperation Apply() { 42 PWREncoding solution = ScheduleEncodingParameter.ActualValue; 43 var solution = ScheduleEncodingParameter.ActualValue as PWREncoding; 44 if (solution == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type PWREncoding."); 43 45 Manipulate(RandomParameter.ActualValue, solution); 44 46 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.