Changeset 6475 for branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix
- Timestamp:
- 06/24/11 14:23:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/JSMRandomCreator.cs
r6406 r6475 64 64 65 65 66 p rotected override JSMEncoding CreateSolution() {66 public static JSMEncoding Apply(int jobs, int resources, IRandom random) { 67 67 JSMEncoding solution = new JSMEncoding(); 68 IntValue nrOfJobs = new IntValue(JobsParameter.ActualValue.Value);69 IntValue nrOfResources = new IntValue(ResourcesParameter.ActualValue.Value);70 68 71 for (int i = 0; i < nrOfResources.Value; i++) {72 solution.JobSequenceMatrix.Add(new Permutation(PermutationTypes.Absolute, nrOfJobs.Value, RandomParameter.ActualValue));69 for (int i = 0; i < resources; i++) { 70 solution.JobSequenceMatrix.Add(new Permutation(PermutationTypes.Absolute, jobs, random)); 73 71 } 74 72 75 73 return solution; 76 74 } 75 76 77 protected override JSMEncoding CreateSolution() { 78 return Apply(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value, RandomParameter.ActualValue); 79 } 77 80 } 78 81 }
Note: See TracChangeset
for help on using the changeset viewer.