Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/25/11 23:27:44 (13 years ago)
Author:
abeham
Message:

#1541

  • fixed some bugs
Location:
branches/QAPAlgorithms/HeuristicLab.Problems.QuadraticAssignment.Algorithms/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/QAPAlgorithms/HeuristicLab.Problems.QuadraticAssignment.Algorithms/3.3/RobustTabooSeachOperator.cs

    r6593 r6594  
    187187      if (useNewAdaptionScheme) {
    188188        double r = random.NextDouble();
     189        if (r == 0) r = 1; // transform to (0;1]
    189190        shortTermMemory[bestMove.Index1, solution[bestMove.Index1]] = (int)(iteration + r * r * r * maxTenure);
    190191        r = random.NextDouble();
     192        if (r == 0) r = 1; // transform to (0;1]
    191193        shortTermMemory[bestMove.Index2, solution[bestMove.Index2]] = (int)(iteration + r * r * r * maxTenure);
    192194      } else {
  • branches/QAPAlgorithms/HeuristicLab.Problems.QuadraticAssignment.Algorithms/3.3/RobustTabooSearch.cs

    r6593 r6594  
    139139      Parameters.Add(new FixedValueParameter<IntValue>("MaximumTabuTenure", "The maximum tabu tenure.", new IntValue(20)));
    140140      Parameters.Add(new FixedValueParameter<BoolValue>("UseAlternativeAspiration", "True if the alternative aspiration condition should be used that takes moves that have not been made for some time above others.", new BoolValue(false)));
    141       Parameters.Add(new FixedValueParameter<IntValue>("AlternativeAspirationTenure", "The time t that a move will be remembered for the alternative aspiration condition.", new IntValue(10000)));
     141      Parameters.Add(new FixedValueParameter<IntValue>("AlternativeAspirationTenure", "The time t that a move will be remembered for the alternative aspiration condition.", new IntValue(int.MaxValue)));
    142142      Parameters.Add(new FixedValueParameter<BoolValue>("TerminateOnOptimalSolution", "True when the algorithm should stop if it reached a quality equal or smaller to the BestKnownQuality.", new BoolValue(true)));
    143143      Parameters.Add(new FixedValueParameter<BoolValue>("UseNewTabuTenureAdaptionScheme", @"In an updated version of his implementation, Eric Taillard introduced a different way to change the tabu tenure.
     
    284284
    285285    private void MaximumIterationsParameter_ValueChanged(object sender, EventArgs e) {
    286       if (MaximumIterations >= AlternativeAspirationTenure && UseAlternativeAspiration) {
     286      if (MaximumIterations < AlternativeAspirationTenure && UseAlternativeAspiration) {
    287287        SetSilentlyUseAlternativeAspirationParameter(false);
    288       } else if (MaximumIterations < AlternativeAspirationTenure && !UseAlternativeAspiration) {
     288      } else if (MaximumIterations >= AlternativeAspirationTenure && !UseAlternativeAspiration) {
    289289        SetSilentlyUseAlternativeAspirationParameter(true);
    290290      }
Note: See TracChangeset for help on using the changeset viewer.