Changeset 6406
- Timestamp:
- 06/10/11 16:18:44 (14 years ago)
- Location:
- branches/Scheduling
- Files:
-
- 87 added
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/Scheduling/HeuristicLab 3.3.sln ¶
r6364 r6406 401 401 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Scheduling.Views-3.3", "HeuristicLab.Problems.Scheduling.Views\3.3\HeuristicLab.Problems.Scheduling.Views-3.3.csproj", "{78763A4E-E163-48C2-98EB-709760D06F25}" 402 402 EndProject 403 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.SchedulingEncoding-3.3", "HeuristicLab.Encodings.SchedulingEncoding\3.3\HeuristicLab.Encodings.SchedulingEncoding-3.3.csproj", "{17F3EF80-B2C3-4B8D-A4D5-BE9CE3BA2606}" 404 EndProject 405 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.SchedulingEncoding.Views-3.3", "HeuristicLab.Encodings.SchedulingEncoding.Views\3.3\HeuristicLab.Encodings.SchedulingEncoding.Views-3.3.csproj", "{0C378762-D5DB-488A-8931-2BA42B1B7CBF}" 403 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.ScheduleEncoding-3.3", "HeuristicLab.Encodings.ScheduleEncoding\3.3\HeuristicLab.Encodings.ScheduleEncoding-3.3.csproj", "{17F3EF80-B2C3-4B8D-A4D5-BE9CE3BA2606}" 404 EndProject 405 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.ScheduleEncoding.Views-3.3", "HeuristicLab.Encodings.ScheduleEncoding.Views\3.3\HeuristicLab.Encodings.ScheduleEncoding.Views-3.3.csproj", "{0C378762-D5DB-488A-8931-2BA42B1B7CBF}" 406 EndProject 407 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.ScheduleEncoding-3.3.Tests", "HeuristicLab.Encodings.ScheduleEncoding.Tests\HeuristicLab.Encodings.ScheduleEncoding-3.3.Tests.csproj", "{E4B03572-6794-4AA9-9364-666973248191}" 406 408 EndProject 407 409 Global … … 1890 1892 {0C378762-D5DB-488A-8931-2BA42B1B7CBF}.Release|x64.ActiveCfg = Release|Any CPU 1891 1893 {0C378762-D5DB-488A-8931-2BA42B1B7CBF}.Release|x86.ActiveCfg = Release|Any CPU 1894 {E4B03572-6794-4AA9-9364-666973248191}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 1895 {E4B03572-6794-4AA9-9364-666973248191}.Debug|Any CPU.Build.0 = Debug|Any CPU 1896 {E4B03572-6794-4AA9-9364-666973248191}.Debug|x64.ActiveCfg = Debug|Any CPU 1897 {E4B03572-6794-4AA9-9364-666973248191}.Debug|x86.ActiveCfg = Debug|Any CPU 1898 {E4B03572-6794-4AA9-9364-666973248191}.Release|Any CPU.ActiveCfg = Release|Any CPU 1899 {E4B03572-6794-4AA9-9364-666973248191}.Release|Any CPU.Build.0 = Release|Any CPU 1900 {E4B03572-6794-4AA9-9364-666973248191}.Release|x64.ActiveCfg = Release|Any CPU 1901 {E4B03572-6794-4AA9-9364-666973248191}.Release|x86.ActiveCfg = Release|Any CPU 1892 1902 EndGlobalSection 1893 1903 GlobalSection(SolutionProperties) = preSolution -
branches/Scheduling/HeuristicLab.Analysis/3.3/Tests ¶
- Property svn:ignore
-
TabularUnified
old new 2 2 obj 3 3 *.vs10x 4 HeuristicLab.Analysis.Tests-3.3.csproj.user
-
- Property svn:ignore
-
TabularUnified branches/Scheduling/HeuristicLab.Analysis/3.3/Tests/HeuristicLab.Analysis.Tests-3.3.csproj ¶
r5938 r6406 99 99 </PropertyGroup> 100 100 <ItemGroup> 101 <ProjectReference Include="..\..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> 102 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project> 103 <Name>HeuristicLab.Collections-3.3</Name> 104 </ProjectReference> 105 <ProjectReference Include="..\..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj"> 106 <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project> 107 <Name>HeuristicLab.Common.Resources-3.3</Name> 108 </ProjectReference> 101 109 <ProjectReference Include="..\..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj"> 102 110 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project> … … 111 119 <Name>HeuristicLab.Data-3.3</Name> 112 120 </ProjectReference> 121 <Reference Include="Microsoft.CSharp" /> 113 122 <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> 114 123 <Reference Include="System" /> … … 116 125 <RequiredTargetFramework>3.5</RequiredTargetFramework> 117 126 </Reference> 127 <Reference Include="System.Data" /> 128 <Reference Include="System.Data.DataSetExtensions" /> 129 <Reference Include="System.Xml" /> 130 <Reference Include="System.Xml.Linq" /> 118 131 </ItemGroup> 119 132 <ItemGroup> … … 127 140 </ItemGroup> 128 141 <ItemGroup> 142 <ProjectReference Include="..\..\..\HeuristicLab.Encodings.IntegerVectorEncoding\3.3\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj"> 143 <Project>{DDFB14DD-2A85-493C-A52D-E69729BBAEB0}</Project> 144 <Name>HeuristicLab.Encodings.IntegerVectorEncoding-3.3</Name> 145 </ProjectReference> 146 <ProjectReference Include="..\..\..\HeuristicLab.Encodings.PermutationEncoding\3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.csproj"> 147 <Project>{DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA}</Project> 148 <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name> 149 </ProjectReference> 150 <ProjectReference Include="..\..\..\HeuristicLab.Encodings.ScheduleEncoding\3.3\HeuristicLab.Encodings.ScheduleEncoding-3.3.csproj"> 151 <Project>{17F3EF80-B2C3-4B8D-A4D5-BE9CE3BA2606}</Project> 152 <Name>HeuristicLab.Encodings.ScheduleEncoding-3.3</Name> 153 </ProjectReference> 154 <ProjectReference Include="..\..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj"> 155 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project> 156 <Name>HeuristicLab.Operators-3.3</Name> 157 </ProjectReference> 158 <ProjectReference Include="..\..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 159 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project> 160 <Name>HeuristicLab.Optimization-3.3</Name> 161 </ProjectReference> 162 <ProjectReference Include="..\..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj"> 163 <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project> 164 <Name>HeuristicLab.Parameters-3.3</Name> 165 </ProjectReference> 166 <ProjectReference Include="..\..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj"> 167 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project> 168 <Name>HeuristicLab.Persistence-3.3</Name> 169 </ProjectReference> 170 <ProjectReference Include="..\..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj"> 171 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project> 172 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 173 </ProjectReference> 129 174 <ProjectReference Include="..\HeuristicLab.Analysis-3.3.csproj"> 130 175 <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project> -
branches/Scheduling/HeuristicLab.Problems.DataAnalysis/3.4/Tests ¶
- Property svn:ignore
-
TabularUnified
old new 2 2 obj 3 3 *.vs10x 4 HeuristicLab.Problems.DataAnalysis.Tests-3.4.csproj.user
-
- Property svn:ignore
-
branches/Scheduling/HeuristicLab.Problems.QuadraticAssignment.Views/3.3 ¶
- Property svn:ignore
-
TabularUnified
old new 3 3 Plugin.cs 4 4 *.vs10x 5 HeuristicLab.Problems.QuadraticAssignment.Views-3.3.csproj.user
-
- Property svn:ignore
-
branches/Scheduling/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests ¶
- Property svn:ignore
-
TabularUnified
old new 2 2 obj 3 3 *.vs10x 4 HeuristicLab.Problems.QuadraticAssignment.Tests-3.3.csproj.user
-
- Property svn:ignore
-
branches/Scheduling/HeuristicLab.Problems.Scheduling.Views/3.3 ¶
- Property svn:ignore
-
TabularUnified
old new 1 1 bin 2 2 obj 3 HeuristicLab.Problems.Scheduling.Views-3.3.csproj.user
-
- Property svn:ignore
-
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling.Views/3.3/HeuristicLab.Problems.Scheduling.Views-3.3.csproj ¶
r6364 r6406 115 115 <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name> 116 116 </ProjectReference> 117 <ProjectReference Include="..\..\HeuristicLab.Encodings.Schedul ingEncoding.Views\3.3\HeuristicLab.Encodings.SchedulingEncoding.Views-3.3.csproj">117 <ProjectReference Include="..\..\HeuristicLab.Encodings.ScheduleEncoding.Views\3.3\HeuristicLab.Encodings.ScheduleEncoding.Views-3.3.csproj"> 118 118 <Project>{0C378762-D5DB-488A-8931-2BA42B1B7CBF}</Project> 119 <Name>HeuristicLab.Encodings.Schedul ingEncoding.Views-3.3</Name>119 <Name>HeuristicLab.Encodings.ScheduleEncoding.Views-3.3</Name> 120 120 </ProjectReference> 121 <ProjectReference Include="..\..\HeuristicLab.Encodings.Schedul ingEncoding\3.3\HeuristicLab.Encodings.SchedulingEncoding-3.3.csproj">121 <ProjectReference Include="..\..\HeuristicLab.Encodings.ScheduleEncoding\3.3\HeuristicLab.Encodings.ScheduleEncoding-3.3.csproj"> 122 122 <Project>{17F3EF80-B2C3-4B8D-A4D5-BE9CE3BA2606}</Project> 123 <Name>HeuristicLab.Encodings.Schedul ingEncoding-3.3</Name>123 <Name>HeuristicLab.Encodings.ScheduleEncoding-3.3</Name> 124 124 </ProjectReference> 125 125 <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj"> -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling.Views/3.3/JobShopSchedulingProblemView.Designer.cs ¶
r6364 r6406 1 using HeuristicLab.Encodings.Schedul ingEncoding.Views;1 using HeuristicLab.Encodings.ScheduleEncoding.Views; 2 2 namespace HeuristicLab.Problems.Scheduling.Views { 3 3 partial class JobShopSchedulingProblemView { -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling.Views/3.3/Plugin.cs ¶
r6364 r6406 23 23 24 24 namespace HeuristicLab.Problems.Scheduling.Views { 25 [Plugin("HeuristicLab.Problems.Scheduling.Views", "3.3.3.6 294")]25 [Plugin("HeuristicLab.Problems.Scheduling.Views", "3.3.3.6364")] 26 26 [PluginFile("HeuristicLab.Problems.Scheduling.Views-3.3.dll", PluginFileType.Assembly)] 27 27 public class HeuristicLabProblemsSchedulingViewsPlugin : PluginBase { -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling.Views/3.3/Properties/AssemblyInfo.cs ¶
r6364 r6406 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.3.0.0")] 55 [assembly: AssemblyFileVersion("3.3.0.6 294")]55 [assembly: AssemblyFileVersion("3.3.0.6364")] -
branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3 ¶
- Property svn:ignore
-
TabularUnified
old new 2 2 bin 3 3 obj 4 HeuristicLab.Problems.Scheduling-3.3.csproj.user
-
- Property svn:ignore
-
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Analyzers/BestSchedulingSolutionAnalyzer.cs ¶
r6293 r6406 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 22 using System.Linq; 25 using System.Text; 23 using HeuristicLab.Common; 24 using HeuristicLab.Core; 25 using HeuristicLab.Data; 26 using HeuristicLab.Encodings.ScheduleEncoding; 26 27 using HeuristicLab.Optimization; 27 using HeuristicLab. Core;28 using HeuristicLab.Parameters; 28 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Common;30 using HeuristicLab.Parameters;31 using HeuristicLab.Data;32 using HeuristicLab.Encodings.SchedulingEncoding;33 30 34 namespace HeuristicLab.Problems.Scheduling .Analyzers{31 namespace HeuristicLab.Problems.Scheduling { 35 32 36 33 [Item("BestSchedulingSolutionAnalyzer", "An operator for analyzing the best solution of Scheduling Problems given in schedule-representation.")] … … 53 50 } 54 51 55 public BestSchedulingSolutionAnalyzer () : base () { 52 public BestSchedulingSolutionAnalyzer() 53 : base() { 56 54 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator.")); 57 55 } … … 59 57 public override IOperation Apply() { 60 58 ItemArray<DoubleValue> qualities = QualityParameter.ActualValue; 61 ItemArray<Schedule> solutions = Schedul ingSolutionParameter.ActualValue;59 ItemArray<Schedule> solutions = ScheduleParameter.ActualValue; 62 60 ResultCollection results = ResultsParameter.ActualValue; 63 61 bool max = MaximizationParameter.ActualValue.Value; … … 79 77 if (bestSolution == null) { 80 78 bestSolution = (Schedule)solutions[i].Clone(); 81 bestSolution.Quality .Value = qualities [i].Value;79 bestSolution.Quality = (DoubleValue)qualities[i].Clone(); 82 80 BestSolutionParameter.ActualValue = bestSolution; 83 81 results.Add(new Result("Best Scheduling Solution", bestSolution)); -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Analyzers/SchedulingAnalyzer.cs ¶
r6293 r6406 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;22 using HeuristicLab.Common; 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Encodings.ScheduleEncoding; 26 26 using HeuristicLab.Operators; 27 27 using HeuristicLab.Optimization; 28 28 using HeuristicLab.Parameters; 29 using HeuristicLab.Data;30 using HeuristicLab.Core;31 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 using HeuristicLab.Common;33 using HeuristicLab.Encodings.SchedulingEncoding;34 30 35 namespace HeuristicLab.Problems.Scheduling .Analyzers{36 [Item("Scheduling 31 namespace HeuristicLab.Problems.Scheduling { 32 [Item("SchedulingAnalyzer", "Represents the generalized form of Analyzers for Scheduling Problems.")] 37 33 [StorableClass] 38 34 public abstract class SchedulingAnalyzer : SingleSuccessorOperator, IAnalyzer { … … 62 58 get { return (LookupParameter<Schedule>)Parameters["BestKnownSolution"]; } 63 59 } 64 public ScopeTreeLookupParameter<Schedule> Schedul ingSolutionParameter {65 get { return (ScopeTreeLookupParameter<Schedule>)Parameters[" DecodedSchedulingSolution"]; }60 public ScopeTreeLookupParameter<Schedule> ScheduleParameter { 61 get { return (ScopeTreeLookupParameter<Schedule>)Parameters["Schedule"]; } 66 62 } 67 63 #endregion 68 64 69 public SchedulingAnalyzer () : base() { 65 public SchedulingAnalyzer() 66 : base() { 70 67 Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem.")); 71 68 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the JSSP solutions which should be analyzed.")); 72 Parameters.Add(new ScopeTreeLookupParameter<Schedule>(" DecodedSchedulingSolution", "The solutions from which the best solution has to be chosen from."));69 Parameters.Add(new ScopeTreeLookupParameter<Schedule>("Schedule", "The solutions from which the best solution has to be chosen from.")); 73 70 Parameters.Add(new LookupParameter<Schedule>("BestSolution", "The best JSSP solution.")); 74 71 Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best JSSP solution should be stored.")); -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Decoders/GTAlgorithmUtils.cs ¶
r6293 r6406 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using HeuristicLab.Encodings.SchedulingEncoding; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 6 23 using HeuristicLab.Core; 24 using HeuristicLab.Encodings.ScheduleEncoding; 7 25 8 namespace HeuristicLab.Problems.Scheduling .Decoders{26 namespace HeuristicLab.Problems.Scheduling { 9 27 public static class GTAlgorithmUtils { 10 28 … … 45 63 return result; 46 64 } 47 65 48 66 public static double ComputeEarliestStartTime(Task t, Schedule schedule) { 49 ScheduledTask previousTask = schedule.GetLastScheduledTaskForJobNr 67 ScheduledTask previousTask = schedule.GetLastScheduledTaskForJobNr(t.JobNr.Value); 50 68 Resource affectedResource = schedule.Resources[t.ResourceNr.Value]; 51 69 double lastMachineEndTime = affectedResource.TotalDuration.Value; -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecoder.cs ¶
r6364 r6406 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 23 using System.Linq; 25 using System.Text;24 using HeuristicLab.Common; 26 25 using HeuristicLab.Core; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;28 using HeuristicLab.Common;29 using HeuristicLab.Data;30 26 using HeuristicLab.Encodings.PermutationEncoding; 27 using HeuristicLab.Encodings.ScheduleEncoding; 28 using HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix; 31 29 using HeuristicLab.Optimization; 32 30 using HeuristicLab.Parameters; 33 using HeuristicLab.Encodings.SchedulingEncoding.JobSequenceMatrix; 34 using HeuristicLab.Encodings.SchedulingEncoding; 35 using HeuristicLab.Problems.Scheduling.Interfaces; 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 36 32 37 namespace HeuristicLab.Problems.Scheduling .Decoders{38 [Item("Job Sequence MatrixDecoder", "Applies the GifflerThompson algorithm to create an active schedule from a JobSequence Matrix.")]33 namespace HeuristicLab.Problems.Scheduling { 34 [Item("JobSequenceMatrixDecoder", "Applies the GifflerThompson algorithm to create an active schedule from a JobSequence Matrix.")] 39 35 [StorableClass] 40 public class JSMDecoder : SchedulingDecoder<JSMEncoding>, IStochasticOperator, IJSSPOperator { 41 [StorableConstructor] 42 protected JSMDecoder(bool deserializing) : base(deserializing) { } 43 protected JSMDecoder(JSMDecoder original, Cloner cloner) 44 : base(original, cloner) { 45 this.resultingSchedule = cloner.Clone(original.resultingSchedule); 46 this.jobs = cloner.Clone(original.jobs); 47 this.decodingErrorPolicy = original.decodingErrorPolicy; 48 this.forcingStrategy = original.forcingStrategy; 49 } 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new JSMDecoder(this, cloner); 52 } 53 36 public class JSMDecoder : ScheduleDecoder<JSMEncoding>, IStochasticOperator, IJSSPOperator { 54 37 public ILookupParameter<IRandom> RandomParameter { 55 38 get { return (LookupParameter<IRandom>)Parameters["Random"]; } … … 70 53 71 54 [Storable] 72 private JSMForcingStrategyTypes forcingStrategy = JSMForcingStrategyTypes.ShiftForcing; 55 private JSMForcingStrategyTypes forcingStrategy = JSMForcingStrategyTypes.ShiftForcing; 73 56 #endregion 57 58 [StorableConstructor] 59 protected JSMDecoder(bool deserializing) : base(deserializing) { } 60 protected JSMDecoder(JSMDecoder original, Cloner cloner) 61 : base(original, cloner) { 62 this.resultingSchedule = cloner.Clone(original.resultingSchedule); 63 this.jobs = cloner.Clone(original.jobs); 64 this.decodingErrorPolicy = original.decodingErrorPolicy; 65 this.forcingStrategy = original.forcingStrategy; 66 } 67 public override IDeepCloneable Clone(Cloner cloner) { 68 return new JSMDecoder(this, cloner); 69 } 74 70 75 71 public JSMDecoder() … … 77 73 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 78 74 Parameters.Add(new LookupParameter<ItemList<Job>>("JobData", "Job data taken from the Schedulingproblem - Instance.")); 75 ScheduleEncodingParameter.ActualName = "JobSequenceMatrix"; 79 76 } 80 77 81 78 82 79 private Task SelectTaskFromConflictSet(int conflictedResourceNr, int progressOnConflictedResource, ItemList<Task> conflictSet, ItemList<Permutation> jsm) { 83 80 if (conflictSet.Count == 1) 84 81 return conflictSet[0]; 85 82 86 83 //get solutionCandidate from jobSequencingMatrix 87 84 int solutionCandidateJobNr = jsm[conflictedResourceNr][progressOnConflictedResource]; … … 104 101 } 105 102 private Task ApplyDecodingErrorPolicy(ItemList<Task> conflictSet, Permutation resource, int progress) { 106 if (decodingErrorPolicy == JSMDecodingErrorPolicyTypes.RandomPolicy) { 103 if (decodingErrorPolicy == JSMDecodingErrorPolicyTypes.RandomPolicy) { 107 104 //Random 108 105 return conflictSet[RandomParameter.ActualValue.Next(conflictSet.Count - 1)]; … … 118 115 } 119 116 return conflictSet[RandomParameter.ActualValue.Next(conflictSet.Count - 1)]; 120 } 117 } 121 118 } 122 119 private void ApplyForcingStrategy(ItemList<Permutation> jsm, int conflictedResource, int newResolutionIndex, int progressOnResource, int newResolution) { … … 132 129 asList.Insert(progressOnResource, newResolution); 133 130 } else { 134 asList.Insert(progressOnResource, newResolution); 131 asList.Insert(progressOnResource, newResolution); 135 132 asList.RemoveAt(newResolutionIndex); 136 133 } 137 jsm[conflictedResource] = new Permutation 138 } 134 jsm[conflictedResource] = new Permutation(PermutationTypes.Absolute, asList.ToArray<int>()); 135 } 139 136 } 140 137 … … 143 140 144 141 jobs = (ItemList<Job>)jobData.Clone(); 145 resultingSchedule = new Schedule( new IntValue(jobs[0].Tasks.Count));142 resultingSchedule = new Schedule(jobs[0].Tasks.Count); 146 143 147 144 //Reset scheduled tasks in result … … 186 183 public override IOperation Apply() { 187 184 return base.Apply(); 188 } 185 } 189 186 } 190 187 } -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecodingErrorPolicyTypes.cs ¶
r6293 r6406 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace HeuristicLab.Problems.Scheduling.Decoders { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 namespace HeuristicLab.Problems.Scheduling { 7 22 public enum JSMDecodingErrorPolicyTypes { 8 23 RandomPolicy, -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMForcingStrategyTypes.cs ¶
r6293 r6406 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 5 21 6 namespace HeuristicLab.Problems.Scheduling .Decoders{22 namespace HeuristicLab.Problems.Scheduling { 7 23 public enum JSMForcingStrategyTypes { 8 24 ShiftForcing, -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Decoders/PRVDecoder.cs ¶
r6364 r6406 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 22 using HeuristicLab.Common; 26 23 using HeuristicLab.Core; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 29 using HeuristicLab.Data; 30 using HeuristicLab.Encodings.PermutationEncoding; 24 using HeuristicLab.Encodings.ScheduleEncoding; 25 using HeuristicLab.Encodings.ScheduleEncoding.PriorityRulesVector; 31 26 using HeuristicLab.Optimization; 32 27 using HeuristicLab.Parameters; 33 using HeuristicLab.Problems.Scheduling.Interfaces; 34 using HeuristicLab.Encodings.SchedulingEncoding.PriorityRulesVector; 35 using HeuristicLab.Encodings.SchedulingEncoding; 36 37 namespace HeuristicLab.Problems.Scheduling.Decoders { 38 [Item("Job Sequencing Matrix Decoder", "Applies the GifflerThompson algorithm to create an active schedule from a JobSequencing Matrix.")] 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 30 namespace HeuristicLab.Problems.Scheduling { 31 [Item("JobSequencingMatrixDecoder", "Applies the GifflerThompson algorithm to create an active schedule from a JobSequencing Matrix.")] 39 32 [StorableClass] 40 public class PRVDecoder : SchedulingDecoder<PRVEncoding>, IStochasticOperator, IJSSPOperator { 33 public class PRVDecoder : ScheduleDecoder<PRVEncoding>, IStochasticOperator, IJSSPOperator { 34 public ILookupParameter<IRandom> RandomParameter { 35 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 36 } 37 public ILookupParameter<ItemList<Job>> JobDataParameter { 38 get { return (LookupParameter<ItemList<Job>>)Parameters["JobData"]; } 39 } 40 41 #region Private Members 42 [Storable] 43 private Schedule resultingSchedule; 44 45 [Storable] 46 private ItemList<Job> jobs; 47 #endregion 48 49 #region Priority Rules 50 //smallest number of remaining tasks 51 private Task FILORule(ItemList<Task> tasks) { 52 Task currentResult = tasks[tasks.Count - 1]; 53 return currentResult; 54 } 55 56 //earliest start time 57 private Task ESTRule(ItemList<Task> tasks) { 58 Task currentResult = RandomRule(tasks); 59 double currentEST = double.MaxValue; 60 foreach (Task t in tasks) { 61 double est = GTAlgorithmUtils.ComputeEarliestStartTime(t, resultingSchedule); 62 if (est < currentEST) { 63 currentEST = est; 64 currentResult = t; 65 } 66 } 67 return currentResult; 68 } 69 70 //shortest processingtime 71 private Task SPTRule(ItemList<Task> tasks) { 72 Task currentResult = RandomRule(tasks); 73 foreach (Task t in tasks) { 74 if (t.Duration.Value < currentResult.Duration.Value) 75 currentResult = t; 76 } 77 return currentResult; 78 } 79 80 //longest processing time 81 private Task LPTRule(ItemList<Task> tasks) { 82 Task currentResult = RandomRule(tasks); 83 foreach (Task t in tasks) { 84 if (t.Duration.Value > currentResult.Duration.Value) 85 currentResult = t; 86 } 87 return currentResult; 88 } 89 90 //most work remaining 91 private Task MWRRule(ItemList<Task> tasks) { 92 Task currentResult = RandomRule(tasks); 93 double currentLargestRemainingProcessingTime = 0; 94 foreach (Task t in tasks) { 95 double remainingProcessingTime = 0; 96 foreach (Task jt in jobs[t.JobNr.Value].Tasks) { 97 if (!jt.IsScheduled.Value) 98 remainingProcessingTime += jt.Duration.Value; 99 } 100 if (remainingProcessingTime > currentLargestRemainingProcessingTime) { 101 currentLargestRemainingProcessingTime = remainingProcessingTime; 102 currentResult = t; 103 } 104 } 105 return currentResult; 106 } 107 108 //least work remaining 109 private Task LWRRule(ItemList<Task> tasks) { 110 Task currentResult = RandomRule(tasks); 111 double currentSmallestRemainingProcessingTime = double.MaxValue; 112 foreach (Task t in tasks) { 113 double remainingProcessingTime = 0; 114 foreach (Task jt in jobs[t.JobNr.Value].Tasks) { 115 if (!jt.IsScheduled.Value) 116 remainingProcessingTime += jt.Duration.Value; 117 } 118 if (remainingProcessingTime < currentSmallestRemainingProcessingTime) { 119 currentSmallestRemainingProcessingTime = remainingProcessingTime; 120 currentResult = t; 121 } 122 } 123 return currentResult; 124 } 125 126 //most operations remaining 127 private Task MORRule(ItemList<Task> tasks) { 128 Task currentResult = RandomRule(tasks); 129 int currentLargestNrOfRemainingTasks = 0; 130 foreach (Task t in tasks) { 131 int nrOfRemainingTasks = 0; 132 foreach (Task jt in jobs[t.JobNr.Value].Tasks) { 133 if (!jt.IsScheduled.Value) 134 nrOfRemainingTasks++; 135 } 136 if (currentLargestNrOfRemainingTasks < nrOfRemainingTasks) { 137 currentLargestNrOfRemainingTasks = nrOfRemainingTasks; 138 currentResult = t; 139 } 140 } 141 return currentResult; 142 } 143 144 //least operationsremaining 145 private Task LORRule(ItemList<Task> tasks) { 146 Task currentResult = RandomRule(tasks); 147 int currentSmallestNrOfRemainingTasks = int.MaxValue; 148 foreach (Task t in tasks) { 149 int nrOfRemainingTasks = 0; 150 foreach (Task jt in jobs[t.JobNr.Value].Tasks) { 151 if (!jt.IsScheduled.Value) 152 nrOfRemainingTasks++; 153 } 154 if (currentSmallestNrOfRemainingTasks > nrOfRemainingTasks) { 155 currentSmallestNrOfRemainingTasks = nrOfRemainingTasks; 156 currentResult = t; 157 } 158 } 159 return currentResult; 160 } 161 162 //first operation in Queue 163 private Task FIFORule(ItemList<Task> tasks) { 164 Task currentResult = tasks[0]; 165 return currentResult; 166 } 167 168 //random 169 private Task RandomRule(ItemList<Task> tasks) { 170 Task currentResult = tasks[RandomParameter.ActualValue.Next(tasks.Count)]; 171 return currentResult; 172 } 173 174 #endregion 175 41 176 [StorableConstructor] 42 177 protected PRVDecoder(bool deserializing) : base(deserializing) { } 43 178 protected PRVDecoder(PRVDecoder original, Cloner cloner) 44 179 : base(original, cloner) { 45 180 this.resultingSchedule = cloner.Clone(original.resultingSchedule); 46 181 } 47 182 public override IDeepCloneable Clone(Cloner cloner) { 48 183 return new PRVDecoder(this, cloner); 49 184 } 50 51 public ILookupParameter<IRandom> RandomParameter {52 get { return (LookupParameter<IRandom>)Parameters["Random"]; }53 }54 public ILookupParameter<ItemList<Job>> JobDataParameter {55 get { return (LookupParameter<ItemList<Job>>)Parameters["JobData"]; }56 }57 58 #region Private Members59 [Storable]60 private Schedule resultingSchedule;61 62 [Storable]63 private ItemList<Job> jobs;64 #endregion65 66 #region Priority Rules67 //smallest number of remaining tasks68 private Task FILORule(ItemList<Task> tasks) {69 Task currentResult = tasks[tasks.Count-1];70 return currentResult;71 }72 73 //earliest start time74 private Task ESTRule(ItemList<Task> tasks) {75 Task currentResult = RandomRule(tasks);76 double currentEST = double.MaxValue;77 foreach (Task t in tasks) {78 double est = GTAlgorithmUtils.ComputeEarliestStartTime(t, resultingSchedule);79 if (est < currentEST) {80 currentEST = est;81 currentResult = t;82 }83 }84 return currentResult;85 }86 87 //shortest processingtime88 private Task SPTRule(ItemList<Task> tasks) {89 Task currentResult = RandomRule(tasks);90 foreach (Task t in tasks) {91 if (t.Duration.Value < currentResult.Duration.Value)92 currentResult = t;93 }94 return currentResult;95 }96 97 //longest processing time98 private Task LPTRule(ItemList<Task> tasks) {99 Task currentResult = RandomRule(tasks);100 foreach (Task t in tasks) {101 if (t.Duration.Value > currentResult.Duration.Value)102 currentResult = t;103 }104 return currentResult;105 }106 107 //most work remaining108 private Task MWRRule(ItemList<Task> tasks) {109 Task currentResult = RandomRule(tasks);110 double currentLargestRemainingProcessingTime = 0;111 foreach (Task t in tasks) {112 double remainingProcessingTime = 0;113 foreach (Task jt in jobs[t.JobNr.Value].Tasks) {114 if (!jt.IsScheduled.Value)115 remainingProcessingTime += jt.Duration.Value;116 }117 if (remainingProcessingTime > currentLargestRemainingProcessingTime) {118 currentLargestRemainingProcessingTime = remainingProcessingTime;119 currentResult = t;120 }121 }122 return currentResult;123 }124 125 //least work remaining126 private Task LWRRule(ItemList<Task> tasks) {127 Task currentResult = RandomRule(tasks);128 double currentSmallestRemainingProcessingTime = double.MaxValue;129 foreach (Task t in tasks) {130 double remainingProcessingTime = 0;131 foreach (Task jt in jobs[t.JobNr.Value].Tasks) {132 if (!jt.IsScheduled.Value)133 remainingProcessingTime += jt.Duration.Value;134 }135 if (remainingProcessingTime < currentSmallestRemainingProcessingTime) {136 currentSmallestRemainingProcessingTime = remainingProcessingTime;137 currentResult = t;138 }139 }140 return currentResult;141 }142 143 //most operations remaining144 private Task MORRule(ItemList<Task> tasks) {145 Task currentResult = RandomRule(tasks);146 int currentLargestNrOfRemainingTasks = 0;147 foreach (Task t in tasks) {148 int nrOfRemainingTasks = 0;149 foreach (Task jt in jobs[t.JobNr.Value].Tasks) {150 if (!jt.IsScheduled.Value)151 nrOfRemainingTasks++;152 }153 if (currentLargestNrOfRemainingTasks < nrOfRemainingTasks) {154 currentLargestNrOfRemainingTasks = nrOfRemainingTasks;155 currentResult = t;156 }157 }158 return currentResult;159 }160 161 //least operationsremaining162 private Task LORRule(ItemList<Task> tasks) {163 Task currentResult = RandomRule(tasks);164 int currentSmallestNrOfRemainingTasks = int.MaxValue;165 foreach (Task t in tasks) {166 int nrOfRemainingTasks = 0;167 foreach (Task jt in jobs[t.JobNr.Value].Tasks) {168 if (!jt.IsScheduled.Value)169 nrOfRemainingTasks++;170 }171 if (currentSmallestNrOfRemainingTasks > nrOfRemainingTasks) {172 currentSmallestNrOfRemainingTasks = nrOfRemainingTasks;173 currentResult = t;174 }175 }176 return currentResult;177 }178 179 //first operation in Queue180 private Task FIFORule(ItemList<Task> tasks) {181 Task currentResult = tasks[0];182 return currentResult;183 }184 185 //random186 private Task RandomRule(ItemList<Task> tasks) {187 Task currentResult = tasks[RandomParameter.ActualValue.Next(tasks.Count)];188 return currentResult;189 }190 191 #endregion192 185 193 186 public PRVDecoder() 194 187 : base() { 195 188 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 196 Parameters.Add(new LookupParameter<ItemList<Job>>("JobData", "Job data taken from the JSSP - Instance.")); 197 } 198 199 189 Parameters.Add(new LookupParameter<ItemList<Job>>("JobData", "Job data taken from the SchedulingProblem - Instance.")); 190 ScheduleEncodingParameter.ActualName = "PriorityRulesVector"; 191 } 200 192 201 193 private Task SelectTaskFromConflictSet(ItemList<Task> conflictSet, int ruleIndex, int nrOfRules) { … … 221 213 public override Schedule CreateScheduleFromEncoding(PRVEncoding solution) { 222 214 jobs = (ItemList<Job>)JobDataParameter.ActualValue.Clone(); 223 resultingSchedule = new Schedule( new IntValue(jobs[0].Tasks.Count));215 resultingSchedule = new Schedule(jobs[0].Tasks.Count); 224 216 225 217 //Reset scheduled tasks in result … … 247 239 //STEP 4 - Adding the selected operation to the current schedule 248 240 selectedTask.IsScheduled.Value = true; 249 double startTime = GTAlgorithmUtils.ComputeEarliestStartTime 241 double startTime = GTAlgorithmUtils.ComputeEarliestStartTime(selectedTask, resultingSchedule); 250 242 resultingSchedule.ScheduleTask(selectedTask.ResourceNr.Value, startTime, selectedTask.Duration.Value, selectedTask.JobNr.Value); 251 243 … … 259 251 public override IOperation Apply() { 260 252 return base.Apply(); 261 } 253 } 262 254 } 263 255 } -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Decoders/PWRDecoder.cs ¶
r6293 r6406 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 22 using HeuristicLab.Common; 26 23 using HeuristicLab.Core; 27 using HeuristicLab. Persistence.Default.CompositeSerializers.Storable;28 using HeuristicLab. Common;24 using HeuristicLab.Encodings.ScheduleEncoding; 25 using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition; 29 26 using HeuristicLab.Optimization; 30 27 using HeuristicLab.Parameters; 31 using HeuristicLab.Data; 32 using HeuristicLab.Encodings.SchedulingEncoding; 33 using HeuristicLab.Encodings.SchedulingEncoding.PermutationWithRepetition; 34 using HeuristicLab.Problems.Scheduling.Interfaces; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 35 29 36 namespace HeuristicLab.Problems.Scheduling .Decoders{30 namespace HeuristicLab.Problems.Scheduling { 37 31 [Item("PWRDecoder", "An item used to convert a PWR-individual into a generalized schedule.")] 38 32 [StorableClass] 39 public class PWRDecoder : SchedulingDecoder<PWREncoding>, IStochasticOperator, IJSSPOperator { 33 public class PWRDecoder : ScheduleDecoder<PWREncoding>, IStochasticOperator, IJSSPOperator { 34 public ILookupParameter<IRandom> RandomParameter { 35 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 36 } 37 public ILookupParameter<ItemList<Job>> JobDataParameter { 38 get { return (LookupParameter<ItemList<Job>>)Parameters["JobData"]; } 39 } 40 40 41 [StorableConstructor] 41 42 protected PWRDecoder(bool deserializing) : base(deserializing) { } … … 47 48 } 48 49 49 public ILookupParameter<IRandom> RandomParameter {50 get { return (LookupParameter<IRandom>)Parameters["Random"]; }51 }52 public ILookupParameter<ItemList<Job>> JobDataParameter {53 get { return (LookupParameter<ItemList<Job>>)Parameters["JobData"]; }54 }55 56 50 public PWRDecoder() 57 51 : base() { 58 52 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 59 53 Parameters.Add(new LookupParameter<ItemList<Job>>("JobData", "Job data taken from the JSSP - Instance.")); 54 ScheduleEncodingParameter.ActualName = "PermutationWithRepetition"; 60 55 } 61 56 62 57 public override Schedule CreateScheduleFromEncoding(PWREncoding solution) { 63 58 ItemList<Job> jobs = (ItemList<Job>)JobDataParameter.ActualValue.Clone(); 64 Schedule resultingSchedule = new Schedule( new IntValue(jobs[0].Tasks.Count));59 Schedule resultingSchedule = new Schedule(jobs[0].Tasks.Count); 65 60 foreach (int jobNr in solution.PermutationWithRepetition) { 66 61 int i = 0; 67 62 while (jobs[jobNr].Tasks[i].IsScheduled.Value) i++; 68 63 Task currentTask = jobs[jobNr].Tasks[i]; 69 double startTime = GTAlgorithmUtils.ComputeEarliestStartTime 64 double startTime = GTAlgorithmUtils.ComputeEarliestStartTime(currentTask, resultingSchedule); 70 65 currentTask.IsScheduled.Value = true; 71 resultingSchedule.ScheduleTask(currentTask.ResourceNr.Value, startTime, currentTask.Duration.Value, currentTask.JobNr.Value);66 resultingSchedule.ScheduleTask(currentTask.ResourceNr.Value, startTime, currentTask.Duration.Value, currentTask.JobNr.Value); 72 67 } 73 68 return resultingSchedule; … … 76 71 public override IOperation Apply() { 77 72 return base.Apply(); 78 } 73 } 79 74 } 80 75 } -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/MakespanEvaluator.cs ¶
r6293 r6406 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 22 using HeuristicLab.Common; 26 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Encodings.ScheduleEncoding; 27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common;29 using HeuristicLab.Data;30 using HeuristicLab.Optimization;31 using HeuristicLab.Parameters;32 using HeuristicLab.Encodings.SchedulingEncoding;33 27 34 namespace HeuristicLab.Problems.Scheduling .Evaluators{28 namespace HeuristicLab.Problems.Scheduling { 35 29 [Item("Makespan Evaluator", "Represents an evaluator using the maximum makespan of a schedule.")] 36 30 [StorableClass] … … 45 39 } 46 40 47 public MakespanEvaluator () : base() { }41 public MakespanEvaluator() : base() { } 48 42 49 43 protected override DoubleValue evaluate(Schedule schedule) { 50 DoubleValue quality = new DoubleValue 44 DoubleValue quality = new DoubleValue(0); 51 45 foreach (Resource r in schedule.Resources) { 52 46 if (r.TotalDuration.Value > quality.Value) { -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/MeanTardinessEvaluator.cs ¶
r6364 r6406 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 22 using HeuristicLab.Common; 26 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Encodings.ScheduleEncoding; 26 using HeuristicLab.Parameters; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common;29 using HeuristicLab.Data;30 using HeuristicLab.Optimization;31 using HeuristicLab.Parameters;32 using HeuristicLab.Encodings.SchedulingEncoding;33 using HeuristicLab.Problems.Scheduling.Interfaces;34 28 35 namespace HeuristicLab.Problems.Scheduling .Evaluators{29 namespace HeuristicLab.Problems.Scheduling { 36 30 [Item("Mean tardiness Evaluator", "Represents an evaluator using the mean tardiness of a schedule.")] 37 31 [StorableClass] … … 57 51 #endregion 58 52 59 public MeanTardinessEvaluator() : base() { 53 public MeanTardinessEvaluator() 54 : base() { 60 55 Parameters.Add(new LookupParameter<ItemList<Job>>("JobData", "Jobdata defining the precedence relationships and the duration of the tasks in this JSSP-Instance.")); 61 56 } -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/SchedulingEvaluationAlgorithm.cs ¶
r6364 r6406 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;22 using HeuristicLab.Common; 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Encodings.ScheduleEncoding; 26 26 using HeuristicLab.Operators; 27 using HeuristicLab.Parameters; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Core;29 using HeuristicLab.Common;30 using HeuristicLab.Optimization;31 using HeuristicLab.Data;32 using HeuristicLab.Parameters;33 using HeuristicLab.Encodings.SchedulingEncoding.Interfaces;34 using HeuristicLab.Encodings.SchedulingEncoding;35 29 36 namespace HeuristicLab.Problems.Scheduling .Evaluators{30 namespace HeuristicLab.Problems.Scheduling { 37 31 [Item("Scheduling Evaluation Algorithm", "Represents a composition of a decoder and an evaluator for scheduling problems.")] 38 32 [StorableClass] 39 public class SchedulingEvaluationAlgorithm : AlgorithmOperator, ISchedul ingEvaluationAlgorithm {33 public class SchedulingEvaluationAlgorithm : AlgorithmOperator, IScheduleEvaluationAlgorithm { 40 34 [StorableConstructor] 41 35 protected SchedulingEvaluationAlgorithm(bool deserializing) : base(deserializing) { } 42 36 protected SchedulingEvaluationAlgorithm(SchedulingEvaluationAlgorithm original, Cloner cloner) 43 37 : base(original, cloner) { 44 38 this.evaluator = cloner.Clone(original.evaluator); 45 39 } 46 40 public override IDeepCloneable Clone(Cloner cloner) { … … 60 54 } 61 55 62 public void InitializeOperatorGraph<T>(Schedul ingDecoder<T> decoder) where T: Item, ISchedulingEncoding{56 public void InitializeOperatorGraph<T>(ScheduleDecoder<T> decoder) where T : Item, IScheduleEncoding { 63 57 OperatorGraph.Operators.Clear(); 64 58 OperatorGraph.InitialOperator = decoder; … … 68 62 public SchedulingEvaluationAlgorithm() 69 63 : base() { 70 71 72 64 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value aka fitness value of the solution.")); 65 evaluator = new Placeholder(); 66 evaluator.OperatorParameter.ActualName = "SolutionEvaluator"; 73 67 } 74 68 -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/SchedulingEvaluator.cs ¶
r6364 r6406 20 20 #endregion 21 21 22 using HeuristicLab.Common; 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Encodings.ScheduleEncoding; 26 using HeuristicLab.Operators; 27 using HeuristicLab.Parameters; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 22 29 23 30 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Optimization; 27 using HeuristicLab.Data; 28 using HeuristicLab.Common; 29 using HeuristicLab.Parameters; 30 using System; 31 using HeuristicLab.Operators; 32 using HeuristicLab.Encodings.SchedulingEncoding.Interfaces; 33 using HeuristicLab.Encodings.SchedulingEncoding; 34 35 36 namespace HeuristicLab.Problems.Scheduling.Evaluators { 31 namespace HeuristicLab.Problems.Scheduling { 37 32 [Item("Scheduling Evaluator", "Represents a evaluator class for standard scheduling problems.")] 38 33 [StorableClass] 39 public abstract class SchedulingEvaluator : SingleSuccessorOperator, ISchedul ingEvaluator {34 public abstract class SchedulingEvaluator : SingleSuccessorOperator, IScheduleEvaluator { 40 35 [StorableConstructor] 41 36 protected SchedulingEvaluator(bool deserializing) : base(deserializing) { } … … 48 43 } 49 44 public ILookupParameter<DoubleValue> QualityParameter { 50 get { 45 get { 51 46 if (Parameters.ContainsKey("Quality")) 52 47 return (ILookupParameter<DoubleValue>)Parameters["Quality"]; … … 55 50 } 56 51 } 57 public ILookupParameter<Schedule> DecodedSchedulingSolutionParameter {58 get { return (ILookupParameter<Schedule>)Parameters[" DecodedSchedulingSolution"]; }52 public ILookupParameter<Schedule> ScheduleParameter { 53 get { return (ILookupParameter<Schedule>)Parameters["Schedule"]; } 59 54 } 60 55 61 public SchedulingEvaluator () : base () { 56 public SchedulingEvaluator() 57 : base() { 62 58 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value aka fitness value of the solution.")); 63 Parameters.Add(new LookupParameter<Schedule>(" DecodedSchedulingSolution", "The decoded scheduling solution represented as generalized schedule."));59 Parameters.Add(new LookupParameter<Schedule>("Schedule", "The decoded scheduling solution represented as generalized schedule.")); 64 60 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator.")); 65 61 } 66 62 67 63 protected abstract DoubleValue evaluate(Schedule schedule); 68 64 69 65 public override IOperation Apply() { 70 Schedule decodedSchedulingSolution = DecodedSchedulingSolutionParameter.ActualValue;71 QualityParameter.ActualValue = evaluate( decodedSchedulingSolution);66 Schedule schedule = ScheduleParameter.ActualValue; 67 QualityParameter.ActualValue = evaluate(schedule); 72 68 return base.Apply(); 73 69 } -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/HeuristicLab.Problems.Scheduling-3.3.csproj ¶
r6364 r6406 59 59 <Compile Include="Evaluators\MakespanEvaluator.cs" /> 60 60 <Compile Include="Evaluators\SchedulingEvaluator.cs" /> 61 <Compile Include="IndexedTaskList.cs" />62 61 <Compile Include="Interfaces\IJSSPOperator.cs" /> 63 62 <Compile Include="Job.cs" /> … … 103 102 <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name> 104 103 </ProjectReference> 105 <ProjectReference Include="..\..\HeuristicLab.Encodings.Schedul ingEncoding\3.3\HeuristicLab.Encodings.SchedulingEncoding-3.3.csproj">104 <ProjectReference Include="..\..\HeuristicLab.Encodings.ScheduleEncoding\3.3\HeuristicLab.Encodings.ScheduleEncoding-3.3.csproj"> 106 105 <Project>{17F3EF80-B2C3-4B8D-A4D5-BE9CE3BA2606}</Project> 107 <Name>HeuristicLab.Encodings.Schedul ingEncoding-3.3</Name>106 <Name>HeuristicLab.Encodings.ScheduleEncoding-3.3</Name> 108 107 </ProjectReference> 109 108 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj"> -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPOperator.cs ¶
r6364 r6406 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using HeuristicLab.Core; 6 using HeuristicLab.Parameters; 1 using HeuristicLab.Core; 7 2 8 namespace HeuristicLab.Problems.Scheduling .Interfaces{3 namespace HeuristicLab.Problems.Scheduling { 9 4 public interface IJSSPOperator : IOperator { 10 ILookupParameter<ItemList<Job>> JobDataParameter {get;}5 ILookupParameter<ItemList<Job>> JobDataParameter { get; } 11 6 } 12 7 } -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Job.cs ¶
r6364 r6406 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 22 using System.Text; 23 using HeuristicLab.Common; 26 24 using HeuristicLab.Core; 27 using HeuristicLab. Common;25 using HeuristicLab.Data; 28 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Data;30 using HeuristicLab.Parameters;31 27 32 28 namespace HeuristicLab.Problems.Scheduling { … … 34 30 [StorableClass] 35 31 public class Job : Item { 32 [Storable] 33 public DoubleValue DueDate { get; set; } 34 [Storable] 35 public IntValue Index { get; set; } 36 [Storable] 37 public ItemList<Task> Tasks { get; set; } 38 36 39 [StorableConstructor] 37 40 protected Job(bool deserializing) : base(deserializing) { } 38 41 protected Job(Job original, Cloner cloner) 39 42 : base(original, cloner) { 40 41 42 43 this.DueDate = cloner.Clone(original.DueDate); 44 this.Index = cloner.Clone(original.Index); 45 this.Tasks = cloner.Clone(original.Tasks); 43 46 } 44 47 public override IDeepCloneable Clone(Cloner cloner) { 45 48 return new Job(this, cloner); 46 49 } 47 48 public DoubleValue DueDate { get; set; } 49 50 public IntValue Index { 51 get; 52 set; 53 } 54 public ItemList<Task> Tasks { 55 get; 56 set; 57 } 58 59 60 public Job(IntValue index, DoubleValue dueDate) : base () { 50 public Job(IntValue index, DoubleValue dueDate) 51 : base() { 61 52 Index = index; 62 53 Tasks = new ItemList<Task>(); … … 72 63 sb.Append("Job#" + Index + " [ "); 73 64 foreach (Task t in Tasks) { 74 sb.Append(t.ToString 65 sb.Append(t.ToString() + " "); 75 66 } 76 67 if (DueDate != null) -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JobShopSchedulingProblem.cs ¶
r6364 r6406 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 24 using System.IO; 25 using HeuristicLab.Common; 26 using HeuristicLab.Core; 27 using HeuristicLab.Data; 28 using HeuristicLab.Encodings.PermutationEncoding; 29 using HeuristicLab.Encodings.ScheduleEncoding; 30 using HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix; 31 using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition; 32 using HeuristicLab.Encodings.ScheduleEncoding.PriorityRulesVector; 33 using HeuristicLab.Parameters; 26 34 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Core;28 using HeuristicLab.Optimization;29 using HeuristicLab.Common;30 using System.Drawing;31 using HeuristicLab.Data;32 using System.IO;33 using HeuristicLab.Problems.Scheduling.Evaluators;34 using HeuristicLab.Parameters;35 using HeuristicLab.Problems.Scheduling.Analyzers;36 35 using HeuristicLab.PluginInfrastructure; 37 using HeuristicLab.Encodings.SchedulingEncoding;38 using HeuristicLab.Encodings.SchedulingEncoding.Interfaces;39 using HeuristicLab.Encodings.SchedulingEncoding.JobSequenceMatrix;40 using HeuristicLab.Encodings.PermutationEncoding;41 using HeuristicLab.Encodings.SchedulingEncoding.PriorityRulesVector;42 using HeuristicLab.Encodings.SchedulingEncoding.PermutationWithRepetition;43 using HeuristicLab.Problems.Scheduling.Decoders;44 36 45 37 namespace HeuristicLab.Problems.Scheduling { … … 48 40 [StorableClass] 49 41 public sealed class JobShopSchedulingProblem : SchedulingProblem { 42 #region Parameter Properties 43 public ValueParameter<ItemList<Job>> JobDataParameter { 44 get { return (ValueParameter<ItemList<Job>>)Parameters["JobData"]; } 45 } 46 public OptionalValueParameter<Schedule> BestKnownSolutionParameter { 47 get { return (OptionalValueParameter<Schedule>)Parameters["BestKnownSolution"]; } 48 } 49 50 public ValueParameter<IntValue> JobsParameter { 51 get { return (ValueParameter<IntValue>)Parameters["Jobs"]; } 52 } 53 public ValueParameter<IntValue> ResourcesParameter { 54 get { return (ValueParameter<IntValue>)Parameters["Resources"]; } 55 } 56 public ValueParameter<SchedulingEvaluator> SolutionEvaluatorParameter { 57 get { return (ValueParameter<SchedulingEvaluator>)Parameters["SolutionEvaluator"]; } 58 } 59 public ValueParameter<BoolValue> DueDatesParameter { 60 get { return (ValueParameter<BoolValue>)Parameters["DueDates"]; } 61 } 62 #endregion 63 64 #region Properties 65 public ItemList<Job> JobData { 66 get { return JobDataParameter.Value; } 67 set { JobDataParameter.Value = value; } 68 } 69 public Schedule BestKnownSolution { 70 get { return BestKnownSolutionParameter.Value; } 71 set { BestKnownSolutionParameter.Value = value; } 72 } 73 public IntValue Jobs { 74 get { return JobsParameter.Value; } 75 set { JobsParameter.Value = value; } 76 } 77 public IntValue Resources { 78 get { return ResourcesParameter.Value; } 79 set { ResourcesParameter.Value = value; } 80 } 81 public SchedulingEvaluator SolutionEvaluator { 82 get { return SolutionEvaluatorParameter.Value; } 83 set { SolutionEvaluatorParameter.Value = value; } 84 } 85 public BoolValue DueDates { 86 get { return DueDatesParameter.Value; } 87 set { DueDatesParameter.Value = value; } 88 } 89 #endregion 90 91 public JobShopSchedulingProblem() 92 : base(new SchedulingEvaluationAlgorithm(), new JSMRandomCreator()) { 93 Parameters.Add(new ValueParameter<ItemList<Job>>("JobData", "Jobdata defining the precedence relationships and the duration of the tasks in this JSSP-Instance.", new ItemList<Job>())); 94 Parameters.Add(new OptionalValueParameter<Schedule>("BestKnownSolution", "The best known solution of this JSSP instance.")); 95 96 Parameters.Add(new ValueParameter<IntValue>("Jobs", "The number of jobs used in this JSSP instance.", new IntValue())); 97 Parameters.Add(new ValueParameter<IntValue>("Resources", "The number of resources used this JSSP instance.", new IntValue())); 98 Parameters.Add(new ValueParameter<BoolValue>("DueDates", "Determines whether the problem instance uses due dates or not.", new BoolValue())); 99 Parameters.Add(new ValueParameter<SchedulingEvaluator>("SolutionEvaluator", "The evaluator used to determine the quality of a solution.", new MakespanEvaluator())); 100 101 InitializeOperators(); 102 InitializeProblemInstance(); 103 } 104 50 105 [StorableConstructor] 51 106 private JobShopSchedulingProblem(bool deserializing) : base(deserializing) { } 52 107 private JobShopSchedulingProblem(JobShopSchedulingProblem original, Cloner cloner) 53 108 : base(original, cloner) { 54 this.Jobs = cloner.Clone(original.Jobs);55 this.Resources = cloner.Clone(original.Resources);56 this.JobData = cloner.Clone(original.JobData);57 this.SolutionEvaluator = cloner.Clone(original.SolutionEvaluator);58 this.DueDates = cloner.Clone(original.DueDates);59 109 } 60 110 public override IDeepCloneable Clone(Cloner cloner) { 61 111 return new JobShopSchedulingProblem(this, cloner); 62 }63 64 65 #region Parameter Properties66 public ValueParameter<ItemList<Job>> JobDataParameter {67 get { return (ValueParameter<ItemList<Job>>)Parameters["JobData"]; }68 }69 public OptionalValueParameter<Schedule> BestKnownSolutionParameter {70 get { return (OptionalValueParameter<Schedule>)Parameters["BestKnownSolution"]; }71 }72 73 public ValueParameter<IntValue> JobsParameter {74 get { return (ValueParameter<IntValue>)Parameters["Jobs"]; }75 }76 public ValueParameter<IntValue> ResourcesParameter {77 get { return (ValueParameter<IntValue>)Parameters["Resources"]; }78 }79 public ValueParameter<SchedulingEvaluator> SolutionEvaluatorParameter {80 get { return (ValueParameter<SchedulingEvaluator>)Parameters["SolutionEvaluator"]; }81 }82 public ValueParameter<BoolValue> DueDatesParameter {83 get { return (ValueParameter<BoolValue>)Parameters["DueDates"]; }84 }85 #endregion86 87 #region Properties88 public ItemList<Job> JobData {89 get { return JobDataParameter.Value; }90 set { JobDataParameter.Value = value; }91 }92 public Schedule BestKnownSolution {93 get { return BestKnownSolutionParameter.Value; }94 set { BestKnownSolutionParameter.Value = value; }95 }96 public IntValue Jobs {97 get { return JobsParameter.Value; }98 set { JobsParameter.Value = value; }99 }100 public IntValue Resources {101 get { return ResourcesParameter.Value; }102 set { ResourcesParameter.Value = value; }103 }104 public SchedulingEvaluator SolutionEvaluator {105 get { return SolutionEvaluatorParameter.Value; }106 set { SolutionEvaluatorParameter.Value = value; }107 }108 public BoolValue DueDates {109 get { return DueDatesParameter.Value; }110 set { DueDatesParameter.Value = value; }111 }112 #endregion113 114 115 public JobShopSchedulingProblem()116 : base(new SchedulingEvaluationAlgorithm (), new JSMRandomCreator ()) {117 Parameters.Add(new ValueParameter<ItemList<Job>>("JobData", "Jobdata defining the precedence relationships and the duration of the tasks in this JSSP-Instance.", new ItemList<Job>()));118 Parameters.Add(new OptionalValueParameter<Schedule>("BestKnownSolution", "The best known solution of this JSSP instance."));119 120 Parameters.Add(new ValueParameter<IntValue>("Jobs", "The number of jobs used in this JSSP instance.", new IntValue()));121 Parameters.Add(new ValueParameter<IntValue>("Resources", "The number of resources used this JSSP instance.", new IntValue()));122 Parameters.Add(new ValueParameter<BoolValue>("DueDates", "Determines whether the problem instance uses due dates or not.", new BoolValue()));123 Parameters.Add(new ValueParameter<SchedulingEvaluator>("SolutionEvaluator", "The evaluator used to determine the quality of a solution.", new MakespanEvaluator()));124 125 InitializeOperators();126 InitializeProblemInstance();127 112 } 128 113 … … 131 116 InitializeOperators(); 132 117 } 118 119 protected override void OnEvaluatorChanged() { 120 base.OnEvaluatorChanged(); 121 } 133 122 #endregion 134 123 135 124 #region Helpers 136 private void InitializeProblemInstance 137 Jobs = new IntValue (10);138 Resources = new IntValue (10);139 BestKnownQuality = new DoubleValue 125 private void InitializeProblemInstance() { 126 Jobs = new IntValue(10); 127 Resources = new IntValue(10); 128 BestKnownQuality = new DoubleValue(930); 140 129 JobData = new ItemList<Job>(); 141 130 List<string> data = new List<string> … … 167 156 if (SolutionCreator.GetType().Equals(typeof(JSMRandomCreator))) { 168 157 Operators.AddRange(ApplicationManager.Manager.GetInstances<IJSMOperator>()); 169 ((SchedulingEvaluationAlgorithm)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<JSMEncoding>(new JSMDecoder()); 158 JSMDecoder decoder = new JSMDecoder(); 159 ((SchedulingEvaluationAlgorithm)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<JSMEncoding>(decoder); 170 160 } else { 171 161 if (SolutionCreator.GetType().Equals(typeof(PRVRandomCreator))) { 172 162 Operators.AddRange(ApplicationManager.Manager.GetInstances<IPRVOperator>()); 173 ((SchedulingEvaluationAlgorithm)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<PRVEncoding>(new PRVDecoder()); 163 PRVDecoder decoder = new PRVDecoder(); 164 ((SchedulingEvaluationAlgorithm)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<PRVEncoding>(decoder); 174 165 } else { 175 166 if (SolutionCreator.GetType().Equals(typeof(PWRRandomCreator))) { 176 167 Operators.AddRange(ApplicationManager.Manager.GetInstances<IPWROperator>()); 177 ((SchedulingEvaluationAlgorithm)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<PWREncoding>(new PWRDecoder()); 168 PWRDecoder decoder = new PWRDecoder(); 169 ((SchedulingEvaluationAlgorithm)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<PWREncoding>(decoder); 178 170 } 179 171 } … … 197 189 } 198 190 private int[] GetIntArray(List<string> data) { 199 int[] arr = new int 200 for (int i = 0; i < data.Count; i++ 191 int[] arr = new int[data.Count]; 192 for (int i = 0; i < data.Count; i++) { 201 193 arr[i] = Int32.Parse(data[i]); 202 194 } 203 195 return arr; 204 196 } 205 private Job CreateJobFromData (List<string> data, int jobCount){197 private Job CreateJobFromData(List<string> data, int jobCount) { 206 198 DoubleValue dueDate = null; 207 199 int dataCount = data.Count; … … 233 225 if (data.Count > 0 && ((int)data[0][0] >= 48 && (int)data[0][0] <= 57)) { 234 226 int jobCount = 0; 235 Jobs = new IntValue 236 Resources = new IntValue 227 Jobs = new IntValue(Int32.Parse(data[0])); 228 Resources = new IntValue(Int32.Parse(data[1])); 237 229 //data[2] = bestKnownQuality (double) 238 230 //data[3] = dueDates (0|1) 239 231 DueDates.Value = false; 240 232 if (data.Count > 2) 241 BestKnownQualityParameter.ActualValue = new DoubleValue(Double.Parse 233 BestKnownQualityParameter.ActualValue = new DoubleValue(Double.Parse(data[2])); 242 234 if (data.Count > 3 && data[3] == "1") 243 235 DueDates.Value = true; … … 265 257 JSMEncoding solution = new JSMEncoding(); 266 258 while (!solutionFile.EndOfStream && !solutionFound) { 267 259 268 260 string line = solutionFile.ReadLine(); 269 261 List<string> data = SplitString(line); … … 274 266 data = SplitString(line); 275 267 while (data != null && data.Count > 0 && ((int)data[0][0] >= 48 && (int)data[0][0] <= 57)) { 276 Permutation p = new Permutation(PermutationTypes.Absolute, GetIntArray 268 Permutation p = new Permutation(PermutationTypes.Absolute, GetIntArray(data)); 277 269 solution.JobSequenceMatrix.Add(p); 278 270 -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Plugin.cs ¶
r6364 r6406 23 23 24 24 namespace HeuristicLab.Problems.Scheduling { 25 [Plugin("HeuristicLab.Problems.Scheduling", "3.3.3.6 293")]25 [Plugin("HeuristicLab.Problems.Scheduling", "3.3.3.6364")] 26 26 [PluginFile("HeuristicLab.Problems.Scheduling-3.3.dll", PluginFileType.Assembly)] 27 27 public class HeuristicLabProblemsSchedulingPlugin : PluginBase { -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/SchedulingProblem.cs ¶
r6364 r6406 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 22 using HeuristicLab.Common; 23 using HeuristicLab.Core; 24 using HeuristicLab.Encodings.ScheduleEncoding; 26 25 using HeuristicLab.Optimization; 27 using HeuristicLab.Core;28 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Common;30 using HeuristicLab.Encodings.SchedulingEncoding.Interfaces;31 27 32 28 namespace HeuristicLab.Problems.Scheduling { 33 [Item("Scheduling 29 [Item("SchedulingProblem", "Abstract class that represents a Scheduling Problem")] 34 30 [StorableClass] 35 public abstract class SchedulingProblem : SingleObjectiveHeuristicOptimizationProblem<ISchedul ingEvaluationAlgorithm, ISchedulingCreator> {31 public abstract class SchedulingProblem : SingleObjectiveHeuristicOptimizationProblem<IScheduleEvaluationAlgorithm, IScheduleCreator> { 36 32 [StorableConstructor] 37 33 protected SchedulingProblem(bool deserializing) : base(deserializing) { } … … 40 36 } 41 37 42 protected SchedulingProblem (ISchedulingEvaluationAlgorithm se, ISchedulingCreator sc) : base (se, sc) {}38 protected SchedulingProblem(IScheduleEvaluationAlgorithm se, IScheduleCreator sc) : base(se, sc) { } 43 39 44 40 } -
TabularUnified branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Task.cs ¶
r6293 r6406 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 22 using System.Text; 23 using HeuristicLab.Common; 24 using HeuristicLab.Core; 26 25 using HeuristicLab.Data; 27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Core;29 using HeuristicLab.Common;30 27 31 28 namespace HeuristicLab.Problems.Scheduling { … … 33 30 [StorableClass] 34 31 public class Task : Item { 32 [Storable] 33 public IntValue TaskNr { get; set; } 34 [Storable] 35 public IntValue ResourceNr { get; set; } 36 [Storable] 37 public IntValue JobNr { get; set; } 38 [Storable] 39 public DoubleValue Duration { get; set; } 40 [Storable] 41 public BoolValue IsScheduled { get; set; } 42 35 43 [StorableConstructor] 36 44 protected Task(bool deserializing) : base(deserializing) { } … … 48 56 49 57 50 public IntValue TaskNr { get; set; } 51 public IntValue ResourceNr { get; set; } 52 public IntValue JobNr { get; set; } 53 public DoubleValue Duration { get; set; } 54 public BoolValue IsScheduled { get; set; } 55 56 57 public Task (int taskNr, int resNr, int jobNr, double duration) : base () { 58 Duration = new DoubleValue (duration); 59 ResourceNr = new IntValue (resNr); 60 JobNr = new IntValue (jobNr); 61 TaskNr = new IntValue (taskNr); 58 public Task(int taskNr, int resNr, int jobNr, double duration) 59 : base() { 60 Duration = new DoubleValue(duration); 61 ResourceNr = new IntValue(resNr); 62 JobNr = new IntValue(jobNr); 63 TaskNr = new IntValue(taskNr); 62 64 IsScheduled = new BoolValue(false); 63 65 } -
branches/Scheduling/HeuristicLab.Problems.TravelingSalesman.Views/3.3 ¶
- Property svn:ignore
-
TabularUnified
old new 4 4 HeuristicLabProblemsTravelingSalesmanViewsPlugin.cs 5 5 *.vs10x 6 PathTSPTourView.resx
-
- Property svn:ignore
-
TabularUnified branches/Scheduling/HeuristicLab/3.3/Files.txt ¶
r6364 r6406 33 33 HeuristicLab.Encodings.PermutationEncoding\3.3:HeuristicLab.Encodings.PermutationEncoding-3.3.dll 34 34 HeuristicLab.Encodings.PermutationEncoding.Views\3.3:HeuristicLab.Encodings.PermutationEncoding.Views-3.3.dll 35 HeuristicLab.Encodings.Schedul ingEncoding\3.3:HeuristicLab.Encodings.SchedulingEncoding-3.3.dll36 HeuristicLab.Encodings.Schedul ingEncoding.Views\3.3:HeuristicLab.Encodings.SchedulingEncoding.Views-3.3.dll35 HeuristicLab.Encodings.ScheduleEncoding\3.3:HeuristicLab.Encodings.ScheduleEncoding-3.3.dll 36 HeuristicLab.Encodings.ScheduleEncoding.Views\3.3:HeuristicLab.Encodings.ScheduleEncoding.Views-3.3.dll 37 37 HeuristicLab.Encodings.RealVectorEncoding\3.3:HeuristicLab.Encodings.RealVectorEncoding-3.3.dll 38 38 HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.3:HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.dll -
TabularUnified branches/Scheduling/HeuristicLab/3.3/Tests/HeuristicLab-3.3.Tests.csproj ¶
r6364 r6406 252 252 <Name>HeuristicLab.Encodings.RealVectorEncoding-3.3</Name> 253 253 </ProjectReference> 254 <ProjectReference Include="..\..\..\HeuristicLab.Encodings.SchedulingEncoding.Views\3.3\HeuristicLab.Encodings.SchedulingEncoding.Views-3.3.csproj">255 <Project>{0C378762-D5DB-488A-8931-2BA42B1B7CBF}</Project>256 <Name>HeuristicLab.Encodings.SchedulingEncoding.Views-3.3</Name>257 </ProjectReference>258 <ProjectReference Include="..\..\..\HeuristicLab.Encodings.SchedulingEncoding\3.3\HeuristicLab.Encodings.SchedulingEncoding-3.3.csproj">259 <Project>{17F3EF80-B2C3-4B8D-A4D5-BE9CE3BA2606}</Project>260 <Name>HeuristicLab.Encodings.SchedulingEncoding-3.3</Name>261 </ProjectReference>262 254 <ProjectReference Include="..\..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views\3.3\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.3.csproj"> 263 255 <Project>{6F42C5F8-16CD-43EE-8208-FD4573A69D85}</Project>
Note: See TracChangeset
for help on using the changeset viewer.