Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/26/14 12:57:50 (10 years ago)
Author:
pfleck
Message:

#2232
VNS always clears all LocalImprovement operators when changing problem.
Added missing AlbaLambdaLocalImprovementOperator in VRP.

File:
1 edited

Legend:

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

    r11300 r11302  
    293293    }
    294294    private void InitializeLocalImprovementOperators() {
    295       if (Problem == null) {
    296         LocalImprovementParameter.ValidValues.Clear();
    297       } else {
    298         foreach (var algOp in LocalImprovementParameter.ValidValues.OfType<ILocalImprovementAlgorithmOperator>()) {
    299           if (!algOp.ProblemType.IsInstanceOfType(Problem)) {
    300             LocalImprovementParameter.ValidValues.Remove(algOp);
    301           }
    302         }
     295      LocalImprovementParameter.ValidValues.Clear();
     296      if (Problem != null) {
    303297        // Regular ILocalImprovementOperators queried from Problem
    304298        foreach (var op in Problem.Operators.OfType<ILocalImprovementOperator>().Where(x => !(x is ILocalImprovementAlgorithmOperator))) {
Note: See TracChangeset for help on using the changeset viewer.