Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/22/16 15:47:00 (7 years ago)
Author:
mkommend
Message:

#2524:

  • Renamed pausable to SupportsPause
  • Changed SupportsPause field to abstract property that has to be implemented
  • Stored initialization flag in BasicAlgorithm
  • Changed CancellationToken access to use the according property
  • Adapted HillClimber to new pausing mechanism
  • Disable pause for PPP, because it does not work correctly
  • Derived FixedDataAnalysisAlgorithm from BasicAlgorithm
  • Changed base class of all data analysis algorithm from BasicAlgorithm to FixedDataAnalysisAlgorithm
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs

    r14517 r14523  
    5454      get { return typeof(BinaryProblem); }
    5555    }
     56
     57    public override bool SupportsPause { get { return false; } }
     58
    5659    public new BinaryProblem Problem {
    5760      get { return (BinaryProblem)base.Problem; }
     
    9093    public HillClimber()
    9194      : base() {
    92       pausable = true;
    9395      random = new MersenneTwister();
    9496      Parameters.Add(new FixedValueParameter<IntValue>(IterationsParameterName, "", new IntValue(100)));
    9597    }
    9698
    97     [StorableHook(HookType.AfterDeserialization)]
    98     private void AfterDeserialization() {
    99       // BackwardsCompatibility3.3
    100       #region Backwards compatible code, remove with 3.4
    101       pausable = true;
    102       #endregion
    103     }
    10499
    105100    protected override void Initialize(CancellationToken cancellationToken) {
Note: See TracChangeset for help on using the changeset viewer.