- Timestamp:
- 06/14/11 14:53:14 (14 years ago)
- 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
-
Property
svn:ignore
set to
-
branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/Plugin.cs
r6406 r6412 23 23 24 24 namespace HeuristicLab.Encodings.ScheduleEncoding { 25 [Plugin("HeuristicLab.Encodings.ScheduleEncoding", "3.3.3. 0")]25 [Plugin("HeuristicLab.Encodings.ScheduleEncoding", "3.3.3.6406")] 26 26 [PluginFile("HeuristicLab.Encodings.ScheduleEncoding-3.3.dll", PluginFileType.Assembly)] 27 27 public class HeuristicLabEncodingsScheduleEncodingPlugin : PluginBase { -
branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/Properties/AssemblyInfo.cs
r6406 r6412 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [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 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Data;26 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 26 … … 45 44 set; 46 45 } 47 public DoubleValue TotalDuration {46 public double TotalDuration { 48 47 get { 49 48 double result = 0; 50 49 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; 53 52 } 54 return new DoubleValue(result);53 return result; 55 54 } 56 55 } -
branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Schedule.cs
r6406 r6412 117 117 public void ScheduleTask(int resNr, double startTime, double duration, int jobNr) { 118 118 ScheduledTask task = new ScheduledTask(resNr, startTime, duration, jobNr); 119 Resource affectedResource = resources[task.ResourceNr .Value];119 Resource affectedResource = resources[task.ResourceNr]; 120 120 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) 122 122 i++; 123 123 … … 153 153 double quality = 0; 154 154 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; 157 157 } 158 158 } -
branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/ScheduledTask.cs
r6406 r6412 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Data;26 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 26 … … 32 31 #region Properties 33 32 [Storable] 34 public IntValueResourceNr { get; set; }33 public int ResourceNr { get; set; } 35 34 [Storable] 36 public DoubleValue Duration { get; set; }35 public double Duration { get; set; } 37 36 [Storable] 38 public DoubleValue StartTime { get; set; }39 public DoubleValue EndTime {37 public double StartTime { get; set; } 38 public double EndTime { 40 39 get { 41 return new DoubleValue(Duration.Value + StartTime.Value);40 return Duration + StartTime; 42 41 } 43 42 } 44 43 [Storable] 45 public IntValueJobNr { get; set; }44 public int JobNr { get; set; } 46 45 #endregion 47 46 … … 50 49 protected ScheduledTask(ScheduledTask original, Cloner cloner) 51 50 : 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; 56 55 } 57 56 public override IDeepCloneable Clone(Cloner cloner) { … … 61 60 public ScheduledTask(int resNr, double startTime, double duration, int jobNr) 62 61 : 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; 67 66 } 68 67
Note: See TracChangeset
for help on using the changeset viewer.