Changeset 11839


Ignore:
Timestamp:
01/29/15 11:53:37 (8 years ago)
Author:
jkarder
Message:

#2250: check if path relinkers are available and update ExecutePathRelinking accordingly

File:
1 edited

Legend:

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

    r11404 r11839  
    175175      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The analyzer used to analyze each iteration.", new MultiAnalyzer()));
    176176      Parameters.Add(new ConstrainedValueParameter<ICrossover>("Crossover", "The operator used to cross solutions."));
    177       Parameters.Add(new ValueParameter<BoolValue>("ExecutePathRelinking", "True if path relinking should be executed instead of crossover, otherwise false.", new BoolValue(true)));
     177      Parameters.Add(new ValueParameter<BoolValue>("ExecutePathRelinking", "True if path relinking should be executed instead of crossover, otherwise false.", new BoolValue(false)));
    178178      Parameters.Add(new ConstrainedValueParameter<IImprovementOperator>("Improver", "The operator used to improve solutions."));
    179179      Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of iterations which should be processed.", new IntValue(100)));
     
    309309      base.Problem_OperatorsChanged(sender, e);
    310310    }
     311    private void PathRelinkerParameter_ValueChanged(object sender, EventArgs e) {
     312      ExecutePathRelinking.Value = PathRelinkerParameter.Value != null;
     313    }
    311314    private void SimilarityCalculatorParameter_ValueChanged(object sender, EventArgs e) {
    312315      ParameterizeMainLoop();
     
    322325    #region Helpers
    323326    private void Initialize() {
     327      PathRelinkerParameter.ValueChanged += new EventHandler(PathRelinkerParameter_ValueChanged);
    324328      SimilarityCalculatorParameter.ValueChanged += new EventHandler(SimilarityCalculatorParameter_ValueChanged);
    325329      if (Problem != null)
Note: See TracChangeset for help on using the changeset viewer.