Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11302 for trunk


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.

Location:
trunk/sources
Files:
2 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))) {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs

    r11285 r11302  
    3333using HeuristicLab.PluginInfrastructure;
    3434using HeuristicLab.Problems.Instances;
     35using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    3536using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3637using HeuristicLab.Problems.VehicleRouting.Interpreters;
     
    263264            defaultCreator = creator;
    264265        }
     266        Operators.Add(new AlbaLambdaInterchangeLocalImprovementOperator());
    265267        if (defaultCreator != null)
    266268          solutionCreatorParameter.Value = defaultCreator;
Note: See TracChangeset for help on using the changeset viewer.