Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/18/11 15:20:24 (14 years ago)
Author:
svonolfe
Message:

Added simulated annealing improvement operator (#1425)

Location:
branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/IShakingOperator.cs

    r5642 r5752  
    2929namespace HeuristicLab.Algorithms.VariableNeighborhoodSearch {
    3030  public interface IShakingOperator: IManipulator {
    31     void Parameterize(IProblem problem);
     31    void OnProblemChanged(IProblem problem);
    3232  }
    3333}
  • branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/ShakingOperator.cs

    r5642 r5752  
    5959    }
    6060
    61     public void Parameterize(IProblem problem) {
     61    public void OnProblemChanged(IProblem problem) {
    6262      Operators.Clear();
    6363
  • branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/VariableNeighborhoodSearch.cs

    r5735 r5752  
    143143        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
    144144      }
     145      LocalImprovementParameter.ValueChanged += new EventHandler(LocalImprovementParameter_ValueChanged);
    145146    }
    146147
     
    186187      ParameterizeVNSMainLoop();
    187188      ParameterizeAnalyzers();
     189    }
     190
     191    void LocalImprovementParameter_ValueChanged(object sender, EventArgs e) {
     192      if (LocalImprovementParameter.Value != null)
     193        LocalImprovementParameter.Value.OnProblemChanged(Problem);
    188194    }
    189195    #endregion
     
    264270      ShakingParameter.Value = (IShakingOperator)Activator.CreateInstance(genericType, new object[]{});
    265271
    266       ShakingParameter.Value.Parameterize(Problem);
     272      ShakingParameter.Value.OnProblemChanged(Problem);
    267273    }
    268274    private void UpdateLocalImprovementOperator() {
Note: See TracChangeset for help on using the changeset viewer.