Changeset 13443 for branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/DirectScheduleRandomCreator.cs
- Timestamp:
- 12/08/15 14:31:05 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.