Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/12/17 13:16:56 (7 years ago)
Author:
pkimmesw
Message:

#2665 fixed enable/disable issue for single instruction in selection view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Benchmark/ProblemTests.cs

    r14746 r14747  
    99  using HeuristicLab.Problems.Instances;
    1010  using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
    11   using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool;
    1211  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
    1312  using HeuristicLab.Problems.ProgramSynthesis.Push.Generators;
     
    147146      var instance = new BenchmarkSuiteInstanceProvider();
    148147      var data = instance.LoadData(descriptor);
    149       var provider = new ManagedPoolProvider<PushProgram>(1024);
    150       provider.InitDummyPartition(() => new PushProgram());
    151148
    152149      Parallel.For(0, iterations, i => {
    153150        var execCounter = 0;
    154 
    155         var pushProgramPool = provider.CreatePool();
    156         var program = CodeGenerator.RandomProgram(pushProgramPool, maxProgramSizeLimit, random);
    157 
    158151        var results = new double[data.OriginalTrainingCount];
     152        PushProgram program;
    159153
    160154        using (var interpreter = pool.GetInstance(random)) {
    161           interpreter.PushProgramPool = pushProgramPool;
     155          program = CodeGenerator.RandomProgram(interpreter.PushProgramPool, maxProgramSizeLimit, random);
    162156
    163157          for (var j = 0; j < data.OriginalTrainingCount; j++) {
     
    169163
    170164            interpreter.Run(program);
    171             pushProgramPool.Dispose();
    172165
    173166            var diff = GetDiff(example.OutputInt, interpreter.IntegerStack)
     
    179172            execCounter += interpreter.ExecCounter;
    180173            interpreter.Clear();
    181             pushProgramPool = provider.CreatePool();
    182174          }
    183175        }
Note: See TracChangeset for help on using the changeset viewer.