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/PriorityRulesVector/PRVRandomCreator.cs

    r6406 r6475  
    6464    }
    6565
     66    public static PRVEncoding Apply(int jobs, int resources, IRandom random, IntValue nrOfRules) {
     67      return new PRVEncoding(jobs * resources, random, 0, nrOfRules.Value, nrOfRules);
     68    }
    6669
    6770    protected override PRVEncoding CreateSolution() {
    68       IntValue nrOfJobs = new IntValue(JobsParameter.ActualValue.Value);
    69       IntValue nrOfResources = new IntValue(ResourcesParameter.ActualValue.Value);
    70       PRVEncoding solution = new PRVEncoding(nrOfJobs.Value * nrOfResources.Value, RandomParameter.ActualValue, 0, NrOfRules.Value, NrOfRules);
    71       return solution;
     71      return Apply(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value, RandomParameter.ActualValue, NrOfRules);
    7272    }
     73
     74
    7375  }
    7476}
Note: See TracChangeset for help on using the changeset viewer.