Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/03/12 16:46:35 (12 years ago)
Author:
gkronber
Message:

#1847: merged r8084:8205 from trunk into GP move operators branch

Location:
branches/GP-MoveOperators
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GP-MoveOperators

  • branches/GP-MoveOperators/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/VariableNeighborhoodSearch.cs

    r8085 r8206  
    5858      get { return (FixedValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
    5959    }
    60     public ConstrainedValueParameter<ILocalImprovementOperator> LocalImprovementParameter {
    61       get { return (ConstrainedValueParameter<ILocalImprovementOperator>)Parameters["LocalImprovement"]; }
    62     }
    63     public ConstrainedValueParameter<IMultiNeighborhoodShakingOperator> ShakingOperatorParameter {
    64       get { return (ConstrainedValueParameter<IMultiNeighborhoodShakingOperator>)Parameters["ShakingOperator"]; }
     60    public IConstrainedValueParameter<ILocalImprovementOperator> LocalImprovementParameter {
     61      get { return (IConstrainedValueParameter<ILocalImprovementOperator>)Parameters["LocalImprovement"]; }
     62    }
     63    public IConstrainedValueParameter<IMultiNeighborhoodShakingOperator> ShakingOperatorParameter {
     64      get { return (IConstrainedValueParameter<IMultiNeighborhoodShakingOperator>)Parameters["ShakingOperator"]; }
    6565    }
    6666    private FixedValueParameter<IntValue> MaximumIterationsParameter {
     
    294294        LocalImprovementParameter.ValidValues.Clear();
    295295      } else {
    296         LocalImprovementParameter.ValidValues.RemoveWhere(x => !x.ProblemType.IsAssignableFrom(Problem.GetType()));
     296        foreach (var entry in LocalImprovementParameter.ValidValues.ToList()) {
     297          if (!entry.ProblemType.IsAssignableFrom(Problem.GetType())) {
     298            LocalImprovementParameter.ValidValues.Remove(entry);
     299          }
     300        }
    297301        foreach (ILocalImprovementOperator op in ApplicationManager.Manager.GetInstances<ILocalImprovementOperator>().Where(x => x.ProblemType.IsAssignableFrom(Problem.GetType()))) {
    298302          if (!LocalImprovementParameter.ValidValues.Any(x => x.GetType() == op.GetType()))
Note: See TracChangeset for help on using the changeset viewer.