Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/05/12 14:45:48 (12 years ago)
Author:
abeham
Message:

#1984: Fixed handling of tabu tenures that are equal to or smaller than 0

  • equal to 0 will not invoke tabu attribute calculation
  • lower than 0 will throw an InvalidOperationException
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Operators/3.3/TabuMaker.cs

    r7259 r9001  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    6566      ItemList<IItem> tabuList = TabuListParameter.ActualValue;
    6667      int tabuTenure = TabuTenureParameter.ActualValue.Value;
     68      if (tabuTenure == 0) return base.Apply();
     69      if (tabuTenure < 0) throw new InvalidOperationException("A TabuTenure of less than 0 is not allowed.");
    6770
    6871      int overlength = tabuList.Count - tabuTenure;
Note: See TracChangeset for help on using the changeset viewer.