Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/28/15 09:47:23 (9 years ago)
Author:
pfleck
Message:

#2027
Inverted the conditions to check the continue criteria instead of termination criteria.
Conditions are then specified more naturally: "while generations < max" instead of "break if generations > min".
If any Continue-Check returns false, the algorithm will be terminated.

The naming "Terminator" has to be discussed because it suggest to specify the criteria when the algorithm should stop, instead of continue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/TerminationCriteria/HeuristicLab.Termination/3.3/ExecutionTimeTerminator.cs

    r12405 r12407  
    5151    }
    5252
    53     protected override bool CheckTermination() {
     53    protected override bool CheckContinueCriterion() {
    5454      var max = ThresholdParameter.Value.Value;
    5555
    56       return executable.ExecutionTime > max;
     56      return executable.ExecutionTime < max;
    5757    }
    5858
    5959    public override string ToString() {
    6060      if (Threshold == null) return Name;
    61       else return string.Format("{0} {1} {2}", Name, ">", ThresholdParameter.Value);
     61      else return string.Format("{0} {1} {2}", Name, "<", ThresholdParameter.Value);
    6262    }
    6363  }
Note: See TracChangeset for help on using the changeset viewer.