Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/20/20 17:31:31 (4 years ago)
Author:
abeham
Message:

#2521: Worked on ResultParameter for Problem and Algorithms

  • Add ResultParameter to TSP, BinaryVectorProblem, and HillClimber
  • Refactor ResultParameter to allow presetting the ResultCollection instead of having to discover it (e.g. for use in BasicAlgorithms)
  • Unify Results property among EngineAlgorithm and BasicAlgorithm
    • There is now only a single instance which is storable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.cs

    r17226 r17517  
    2222using System;
    2323using System.Threading;
     24using HEAL.Attic;
    2425using HeuristicLab.Common;
    2526using HeuristicLab.Core;
    26 using HEAL.Attic;
    2727
    2828namespace HeuristicLab.Optimization {
     
    4242    [Storable]
    4343    private bool initialized;
    44     [Storable]
    45     private readonly ResultCollection results;
    46     public override ResultCollection Results {
    47       get { return results; }
    48     }
    4944
    5045    private CancellationTokenSource cancellationTokenSource;
     
    5853    protected BasicAlgorithm(BasicAlgorithm original, Cloner cloner)
    5954      : base(original, cloner) {
    60       results = cloner.Clone(original.Results);
    6155      initialized = original.initialized;
    6256    }
    6357    protected BasicAlgorithm()
    6458      : base() {
    65       results = new ResultCollection();
    6659    }
    6760
     
    6962      if (Problem == null) return;
    7063      base.Prepare();
    71       results.Clear();
    7264      initialized = false;
    7365      OnPrepared();
Note: See TracChangeset for help on using the changeset viewer.