Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/14/11 14:53:14 (14 years ago)
Author:
jhelm
Message:

#1329: Did some minor changes affecting datatypes.

Location:
branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3

    • Property svn:ignore set to
      HeuristicLab.Encodings.ScheduleEncoding-3.3.csproj.user
      bin
      obj
  • branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/Plugin.cs

    r6406 r6412  
    2323
    2424namespace HeuristicLab.Encodings.ScheduleEncoding {
    25   [Plugin("HeuristicLab.Encodings.ScheduleEncoding", "3.3.3.0")]
     25  [Plugin("HeuristicLab.Encodings.ScheduleEncoding", "3.3.3.6406")]
    2626  [PluginFile("HeuristicLab.Encodings.ScheduleEncoding-3.3.dll", PluginFileType.Assembly)]
    2727  public class HeuristicLabEncodingsScheduleEncodingPlugin : PluginBase {
  • branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/Properties/AssemblyInfo.cs

    r6406 r6412  
    5555// [assembly: AssemblyVersion("1.0.*")]
    5656[assembly: AssemblyVersion("3.3.0.0")]
    57 [assembly: AssemblyFileVersion("3.3.3.0")]
     57[assembly: AssemblyFileVersion("3.3.3.6406")]
  • branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Resource.cs

    r6406 r6412  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Data;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2726
     
    4544      set;
    4645    }
    47     public DoubleValue TotalDuration {
     46    public double TotalDuration {
    4847      get {
    4948        double result = 0;
    5049        foreach (ScheduledTask t in Tasks) {
    51           if (t.EndTime.Value > result)
    52             result = t.EndTime.Value;
     50          if (t.EndTime > result)
     51            result = t.EndTime;
    5352        }
    54         return new DoubleValue(result);
     53        return result;
    5554      }
    5655    }
  • branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Schedule.cs

    r6406 r6412  
    117117    public void ScheduleTask(int resNr, double startTime, double duration, int jobNr) {
    118118      ScheduledTask task = new ScheduledTask(resNr, startTime, duration, jobNr);
    119       Resource affectedResource = resources[task.ResourceNr.Value];
     119      Resource affectedResource = resources[task.ResourceNr];
    120120      int i = 0;
    121       while (i < affectedResource.Tasks.Count && affectedResource.Tasks[i].StartTime.Value < task.StartTime.Value)
     121      while (i < affectedResource.Tasks.Count && affectedResource.Tasks[i].StartTime < task.StartTime)
    122122        i++;
    123123
     
    153153      double quality = 0;
    154154      foreach (Resource r in Resources) {
    155         if (r.TotalDuration.Value > quality) {
    156           quality = r.TotalDuration.Value;
     155        if (r.TotalDuration > quality) {
     156          quality = r.TotalDuration;
    157157        }
    158158      }
  • branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/ScheduledTask.cs

    r6406 r6412  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Data;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2726
     
    3231    #region Properties
    3332    [Storable]
    34     public IntValue ResourceNr { get; set; }
     33    public int ResourceNr { get; set; }
    3534    [Storable]
    36     public DoubleValue Duration { get; set; }
     35    public double Duration { get; set; }
    3736    [Storable]
    38     public DoubleValue StartTime { get; set; }
    39     public DoubleValue EndTime {
     37    public double StartTime { get; set; }
     38    public double EndTime {
    4039      get {
    41         return new DoubleValue(Duration.Value + StartTime.Value);
     40        return Duration + StartTime;
    4241      }
    4342    }
    4443    [Storable]
    45     public IntValue JobNr { get; set; }
     44    public int JobNr { get; set; }
    4645    #endregion
    4746
     
    5049    protected ScheduledTask(ScheduledTask original, Cloner cloner)
    5150      : base(original, cloner) {
    52       this.ResourceNr = cloner.Clone(original.ResourceNr);
    53       this.Duration = cloner.Clone(original.Duration);
    54       this.StartTime = cloner.Clone(original.StartTime);
    55       this.JobNr = cloner.Clone(original.JobNr);
     51      this.ResourceNr = original.ResourceNr;
     52      this.Duration = original.Duration;
     53      this.StartTime = original.StartTime;
     54      this.JobNr = original.JobNr;
    5655    }
    5756    public override IDeepCloneable Clone(Cloner cloner) {
     
    6160    public ScheduledTask(int resNr, double startTime, double duration, int jobNr)
    6261      : base() {
    63       Duration = new DoubleValue(duration);
    64       ResourceNr = new IntValue(resNr);
    65       StartTime = new DoubleValue(startTime);
    66       JobNr = new IntValue(jobNr);
     62      Duration = duration;
     63      ResourceNr = resNr;
     64      StartTime = startTime;
     65      JobNr = jobNr;
    6766    }
    6867
Note: See TracChangeset for help on using the changeset viewer.