- Timestamp:
- 03/23/11 01:09:38 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/VariableNeighborhoodSearch.cs
r5753 r5809 2 2 using System.Collections.Generic; 3 3 using System.Linq; 4 using System.Text; 4 using HeuristicLab.Algorithms.LocalSearch; 5 using HeuristicLab.Analysis; 6 using HeuristicLab.Common; 5 7 using HeuristicLab.Core; 8 using HeuristicLab.Data; 9 using HeuristicLab.Operators; 10 using HeuristicLab.Optimization; 11 using HeuristicLab.Optimization.Operators; 12 using HeuristicLab.Parameters; 6 13 using 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;12 14 using HeuristicLab.Random; 13 using HeuristicLab.Optimization.Operators;14 using HeuristicLab.Operators;15 using HeuristicLab.Algorithms.LocalSearch;16 15 17 16 namespace HeuristicLab.Algorithms.VariableNeighborhoodSearch { … … 19 18 [Creatable("Algorithms")] 20 19 [StorableClass] 21 public sealed class VariableNeighborhoodSearch : EngineAlgorithm, IStorableContent {20 public sealed class VariableNeighborhoodSearch : HeuristicOptimizationEngineAlgorithm, IStorableContent { 22 21 public string Filename { get; set; } 23 22 24 23 #region Problem Properties 25 24 public override Type ProblemType { 26 get { return typeof(ISingleObjective Problem); }27 } 28 public new ISingleObjective Problem Problem {29 get { return (ISingleObjective Problem)base.Problem; }25 get { return typeof(ISingleObjectiveHeuristicOptimizationProblem); } 26 } 27 public new ISingleObjectiveHeuristicOptimizationProblem Problem { 28 get { return (ISingleObjectiveHeuristicOptimizationProblem)base.Problem; } 30 29 set { base.Problem = value; } 31 30 } … … 234 233 Type[] interfaces = t.GetInterfaces(); 235 234 236 for (int i = 0; i < interfaces.Length; i++) {235 for (int i = 0; i < interfaces.Length; i++) { 237 236 if (manipulatorType.IsAssignableFrom(interfaces[i])) { 238 237 bool assignable = false; … … 244 243 } 245 244 246 if (!assignable)245 if (!assignable) 247 246 manipulatorInterfaces.Add(interfaces[i]); 248 } 247 } 249 248 } 250 249 } … … 266 265 } 267 266 } 268 267 269 268 Type genericType = typeof(ShakingOperator<>).MakeGenericType(manipulatorType); 270 ShakingParameter.Value = (IShakingOperator)Activator.CreateInstance(genericType, new object[] {});269 ShakingParameter.Value = (IShakingOperator)Activator.CreateInstance(genericType, new object[] { }); 271 270 272 271 ShakingParameter.Value.OnProblemChanged(Problem);
Note: See TracChangeset
for help on using the changeset viewer.