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
File:
1 edited

Legend:

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

    r8603 r8887  
    2929  [StorableClass]
    3030  public class Resource : Item {
    31     public Resource(int index)
    32       : base() {
    33       Index = index;
    34       Tasks = new ItemList<ScheduledTask>();
    35     }
     31
    3632    [Storable]
    3733    public int Index {
     
    4440      set;
    4541    }
     42
     43    [StorableConstructor]
     44    protected Resource(bool deserializing) : base(deserializing) { }
     45    protected Resource(Resource original, Cloner cloner)
     46      : base(original, cloner) {
     47      this.Index = original.Index;
     48      this.Tasks = cloner.Clone(original.Tasks);
     49    }
     50    public Resource(int index)
     51      : base() {
     52      Index = index;
     53      Tasks = new ItemList<ScheduledTask>();
     54    }
     55
     56    public override IDeepCloneable Clone(Cloner cloner) {
     57      return new Resource(this, cloner);
     58    }
     59
    4660    public double TotalDuration {
    4761      get {
     
    5367        return result;
    5468      }
    55     }
    56 
    57     [StorableConstructor]
    58     protected Resource(bool deserializing) : base(deserializing) { }
    59     protected Resource(Resource original, Cloner cloner)
    60       : base(original, cloner) {
    61       this.Index = original.Index;
    62       this.Tasks = cloner.Clone(original.Tasks);
    63     }
    64     public override IDeepCloneable Clone(Cloner cloner) {
    65       return new Resource(this, cloner);
    6669    }
    6770
     
    8386        return false;
    8487    }
     88
    8589    public override int GetHashCode() {
    8690      if (Tasks.Count == 1)
     
    9094      return 0;
    9195    }
     96
    9297    private static bool AreEqual(Resource res1, Resource res2) {
    9398      if (res1.Tasks.Count != res2.Tasks.Count)
Note: See TracChangeset for help on using the changeset viewer.