Changeset 13443 for branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding
- Timestamp:
- 12/08/15 14:31:05 (9 years ago)
- Location:
- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleCrossover.cs
r13437 r13443 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 27 namespace HeuristicLab.Encodings.ScheduleEncoding .ScheduleEncoding{27 namespace HeuristicLab.Encodings.ScheduleEncoding { 28 28 [Item("DirectScheduleCrossover", "An operator which crosses two schedule representations.")] 29 29 [StorableClass] -
branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleGTCrossover.cs
r13437 r13443 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 27 28 namespace HeuristicLab.Encodings.ScheduleEncoding .ScheduleEncoding{28 namespace HeuristicLab.Encodings.ScheduleEncoding { 29 29 [Item("DirectScheduleGTCrossover", "Represents a crossover using the GT-Algorithm to cross two direct schedule representations.")] 30 30 [StorableClass] -
branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/DirectScheduleEncoding.cs
r13437 r13443 27 27 using HeuristicLab.Common; 28 28 using HeuristicLab.Core; 29 using HeuristicLab.Encodings.ScheduleEncoding;30 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 30 using HeuristicLab.PluginInfrastructure; 32 31 33 namespace HeuristicLab.Encodings.Schedule {32 namespace HeuristicLab.Encodings.ScheduleEncoding { 34 33 [StorableClass] 35 public sealed class DirectScheduleEncoding : ScheduleEncoding {34 public sealed class DirectScheduleEncoding : ScheduleEncoding<Schedule> { 36 35 [StorableConstructor] 37 36 private DirectScheduleEncoding(bool deserializing) : base(deserializing) { } … … 44 43 : base() { 45 44 SolutionCreator = new DirectScheduleRandomCreator(); 45 Decoder = new DirectScheduleDecoder(); 46 46 DiscoverOperators(); 47 47 } 48 48 49 49 50 #region Operator Discovery -
branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/DirectScheduleRandomCreator.cs
r13437 r13443 20 20 #endregion 21 21 22 using System;23 22 using HeuristicLab.Common; 24 23 using HeuristicLab.Core; … … 55 54 56 55 57 public static Schedule Apply( int jobs, int resources,PWREncoding pwr, ItemList<Job> jobData) {56 public static Schedule Apply(PWREncoding pwr, ItemList<Job> jobData) { 58 57 var resultingSchedule = new Schedule(jobData[0].Tasks.Count); 59 58 foreach (int jobNr in pwr.PermutationWithRepetition) { … … 71 70 72 71 protected override ISchedule CreateSolution() { 73 try { 74 var jobData = (ItemList<Job>)JobDataParameter.ActualValue.Clone(); 75 return Apply(JobsParameter.ActualValue.Value, 76 ResourcesParameter.ActualValue.Value, 77 new PWREncoding(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value, RandomParameter.ActualValue), 78 jobData); 79 } 80 catch { 81 throw new Exception("ScheduleRandomCreator needs JobData parameter from a JSSP-Instance to create Schedule-Instances!"); 82 } 72 var jobData = (ItemList<Job>)JobDataParameter.ActualValue.Clone(); 73 var pwrEncoding = new PWREncoding(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value, 74 RandomParameter.ActualValue); 75 return Apply(pwrEncoding, jobData); 83 76 } 84 77 } -
branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Manipulators/DirectScheduleManipulator.cs
r13437 r13443 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 27 28 namespace HeuristicLab.Encodings.ScheduleEncoding .ScheduleEncoding{28 namespace HeuristicLab.Encodings.ScheduleEncoding { 29 29 [Item("DirectScheduleManipulator", "An operator which manipulates a direct schedule representation.")] 30 30 [StorableClass]
Note: See TracChangeset
for help on using the changeset viewer.