Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/22/11 16:45:46 (13 years ago)
Author:
mkommend
Message:

#1418: Merged trunk changes into branch.

Location:
branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.VariableNeighborhoodSearch
Files:
11 copied

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/VariableNeighborhoodSearch.cs

    r5792 r5796  
    22using System.Collections.Generic;
    33using System.Linq;
    4 using System.Text;
     4using HeuristicLab.Algorithms.LocalSearch;
     5using HeuristicLab.Analysis;
     6using HeuristicLab.Common;
    57using HeuristicLab.Core;
     8using HeuristicLab.Data;
     9using HeuristicLab.Operators;
     10using HeuristicLab.Optimization;
     11using HeuristicLab.Optimization.Operators;
     12using HeuristicLab.Parameters;
    613using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    7 using HeuristicLab.Common;
    8 using HeuristicLab.Optimization;
    9 using HeuristicLab.Parameters;
    10 using HeuristicLab.Data;
    11 using HeuristicLab.Analysis;
    1214using HeuristicLab.Random;
    13 using HeuristicLab.Optimization.Operators;
    14 using HeuristicLab.Operators;
    15 using HeuristicLab.Algorithms.LocalSearch;
    1615
    1716namespace HeuristicLab.Algorithms.VariableNeighborhoodSearch {
     
    1918  [Creatable("Algorithms")]
    2019  [StorableClass]
    21   public sealed class VariableNeighborhoodSearch : EngineAlgorithm, IStorableContent {
     20  public sealed class VariableNeighborhoodSearch : HeuristicOptimizationEngineAlgorithm, IStorableContent {
    2221    public string Filename { get; set; }
    2322
    2423    #region Problem Properties
    2524    public override Type ProblemType {
    26       get { return typeof(ISingleObjectiveProblem); }
    27     }
    28     public new ISingleObjectiveProblem Problem {
    29       get { return (ISingleObjectiveProblem)base.Problem; }
     25      get { return typeof(ISingleObjectiveHeuristicOptimizationProblem); }
     26    }
     27    public new ISingleObjectiveHeuristicOptimizationProblem Problem {
     28      get { return (ISingleObjectiveHeuristicOptimizationProblem)base.Problem; }
    3029      set { base.Problem = value; }
    3130    }
     
    234233        Type[] interfaces = t.GetInterfaces();
    235234
    236         for(int i = 0; i < interfaces.Length; i++) {
     235        for (int i = 0; i < interfaces.Length; i++) {
    237236          if (manipulatorType.IsAssignableFrom(interfaces[i])) {
    238237            bool assignable = false;
     
    244243            }
    245244
    246             if(!assignable)
     245            if (!assignable)
    247246              manipulatorInterfaces.Add(interfaces[i]);
    248           }         
     247          }
    249248        }
    250249      }
     
    266265        }
    267266      }
    268      
     267
    269268      Type genericType = typeof(ShakingOperator<>).MakeGenericType(manipulatorType);
    270       ShakingParameter.Value = (IShakingOperator)Activator.CreateInstance(genericType, new object[]{});
     269      ShakingParameter.Value = (IShakingOperator)Activator.CreateInstance(genericType, new object[] { });
    271270
    272271      ShakingParameter.Value.OnProblemChanged(Problem);
Note: See TracChangeset for help on using the changeset viewer.