Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/11/12 22:57:09 (12 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
Location:
trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Manipulators
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Manipulators/PRVManipulator.cs

    r8603 r8887  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    2728  [Item("PRVManipulator", "An operator which manipulates a PRV representation.")]
    2829  [StorableClass]
    29   public abstract class PRVManipulator : ScheduleManipulator<PRVEncoding>, IPRVOperator {
     30  public abstract class PRVManipulator : ScheduleManipulator, IPRVOperator {
    3031    [StorableConstructor]
    3132    protected PRVManipulator(bool deserializing) : base(deserializing) { }
     
    3637    }
    3738
     39    protected abstract void Manipulate(IRandom random, PRVEncoding individual);
    3840
    39     protected abstract void Manipulate(IRandom random, PRVEncoding individual);
    4041    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.");
    4244      Manipulate(RandomParameter.ActualValue, solution);
    4345      return base.Apply();
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Manipulators/PRVUniformOnePositionManipulator.cs

    r8882 r8887  
    2727
    2828namespace HeuristicLab.Encodings.ScheduleEncoding.PriorityRulesVector {
    29 
    3029  [Item("PRVUniformOnePositionManipulator", "Represents a manipulation operation inserting parts of the individual at another position.")]
    3130  [StorableClass]
    3231  public class PRVUniformOnePositionManipulator : PRVManipulator {
     32
    3333    [StorableConstructor]
    3434    protected PRVUniformOnePositionManipulator(bool deserializing) : base(deserializing) { }
    35     protected PRVUniformOnePositionManipulator(PRVUniformOnePositionManipulator original, Cloner cloner)
    36       : base(original, cloner) {
    37     }
     35    protected PRVUniformOnePositionManipulator(PRVUniformOnePositionManipulator original, Cloner cloner) : base(original, cloner) { }
     36    public PRVUniformOnePositionManipulator() : base() { }
     37
    3838    public override IDeepCloneable Clone(Cloner cloner) {
    3939      return new PRVUniformOnePositionManipulator(this, cloner);
    4040    }
    41     public PRVUniformOnePositionManipulator() : base() { }
    42 
    4341
    4442    public static void Apply(IRandom random, PRVEncoding individual) {
Note: See TracChangeset for help on using the changeset viewer.