Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/24/11 14:23:19 (14 years ago)
Author:
jhelm
Message:

#1329: Added DirectSchedule-Classes for optimization with the direct-schedule encoding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/JSMRandomCreator.cs

    r6406 r6475  
    6464
    6565
    66     protected override JSMEncoding CreateSolution() {
     66    public static JSMEncoding Apply(int jobs, int resources, IRandom random) {
    6767      JSMEncoding solution = new JSMEncoding();
    68       IntValue nrOfJobs = new IntValue(JobsParameter.ActualValue.Value);
    69       IntValue nrOfResources = new IntValue(ResourcesParameter.ActualValue.Value);
    7068
    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));
    7371      }
    7472
    7573      return solution;
    7674    }
     75
     76
     77    protected override JSMEncoding CreateSolution() {
     78      return Apply(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value, RandomParameter.ActualValue);
     79    }
    7780  }
    7881}
Note: See TracChangeset for help on using the changeset viewer.