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