- Timestamp:
- 07/18/14 12:35:00 (11 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 48 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll11 10 HeuristicLab 3.3.5.1.ReSharper.user 12 11 HeuristicLab 3.3.6.0.ReSharper.user 13 12 HeuristicLab.4.5.resharper.user 14 13 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development16 14 HeuristicLab.resharper.user 17 15 ProtoGen.exe … … 19 17 _ReSharper.HeuristicLab 20 18 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests22 19 _ReSharper.HeuristicLab.ExtLibs 23 20 bin 24 21 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IDirectScheduleOperator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IJSMOperator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IPRVOperator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IPWROperator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleCreator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleEncoding.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleManipulator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleOperator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Crossovers/JSMCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 40 40 public abstract JSMEncoding Cross(IRandom random, JSMEncoding parent1, JSMEncoding parent2); 41 41 42 public override IOperation InstrumentedApply() {42 public override IOperation Apply() { 43 43 var parents = ParentsParameter.ActualValue; 44 44 … … 46 46 Cross(RandomParameter.ActualValue, parents[0] as JSMEncoding, parents[1] as JSMEncoding); 47 47 48 return base. InstrumentedApply();48 return base.Apply(); 49 49 } 50 50 } -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Crossovers/JSMJOXCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Crossovers/JSMOXCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Crossovers/JSMSXXCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/JSMEncoding.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System;23 22 using System.Text; 24 23 using HeuristicLab.Common; … … 54 53 55 54 foreach (Permutation p in JobSequenceMatrix) { 56 sb.Append Line(p.ToString());55 sb.Append(p.ToString() + " \n"); 57 56 } 58 57 … … 60 59 return sb.ToString(); 61 60 } 61 62 63 public override bool Equals(object obj) { 64 if (obj.GetType() == typeof(JSMEncoding)) 65 return AreEqual(this, obj as JSMEncoding); 66 67 return false; 68 } 69 public override int GetHashCode() { 70 if (JobSequenceMatrix.Count == 1) 71 return JobSequenceMatrix[0].GetHashCode(); 72 if (JobSequenceMatrix.Count == 2) 73 return JobSequenceMatrix[0].GetHashCode() ^ JobSequenceMatrix[1].GetHashCode(); 74 return 0; 75 } 76 private static bool AreEqual(JSMEncoding jSMEncoding1, JSMEncoding jSMEncoding2) { 77 if (jSMEncoding1.JobSequenceMatrix.Count != jSMEncoding2.JobSequenceMatrix.Count) 78 return false; 79 for (int i = 0; i < jSMEncoding1.JobSequenceMatrix.Count; i++) { 80 if (!AreEqual(jSMEncoding1.JobSequenceMatrix[i], jSMEncoding2.JobSequenceMatrix[i])) 81 return false; 82 } 83 return true; 84 } 85 86 private static bool AreEqual(Permutation p1, Permutation p2) { 87 if (p1.Length != p2.Length) 88 return false; 89 for (int i = 0; i < p1.Length; i++) { 90 if (p1[i] != p2[i]) 91 return false; 92 } 93 return true; 94 } 62 95 } 63 96 } -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/JSMRandomCreator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Manipulators/JSMManipulator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 39 39 protected abstract void Manipulate(IRandom random, IScheduleEncoding individual); 40 40 41 public override IOperation InstrumentedApply() {41 public override IOperation Apply() { 42 42 var solution = ScheduleEncodingParameter.ActualValue as JSMEncoding; 43 43 if (solution == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type JSMEncoding."); 44 44 Manipulate(RandomParameter.ActualValue, solution); 45 return base. InstrumentedApply();45 return base.Apply(); 46 46 } 47 47 -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Manipulators/JSMShiftChangeManipulator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Manipulators/JSMSwapManipulator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Crossovers/PWRCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 40 40 public abstract PWREncoding Cross(IRandom random, PWREncoding parent1, PWREncoding parent2); 41 41 42 public override IOperation InstrumentedApply() {42 public override IOperation Apply() { 43 43 var parents = ParentsParameter.ActualValue; 44 44 … … 46 46 Cross(RandomParameter.ActualValue, parents[0] as PWREncoding, parents[1] as PWREncoding); 47 47 48 return base. InstrumentedApply();48 return base.Apply(); 49 49 } 50 50 } -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Crossovers/PWRGOXCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Crossovers/PWRPPXCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Manipulators/PWRInsertionManipulator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Manipulators/PWRManipulator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 40 40 protected abstract void Manipulate(IRandom random, PWREncoding individual); 41 41 42 public override IOperation InstrumentedApply() {42 public override IOperation Apply() { 43 43 var solution = ScheduleEncodingParameter.ActualValue as PWREncoding; 44 44 if (solution == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type PWREncoding."); 45 45 Manipulate(RandomParameter.ActualValue, solution); 46 return base. InstrumentedApply();46 return base.Apply(); 47 47 } 48 48 -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/PWREncoding.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 75 75 return sb.ToString(); 76 76 } 77 78 public override bool Equals(object obj) { 79 if (obj.GetType() == typeof(PWREncoding)) 80 return AreEqual(this, obj as PWREncoding); 81 else 82 return base.Equals(obj); 83 } 84 85 public override int GetHashCode() { 86 if (PermutationWithRepetition.Length == 1) 87 return PermutationWithRepetition[0].GetHashCode(); 88 if (PermutationWithRepetition.Length == 2) 89 return PermutationWithRepetition[0].GetHashCode() ^ PermutationWithRepetition[1].GetHashCode(); 90 return 0; 91 } 92 93 private bool AreEqual(PWREncoding pWREncoding1, PWREncoding pWREncoding2) { 94 if (pWREncoding1.PermutationWithRepetition.Length != pWREncoding2.PermutationWithRepetition.Length) 95 return false; 96 for (int i = 0; i < pWREncoding1.PermutationWithRepetition.Length; i++) { 97 if (pWREncoding1.PermutationWithRepetition[i] != pWREncoding2.PermutationWithRepetition[i]) 98 return false; 99 } 100 return true; 101 } 77 102 } 78 103 } -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/PWRRandomCreator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Plugin.cs.frame
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Encodings.ScheduleEncoding { 25 [Plugin("HeuristicLab.Encodings.ScheduleEncoding", "3.3. 10.$WCREV$")]25 [Plugin("HeuristicLab.Encodings.ScheduleEncoding", "3.3.7.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Encodings.ScheduleEncoding-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Collections", "3.3")] -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Crossovers/PRVCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 40 40 public abstract PRVEncoding Cross(IRandom random, PRVEncoding parent1, PRVEncoding parent2); 41 41 42 public override IOperation InstrumentedApply() {42 public override IOperation Apply() { 43 43 var parents = ParentsParameter.ActualValue; 44 44 ChildParameter.ActualValue = 45 45 Cross(RandomParameter.ActualValue, parents[0] as PRVEncoding, parents[1] as PRVEncoding); 46 return base. InstrumentedApply();46 return base.Apply(); 47 47 } 48 48 } -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Crossovers/PRVDiscreteCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Crossovers/PRVSinglePointCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Manipulators/PRVManipulator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 39 39 protected abstract void Manipulate(IRandom random, PRVEncoding individual); 40 40 41 public override IOperation InstrumentedApply() {41 public override IOperation Apply() { 42 42 var solution = ScheduleEncodingParameter.ActualValue as PRVEncoding; 43 43 if (solution == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type PRVEncoding."); 44 44 Manipulate(RandomParameter.ActualValue, solution); 45 return base. InstrumentedApply();45 return base.Apply(); 46 46 } 47 47 -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Manipulators/PRVUniformOnePositionManipulator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/PRVEncoding.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 74 74 75 75 foreach (int i in PriorityRulesVector) { 76 sb.Append(i + " ");76 sb.Append(i.ToString() + " "); 77 77 } 78 78 -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/PRVRandomCreator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/Properties/AssemblyInfo.cs.frame
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 4HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2012 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3. 10.$WCREV$")]57 [assembly: AssemblyFileVersion("3.3.7.$WCREV$")] -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleCreator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 29 29 [Item("ScheduleCreator", "Represents the generalized form of creators for Scheduling Problems.")] 30 30 [StorableClass] 31 public abstract class ScheduleCreator : InstrumentedOperator, IScheduleCreator {31 public abstract class ScheduleCreator : SingleSuccessorOperator, IScheduleCreator { 32 32 33 33 public ILookupParameter<IScheduleEncoding> ScheduleEncodingParameter { … … 43 43 } 44 44 45 public override IOperation InstrumentedApply() {45 public override IOperation Apply() { 46 46 ScheduleEncodingParameter.ActualValue = CreateSolution(); 47 return base. InstrumentedApply();47 return base.Apply(); 48 48 } 49 49 -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 30 30 [Item("ScheduleCrossover", "A scheduling crossover operation.")] 31 31 [StorableClass] 32 public abstract class ScheduleCrossover : InstrumentedOperator, IScheduleCrossover, IStochasticOperator {32 public abstract class ScheduleCrossover : SingleSuccessorOperator, IScheduleCrossover, IStochasticOperator { 33 33 34 34 public ILookupParameter<IScheduleEncoding> ChildParameter { -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 45 45 public abstract Schedule Cross(IRandom random, Schedule parent1, Schedule parent2); 46 46 47 public override IOperation InstrumentedApply() {47 public override IOperation Apply() { 48 48 var parents = ParentsParameter.ActualValue; 49 49 ChildParameter.ActualValue = 50 50 Cross(RandomParameter.ActualValue, parents[0] as Schedule, parents[1] as Schedule); 51 return base. InstrumentedApply();51 return base.Apply(); 52 52 } 53 53 } -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleGTCrossover.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/DirectScheduleRandomCreator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/GTAlgorithmUtils.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Job.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System;23 22 using System.ComponentModel; 24 23 using System.Text; 25 using HeuristicLab.Collections;26 24 using HeuristicLab.Common; 27 25 using HeuristicLab.Core; … … 40 38 bool changed = dueDate != value; 41 39 dueDate = value; 42 if (changed) { 43 OnPropertyChanged("DueDate"); 44 OnToStringChanged(); 45 } 40 if (changed) OnPropertyChanged("DueDate"); 46 41 } 47 42 } … … 54 49 bool changed = index != value; 55 50 index = value; 56 if (changed) { 57 OnPropertyChanged("Index"); 58 OnToStringChanged(); 59 } 51 if (changed) OnPropertyChanged("Index"); 60 52 } 61 53 } … … 76 68 protected Job(Job original, Cloner cloner) 77 69 : base(original, cloner) { 78 this.dueDate = original.DueDate; 79 this.index = original.Index; 80 this.tasks = cloner.Clone(original.Tasks); 81 RegisterEventHandlers(); 70 this.DueDate = original.DueDate; 71 this.Index = original.Index; 72 this.Tasks = cloner.Clone(original.Tasks); 82 73 } 83 74 public Job() : this(-1, double.MaxValue) { } 84 75 public Job(int index, double dueDate) 85 76 : base() { 86 this.dueDate = dueDate; 87 this.index = index; 88 this.tasks = new ItemList<Task>(); 89 RegisterEventHandlers(); 77 DueDate = dueDate; 78 Index = index; 79 Tasks = new ItemList<Task>(); 90 80 } 91 81 … … 94 84 } 95 85 96 [StorableHook(HookType.AfterDeserialization)]97 private void AfterDeserialization() {98 RegisterEventHandlers();99 }100 101 private void RegisterEventHandlers() {102 Tasks.ItemsAdded += TasksOnItemsChanged;103 Tasks.ItemsRemoved += TasksOnItemsChanged;104 Tasks.ItemsReplaced += TasksOnItemsChanged;105 Tasks.CollectionReset += TasksOnItemsChanged;106 foreach (var task in Tasks) {107 task.PropertyChanged += TaskOnPropertyChanged;108 task.ToStringChanged += TaskOnToStringChanged;109 }110 }111 112 private void TasksOnItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<Task>> e) {113 foreach (var task in e.OldItems) {114 task.Value.PropertyChanged -= TaskOnPropertyChanged;115 task.Value.ToStringChanged -= TaskOnToStringChanged;116 }117 foreach (var task in e.Items) {118 task.Value.PropertyChanged += TaskOnPropertyChanged;119 task.Value.ToStringChanged += TaskOnToStringChanged;120 }121 OnTasksChanged();122 OnToStringChanged();123 }124 125 private void TaskOnPropertyChanged(object sender, EventArgs e) {126 OnTasksChanged();127 }128 129 private void TaskOnToStringChanged(object sender, EventArgs e) {130 OnToStringChanged();131 }132 133 86 public override string ToString() { 134 87 var sb = new StringBuilder(); 135 88 sb.Append("Job#" + Index + " [ "); 136 89 foreach (Task t in Tasks) { 137 sb.Append(t + " ");90 sb.Append(t.ToString() + " "); 138 91 } 139 92 sb.Append("{" + DueDate + "} "); … … 147 100 } 148 101 149 public event EventHandler TasksChanged;150 protected virtual void OnTasksChanged() {151 var handler = TasksChanged;152 if (handler != null) handler(this, EventArgs.Empty);153 }154 155 102 public event PropertyChangedEventHandler PropertyChanged; 156 103 protected virtual void OnPropertyChanged(string propertyName) { -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Manipulators/DirectScheduleManipulator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 40 40 protected abstract void Manipulate(IRandom random, Schedule individual); 41 41 42 public override IOperation InstrumentedApply() {42 public override IOperation Apply() { 43 43 var schedule = ScheduleEncodingParameter.ActualValue as Schedule; 44 44 if (schedule == null) throw new InvalidOperationException("ScheduleEncoding was not found or is not of type Schedule."); 45 45 Manipulate(RandomParameter.ActualValue, schedule); 46 return base. InstrumentedApply();46 return base.Apply(); 47 47 } 48 48 -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Resource.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 73 73 sb.Append("Resource#" + Index + " [ "); 74 74 foreach (ScheduledTask t in Tasks) { 75 sb.Append(t + " ");75 sb.Append(t.ToString() + " "); 76 76 } 77 77 sb.Append("]"); 78 78 return sb.ToString(); 79 79 } 80 81 82 public override bool Equals(object obj) { 83 if (obj.GetType() == typeof(Resource)) 84 return AreEqual(this, obj as Resource); 85 else 86 return false; 87 } 88 89 public override int GetHashCode() { 90 if (Tasks.Count == 1) 91 return Tasks[0].GetHashCode(); 92 if (Tasks.Count == 2) 93 return Tasks[0].GetHashCode() ^ Tasks[1].GetHashCode(); 94 return 0; 95 } 96 97 private static bool AreEqual(Resource res1, Resource res2) { 98 if (res1.Tasks.Count != res2.Tasks.Count) 99 return false; 100 for (int i = 0; i < res1.Tasks.Count; i++) { 101 if (!res1.Tasks[i].Equals(res2.Tasks[i])) 102 return false; 103 } 104 105 return true; 106 } 80 107 } 81 108 } -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Schedule.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 149 149 sb.Append("[ "); 150 150 foreach (Resource r in Resources) { 151 sb.Append Line(r.ToString());151 sb.Append(r.ToString() + " \n"); 152 152 } 153 153 sb.Append("]"); … … 164 164 return quality; 165 165 } 166 167 public override bool Equals(object obj) { 168 if (obj.GetType() == typeof(Schedule)) 169 return AreEqual(this, obj as Schedule); 170 else 171 return false; 172 } 173 public override int GetHashCode() { 174 if (Resources.Count == 1) 175 return Resources[0].GetHashCode(); 176 if (Resources.Count == 2) 177 return Resources[0].GetHashCode() ^ Resources[1].GetHashCode(); 178 return 0; 179 } 180 181 private static bool AreEqual(Schedule schedule1, Schedule schedule2) { 182 if (schedule1.Resources.Count != schedule2.Resources.Count) 183 return false; 184 for (int i = 0; i < schedule1.Resources.Count; i++) { 185 if (!schedule1.Resources[i].Equals(schedule2.Resources[i])) 186 return false; 187 } 188 189 return true; 190 } 191 166 192 } 167 193 } -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/ScheduledTask.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 75 75 return sb.ToString(); 76 76 } 77 78 public override bool Equals(object obj) { 79 if (obj.GetType() == typeof(ScheduledTask)) 80 return AreEqual(this, obj as ScheduledTask); 81 else 82 return false; 83 } 84 85 public override int GetHashCode() { 86 return TaskNr ^ JobNr; 87 } 88 89 public static bool AreEqual(ScheduledTask task1, ScheduledTask task2) { 90 return ( 91 task1.TaskNr == task2.TaskNr && 92 task1.Duration == task2.Duration && 93 task1.JobNr == task2.JobNr && 94 task1.ResourceNr == task2.ResourceNr && 95 task1.StartTime == task2.StartTime && 96 task1.EndTime == task2.EndTime); 97 } 77 98 } 78 99 } -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Task.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 38 38 bool changed = taskNr != value; 39 39 taskNr = value; 40 if (changed) { 41 OnPropertyChanged("TaskNr"); 42 OnToStringChanged(); 43 } 40 if (changed) OnPropertyChanged("TaskNr"); 44 41 } 45 42 } … … 51 48 bool changed = resourceNr != value; 52 49 resourceNr = value; 53 if (changed) { 54 OnPropertyChanged("ResourceNr"); 55 OnToStringChanged(); 56 } 50 if (changed) OnPropertyChanged("ResourceNr"); 57 51 } 58 52 } … … 95 89 protected Task(Task original, Cloner cloner) 96 90 : base(original, cloner) { 97 this. resourceNr = original.ResourceNr;98 this. jobNr = original.JobNr;99 this. duration = original.Duration;100 this. taskNr = original.TaskNr;101 this. isScheduled = original.IsScheduled;91 this.ResourceNr = original.ResourceNr; 92 this.JobNr = original.JobNr; 93 this.Duration = original.Duration; 94 this.TaskNr = original.TaskNr; 95 this.IsScheduled = original.IsScheduled; 102 96 } 103 97 public Task() : this(-1, -1, -1, 0) { } 104 98 public Task(int taskNr, int resNr, int jobNr, double duration) 105 99 : base() { 106 this.duration = duration;107 this.resourceNr = resNr;108 this.jobNr = jobNr;109 this.taskNr = taskNr;110 this.isScheduled = false;100 Duration = duration; 101 ResourceNr = resNr; 102 JobNr = jobNr; 103 TaskNr = taskNr; 104 IsScheduled = false; 111 105 } 112 106 … … 121 115 } 122 116 117 public override bool Equals(object obj) { 118 if (obj.GetType() == typeof(Task)) 119 return AreEqual(this, obj as Task); 120 else 121 return false; 122 } 123 124 public override int GetHashCode() { 125 return TaskNr ^ JobNr; 126 } 127 128 public static bool AreEqual(Task task1, Task task2) { 129 return (task1.Duration == task2.Duration && 130 task1.IsScheduled == task2.IsScheduled && 131 task1.JobNr == task2.JobNr && 132 task1.ResourceNr == task2.ResourceNr && 133 task1.TaskNr == task2.TaskNr); 134 } 135 123 136 public event PropertyChangedEventHandler PropertyChanged; 124 137 protected virtual void OnPropertyChanged(string propertyName) { -
branches/HiveStatistics/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleManipulator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 30 30 [Item("ScheduleManipulator", "A scheduling manipulation operation.")] 31 31 [StorableClass] 32 public abstract class ScheduleManipulator : InstrumentedOperator, IScheduleManipulator, IStochasticOperator {32 public abstract class ScheduleManipulator : SingleSuccessorOperator, IScheduleManipulator, IStochasticOperator { 33 33 34 34 public ILookupParameter<IScheduleEncoding> ScheduleEncodingParameter {
Note: See TracChangeset
for help on using the changeset viewer.