Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/06/15 15:33:25 (8 years ago)
Author:
mkommend
Message:

#2521: Added encodings for schedules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Manipulators/DirectScheduleManipulator.cs

    r13435 r13437  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
     25using HeuristicLab.Parameters;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2627
     
    2930  [StorableClass]
    3031  public abstract class DirectScheduleManipulator : ScheduleManipulator, IDirectScheduleOperator {
     32    public ILookupParameter<ItemList<Job>> JobDataParameter {
     33      get { return (LookupParameter<ItemList<Job>>)Parameters["JobData"]; }
     34    }
    3135
    3236    [StorableConstructor]
    3337    protected DirectScheduleManipulator(bool deserializing) : base(deserializing) { }
    3438    protected DirectScheduleManipulator(DirectScheduleManipulator original, Cloner cloner) : base(original, cloner) { }
     39
    3540    public DirectScheduleManipulator()
    3641      : base() {
    37       ScheduleParameter.ActualName = "Schedule";
     42      Parameters.Add(new LookupParameter<ItemList<Job>>("JobData", "Job data taken from the JSSP - Instance."));
    3843    }
    3944
     
    4247    public override IOperation InstrumentedApply() {
    4348      var schedule = ScheduleParameter.ActualValue as Schedule;
    44       if (schedule == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type Schedule.");
     49      if (schedule == null) throw new InvalidOperationException("Schedule was not found or is not of type Schedule.");
    4550      Manipulate(RandomParameter.ActualValue, schedule);
    4651      return base.InstrumentedApply();
Note: See TracChangeset for help on using the changeset viewer.