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/ScheduleEncoding/Manipulators
Files:
1 deleted
1 edited

Legend:

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

    r8603 r8887  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    2728  [Item("DirectScheduleManipulator", "An operator which manipulates a direct schedule representation.")]
    2829  [StorableClass]
    29   public abstract class DirectScheduleManipulator : ScheduleManipulator<Schedule>, IDirectScheduleOperator {
     30  public abstract class DirectScheduleManipulator : ScheduleManipulator, IDirectScheduleOperator {
     31
    3032    [StorableConstructor]
    3133    protected DirectScheduleManipulator(bool deserializing) : base(deserializing) { }
     
    3638    }
    3739
     40    protected abstract void Manipulate(IRandom random, Schedule individual);
    3841
    39     protected abstract void Manipulate(IRandom random, Schedule individual);
    4042    public override IOperation Apply() {
    41       Schedule solution = ScheduleEncodingParameter.ActualValue;
    42       Manipulate(RandomParameter.ActualValue, solution);
     43      var schedule = ScheduleEncodingParameter.ActualValue as Schedule;
     44      if (schedule == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type Schedule.");
     45      Manipulate(RandomParameter.ActualValue, schedule);
    4346      return base.Apply();
    4447    }
Note: See TracChangeset for help on using the changeset viewer.