Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/11/12 22:57:09 (11 years ago)
Author:
abeham
Message:

#1329:

  • Moved decoders and evaluators from encoding to problem
  • Removed unnecessary state variables in operators
  • Introduced parameters in interfaces and added wiring code
  • Removed ConcreteScheduleManipulator as it does not perform any manipulation
  • Made ErrorPolicy and ForcingStrategy configurable and added views for them
  • Renamed the SchedulingEvaluationAlgorithm and also converted the AlgorithmOperator to a SingleSuccessorOperator
  • Fixed Plugin- and AssemblyFileVersion
  • Added missing license headers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Manipulators/PWRManipulator.cs

    r8603 r8887  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    2728  [Item("PWRManipulator", "An operator which manipulates a PWR representation.")]
    2829  [StorableClass]
    29   public abstract class PWRManipulator : ScheduleManipulator<PWREncoding>, IPWROperator {
     30  public abstract class PWRManipulator : ScheduleManipulator, IPWROperator {
     31
    3032    [StorableConstructor]
    3133    protected PWRManipulator(bool deserializing) : base(deserializing) { }
     
    3840    protected abstract void Manipulate(IRandom random, PWREncoding individual);
    3941
    40 
    4142    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.");
    4345      Manipulate(RandomParameter.ActualValue, solution);
    4446      return base.Apply();
Note: See TracChangeset for help on using the changeset viewer.