Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/09/17 00:36:20 (7 years ago)
Author:
abeham
Message:

#2701:

  • Added alternating bits binary test Problem
  • Refactored MemPR to work with programmable problem in current trunk
  • fixed a bug in permutation MemPR when crossover doesn't assign an offspring
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Permutation/LocalSearch/ExhaustiveHillClimbSubspace.cs

    r14450 r14552  
    3434  public class ExhaustiveHillClimbSubspace<TContext> : NamedItem, ILocalSearch<TContext>
    3535      where TContext : ISingleSolutionHeuristicAlgorithmContext<SingleObjectiveBasicProblem<PermutationEncoding>, Encodings.PermutationEncoding.Permutation>,
    36                        IPermutationSubspaceContext {
     36                       IPermutationSubspaceContext, IEvaluationServiceContext<Encodings.PermutationEncoding.Permutation> {
    3737
    3838    [StorableConstructor]
     
    4949
    5050    public void Optimize(TContext context) {
    51       var evalWrapper = new EvaluationWrapper<Encodings.PermutationEncoding.Permutation>(context.Problem, context.Solution);
    5251      var quality = context.Solution.Fitness;
    5352      try {
    5453        var result = Exhaustive.HillClimb(context.Random, context.Solution.Solution, ref quality,
    55           context.Problem.Maximization, evalWrapper.Evaluate, CancellationToken.None, context.Subspace.Subspace);
     54          context.Problem.Maximization, context.Evaluate, CancellationToken.None, context.Subspace.Subspace);
    5655        context.IncrementEvaluatedSolutions(result.Item1);
    5756        context.Iterations = result.Item2;
Note: See TracChangeset for help on using the changeset viewer.