Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5642


Ignore:
Timestamp:
03/09/11 11:17:48 (12 years ago)
Author:
svonolfe
Message:

Implemented wiring (#1425)

Location:
branches/VNS
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/VNS/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearchImprovement.cs

    r5622 r5642  
    4444    private LocalSearchMainLoop loop;
    4545   
    46     private /*Constrained*/ValueParameter<IMoveGenerator> MoveGeneratorParameter {
    47       get { return (/*Constrained*/ValueParameter<IMoveGenerator>)Parameters["MoveGenerator"]; }
    48     }
    49     private /*Constrained*/ValueParameter<IMoveMaker> MoveMakerParameter {
    50       get { return (/*Constrained*/ValueParameter<IMoveMaker>)Parameters["MoveMaker"]; }
    51     }
    52     private /*Constrained*/ValueParameter<ISingleObjectiveMoveEvaluator> MoveEvaluatorParameter {
    53       get { return (/*Constrained*/ValueParameter<ISingleObjectiveMoveEvaluator>)Parameters["MoveEvaluator"]; }
     46    private ConstrainedValueParameter<IMoveGenerator> MoveGeneratorParameter {
     47      get { return (ConstrainedValueParameter<IMoveGenerator>)Parameters["MoveGenerator"]; }
     48    }
     49    private ConstrainedValueParameter<IMoveMaker> MoveMakerParameter {
     50      get { return (ConstrainedValueParameter<IMoveMaker>)Parameters["MoveMaker"]; }
     51    }
     52    private ConstrainedValueParameter<ISingleObjectiveMoveEvaluator> MoveEvaluatorParameter {
     53      get { return (ConstrainedValueParameter<ISingleObjectiveMoveEvaluator>)Parameters["MoveEvaluator"]; }
    5454    }
    5555    private ValueParameter<IntValue> MaximumIterationsParameter {
     
    8080
    8181    [StorableConstructor]
    82     protected LocalSearchImprovement(bool deserializing) : base(deserializing) { }
     82    protected LocalSearchImprovement(bool deserializing) : base(deserializing) {}
     83    [StorableHook(HookType.AfterDeserialization)]
     84    private void AfterDeserialization() {
     85      Initialize();
     86    }
    8387    protected LocalSearchImprovement(LocalSearchImprovement original, Cloner cloner)
    8488      : base(original, cloner) {
    8589        this.loop = cloner.Clone(original.loop);
     90        Initialize();
    8691    }
    8792    public override IDeepCloneable Clone(Cloner cloner) {
     
    9297        loop = new LocalSearchMainLoop(new BoolValue(true));
    9398
    94         Parameters.Add(new /*Constrained*/ValueParameter<IMoveGenerator>("MoveGenerator", "The operator used to generate moves to the neighborhood of the current solution."));
    95         Parameters.Add(new /*Constrained*/ValueParameter<IMoveMaker>("MoveMaker", "The operator used to perform a move."));
    96         Parameters.Add(new /*Constrained*/ValueParameter<ISingleObjectiveMoveEvaluator>("MoveEvaluator", "The operator used to evaluate a move."));
     99        Parameters.Add(new ConstrainedValueParameter<IMoveGenerator>("MoveGenerator", "The operator used to generate moves to the neighborhood of the current solution."));
     100        Parameters.Add(new ConstrainedValueParameter<IMoveMaker>("MoveMaker", "The operator used to perform a move."));
     101        Parameters.Add(new ConstrainedValueParameter<ISingleObjectiveMoveEvaluator>("MoveEvaluator", "The operator used to evaluate a move."));
    97102        Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(1000)));
    98103        Parameters.Add(new ValueParameter<IntValue>("SampleSize", "Number of moves that MultiMoveGenerators should create. This is ignored for Exhaustive- and SingleMoveGenerators.", new IntValue(100)));
    99104        Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of evaluated moves."));
    100105        Parameters.Add(new LookupParameter<IOperator>("Analyzer", "The operator used to analyze the solution."));
     106
     107        Initialize();
     108    }
     109
     110    private void Initialize() {
     111      MoveGeneratorParameter.ValueChanged += new EventHandler(MoveGeneratorParameter_ValueChanged);
    101112    }
    102113
    103114    public void Parameterize(IProblem problem) {
    104115      UpdateMoveOperators(problem);
     116      ChooseMoveOperators();
     117
     118      ParameterizeMoveGenerators(problem as ISingleObjectiveProblem);
     119      ParameterizeMoveEvaluators(problem as ISingleObjectiveProblem);
     120      ParameterizeMoveMakers(problem as ISingleObjectiveProblem);
     121    }
     122
     123    void MoveGeneratorParameter_ValueChanged(object sender, EventArgs e) {
     124      ChooseMoveOperators();
    105125    }
    106126
    107127    private void UpdateMoveOperators(IProblem problem) {
    108      /* IMoveGenerator oldMoveGenerator = MoveGenerator;
    109       MoveGeneratorParameter.ValidValues.Clear();
     128      IMoveGenerator oldMoveGenerator = MoveGenerator;
     129      IMoveMaker oldMoveMaker = MoveMaker;
     130      ISingleObjectiveMoveEvaluator oldMoveEvaluator = MoveEvaluator;
     131
     132      ClearMoveParameters();
     133
    110134      if (problem != null) {
    111135        foreach (IMoveGenerator generator in problem.Operators.OfType<IMoveGenerator>().OrderBy(x => x.Name))
     
    127151      }
    128152
    129       IMoveMaker oldMoveMaker = MoveMaker;
    130153      if (oldMoveMaker != null) {
    131154        IMoveMaker mm = MoveMakerParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMoveMaker.GetType());
     
    133156      }
    134157
    135       ISingleObjectiveMoveEvaluator oldMoveEvaluator = MoveEvaluator;
    136158      if (oldMoveEvaluator != null) {
    137159        ISingleObjectiveMoveEvaluator me = MoveEvaluatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMoveEvaluator.GetType());
    138160        if (me != null) MoveEvaluator = me;
    139       }*/
     161      }
     162    }
     163
     164    private void ChooseMoveOperators() {
     165      IMoveMaker oldMoveMaker = MoveMaker;
     166      ISingleObjectiveMoveEvaluator oldMoveEvaluator = MoveEvaluator;
     167
     168      if (MoveGenerator != null) {
     169        List<Type> moveTypes = MoveGenerator.GetType().GetInterfaces().Where(x => typeof(IMoveOperator).IsAssignableFrom(x)).ToList();
     170        foreach (Type type in moveTypes.ToList()) {
     171          if (moveTypes.Any(t => t != type && type.IsAssignableFrom(t)))
     172            moveTypes.Remove(type);
     173        }
     174        List<IMoveMaker> validMoveMakers = new List<IMoveMaker>();
     175        List<ISingleObjectiveMoveEvaluator> validMoveEvaluators = new List<ISingleObjectiveMoveEvaluator>();
     176
     177        foreach (Type type in moveTypes) {
     178          var moveMakers = MoveMakerParameter.ValidValues.Where(x => type.IsAssignableFrom(x.GetType())).OrderBy(x => x.Name);
     179          foreach (IMoveMaker moveMaker in moveMakers)
     180            validMoveMakers.Add(moveMaker);
     181
     182          var moveEvaluators = MoveEvaluatorParameter.ValidValues.Where(x => type.IsAssignableFrom(x.GetType())).OrderBy(x => x.Name);
     183          foreach (ISingleObjectiveMoveEvaluator moveEvaluator in moveEvaluators)
     184            validMoveEvaluators.Add(moveEvaluator);
     185        }
     186        if (oldMoveMaker != null) {
     187          IMoveMaker mm = validMoveMakers.FirstOrDefault(x => x.GetType() == oldMoveMaker.GetType());
     188          if (mm != null) MoveMaker = mm;
     189          else MoveMaker = validMoveMakers.FirstOrDefault();
     190        }
     191
     192        if (oldMoveEvaluator != null) {
     193          ISingleObjectiveMoveEvaluator me = validMoveEvaluators.FirstOrDefault(x => x.GetType() == oldMoveEvaluator.GetType());
     194          if (me != null) MoveEvaluator = me;
     195          else MoveEvaluator = validMoveEvaluators.FirstOrDefault();
     196        }
     197      }
    140198    }
    141199
    142200    private void ClearMoveParameters() {
    143       /*MoveMakerParameter.ValidValues.Clear();
    144       MoveEvaluatorParameter.ValidValues.Clear();*/
     201      MoveGeneratorParameter.ValidValues.Clear();
     202      MoveMakerParameter.ValidValues.Clear();
     203      MoveEvaluatorParameter.ValidValues.Clear();
     204    }
     205
     206    private void ParameterizeMoveGenerators(ISingleObjectiveProblem problem) {
     207      if (problem != null) {
     208        foreach (IMultiMoveGenerator generator in problem.Operators.OfType<IMultiMoveGenerator>())
     209          generator.SampleSizeParameter.ActualName = SampleSizeParameter.Name;
     210      }
     211    }
     212    private void ParameterizeMoveEvaluators(ISingleObjectiveProblem problem) {
     213      foreach (ISingleObjectiveMoveEvaluator op in problem.Operators.OfType<ISingleObjectiveMoveEvaluator>()) {
     214        op.QualityParameter.ActualName = problem.Evaluator.QualityParameter.ActualName;
     215      }
     216    }
     217    private void ParameterizeMoveMakers(ISingleObjectiveProblem problem) {
     218      foreach (IMoveMaker op in problem.Operators.OfType<IMoveMaker>()) {
     219        op.QualityParameter.ActualName = problem.Evaluator.QualityParameter.ActualName;
     220        if (MoveEvaluator != null)
     221          op.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName;
     222      }
    145223    }
    146224
  • branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/HeuristicLab.Algorithms.VariableNeighborhoodSearch-3.3.csproj

    r5622 r5642  
    108108  <ItemGroup>
    109109    <Compile Include="HeuristicLabAlgorithmsVariableNeighborhoodSearchPlugin.cs" />
     110    <Compile Include="IShakingOperator.cs" />
    110111    <Compile Include="Properties\AssemblyInfo.cs" />
    111112    <Compile Include="ShakingOperator.cs" />
  • branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/ShakingOperator.cs

    r5609 r5642  
    3838  [Item("ShakingOperator", "A shaking operator for VNS.")]
    3939  [StorableClass]
    40   public class ShakingOperator: CheckedMultiOperator<IManipulator> {
     40  public class ShakingOperator<T> : CheckedMultiOperator<T>, IShakingOperator where T : class, IManipulator {
    4141    public IValueLookupParameter<IntValue> IndexParameter {
    4242      get { return (ValueLookupParameter<IntValue>)Parameters["Index"]; }
     
    4949    [StorableConstructor]
    5050    protected ShakingOperator(bool deserializing) : base(deserializing) { }
    51     protected ShakingOperator(ShakingOperator original, Cloner cloner) : base(original, cloner) { }
     51    protected ShakingOperator(ShakingOperator<T> original, Cloner cloner) : base(original, cloner) { }
    5252    public override IDeepCloneable Clone(Cloner cloner) {
    53       return new ShakingOperator(this, cloner);
     53      return new ShakingOperator<T>(this, cloner);
    5454    }
    5555    public ShakingOperator()
     
    5757      Parameters.Add(new ValueLookupParameter<IntValue>("Index", "The index of the operator that should be applied (k)."));
    5858      Parameters.Add(new LookupParameter<BoolValue>("Continue", "True if k <= available operators."));
     59    }
     60
     61    public void Parameterize(IProblem problem) {
     62      Operators.Clear();
     63
     64      if (problem != null) {
     65        foreach (T manipulator in problem.Operators.OfType<T>().OrderBy(x => x.Name))
     66          Operators.Add(manipulator);
     67      }
    5968    }
    6069
  • branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/VariableNeighborhoodSearch.cs

    r5622 r5642  
    3939      get { return (ValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
    4040    }
    41     public /*Constrained*/ValueParameter<ISingleObjectiveEvaluator> EvaluatorParameter {
    42       get { return (/*Constrained*/ValueParameter<ISingleObjectiveEvaluator>)Parameters["Evaluator"]; }
    43     }
    4441    private ValueParameter<ILocalImprovement> LocalImprovementParameter {
    4542      get { return (ValueParameter<ILocalImprovement>)Parameters["LocalImprovement"]; }
    4643    }
    47     private ValueParameter<ShakingOperator> ShakingParameter {
    48       get { return (ValueParameter<ShakingOperator>)Parameters["Shaking"]; }
     44    private ValueParameter<IShakingOperator> ShakingParameter {
     45      get { return (ValueParameter<IShakingOperator>)Parameters["Shaking"]; }
    4946    }
    5047    private ValueParameter<IntValue> MaximumIterationsParameter {
     
    5350    private ValueParameter<MultiAnalyzer> AnalyzerParameter {
    5451      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
     52    }
     53    private VariableNeighborhoodSearchMainLoop VNSMainLoop {
     54      get { return FindMainLoop(SolutionsCreator.Successor); }
    5555    }
    5656    #endregion
     
    6060      get { return (RandomCreator)OperatorGraph.InitialOperator; }
    6161    }
    62     #endregion
     62    public MultiAnalyzer Analyzer {
     63      get { return AnalyzerParameter.Value; }
     64      set { AnalyzerParameter.Value = value; }
     65    }
     66    private SolutionsCreator SolutionsCreator {
     67      get { return (SolutionsCreator)RandomCreator.Successor; }
     68    }
     69    #endregion
     70
     71    [Storable]
     72    private BestAverageWorstQualityAnalyzer qualityAnalyzer;
    6373
    6474    [StorableConstructor]
     
    7080    private VariableNeighborhoodSearch(VariableNeighborhoodSearch original, Cloner cloner)
    7181      : base(original, cloner) {
    72 
     82      qualityAnalyzer = cloner.Clone(original.qualityAnalyzer);
     83      Initialize();
    7384    }
    7485    public override IDeepCloneable Clone(Cloner cloner) {
     
    7990      Parameters.Add(new ValueParameter<IntValue>("Seed", "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
    8091      Parameters.Add(new ValueParameter<BoolValue>("SetSeedRandomly", "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
    81       Parameters.Add(new /*Constrained*/ValueParameter<ISingleObjectiveEvaluator>("Evaluator", "The operator used to evaluate the solutions."));
    8292      Parameters.Add(new ValueParameter<ILocalImprovement>("LocalImprovement", "The local improvement operation", new LocalSearchImprovement()));
    83       Parameters.Add(new ValueParameter<ShakingOperator>("Shaking", "The shaking operation", new ShakingOperator()));
     93      Parameters.Add(new ValueParameter<IShakingOperator>("Shaking", "The shaking operation"));
    8494      Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(1000)));
    8595      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the solution and moves.", new MultiAnalyzer()));
     
    112122      mainLoop.LocalImprovementParameter.ActualName = LocalImprovementParameter.Name;
    113123      mainLoop.ShakingParameter.ActualName = ShakingParameter.Name;
    114       mainLoop.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
    115124      mainLoop.MaximumIterationsParameter.ActualName = MaximumIterationsParameter.Name;
    116125      mainLoop.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
     
    119128      mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions";
    120129
    121       /*Initialize();*/
    122     }
     130      qualityAnalyzer = new BestAverageWorstQualityAnalyzer();
     131      ParameterizeAnalyzers();
     132      UpdateAnalyzers();
     133
     134      Initialize();
     135    }
     136
     137    public override void Prepare() {
     138      if (Problem != null) base.Prepare();
     139    }
     140
     141    private void Initialize() {
     142      if (Problem != null) {
     143        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
     144      }
     145    }
     146
     147    #region Events
     148    protected override void OnProblemChanged() {
     149      ParameterizeStochasticOperator(Problem.SolutionCreator);
     150      ParameterizeStochasticOperator(Problem.Evaluator);
     151      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
     152      ParameterizeSolutionsCreator();
     153      ParameterizeVNSMainLoop();
     154      ParameterizeAnalyzers();
     155      ParameterizeIterationBasedOperators();
     156      UpdateShakingOperator();
     157      UpdateLocalImprovementOperator();
     158      UpdateAnalyzers();
     159      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
     160      base.OnProblemChanged();
     161    }
     162
     163    protected override void Problem_SolutionCreatorChanged(object sender, EventArgs e) {
     164      ParameterizeStochasticOperator(Problem.SolutionCreator);
     165      ParameterizeSolutionsCreator();
     166      base.Problem_SolutionCreatorChanged(sender, e);
     167    }
     168    protected override void Problem_EvaluatorChanged(object sender, EventArgs e) {
     169      ParameterizeStochasticOperator(Problem.Evaluator);
     170      ParameterizeSolutionsCreator();
     171      ParameterizeVNSMainLoop();
     172      ParameterizeAnalyzers();
     173      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
     174      base.Problem_EvaluatorChanged(sender, e);
     175    }
     176    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
     177      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
     178      ParameterizeIterationBasedOperators();
     179      UpdateShakingOperator();
     180      UpdateLocalImprovementOperator();
     181      UpdateAnalyzers();
     182      base.Problem_OperatorsChanged(sender, e);
     183    }
     184
     185    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
     186      ParameterizeVNSMainLoop();
     187      ParameterizeAnalyzers();
     188    }
     189    #endregion
     190
     191    #region Helpers
     192    private void ParameterizeSolutionsCreator() {
     193      SolutionsCreator.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
     194      SolutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
     195    }
     196    private void ParameterizeStochasticOperator(IOperator op) {
     197      if (op is IStochasticOperator)
     198        ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
     199    }
     200    private void ParameterizeVNSMainLoop() {
     201      VNSMainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
     202      VNSMainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     203      VNSMainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     204    }
     205    private void ParameterizeAnalyzers() {
     206      qualityAnalyzer.ResultsParameter.ActualName = "Results";
     207      if (Problem != null) {
     208        qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     209        qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     210        qualityAnalyzer.QualityParameter.Depth = 1;
     211        qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
     212      }
     213    }
     214    private void ParameterizeIterationBasedOperators() {
     215      if (Problem != null) {
     216        foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
     217          op.IterationsParameter.ActualName = "OuterIterations";
     218          op.MaximumIterationsParameter.ActualName = "MaximumIterations";
     219        }
     220      }
     221    }
     222    private void UpdateShakingOperator() {
     223      Type manipulatorType = typeof(IManipulator);
     224      List<Type> manipulatorInterfaces = new List<Type>();
     225
     226      foreach (IManipulator mutator in Problem.Operators.OfType<IManipulator>().OrderBy(x => x.Name)) {
     227        Type t = mutator.GetType();
     228        Type[] interfaces = t.GetInterfaces();
     229
     230        for(int i = 0; i < interfaces.Length; i++) {
     231          if (manipulatorType.IsAssignableFrom(interfaces[i])) {
     232            bool assignable = false;
     233            for (int j = 0; j < interfaces.Length; j++) {
     234              if (i != j && interfaces[i].IsAssignableFrom(interfaces[j])) {
     235                assignable = true;
     236                break;
     237              }
     238            }
     239
     240            if(!assignable)
     241              manipulatorInterfaces.Add(interfaces[i]);
     242          }         
     243        }
     244      }
     245
     246      foreach (Type manipulatorInterface in manipulatorInterfaces) {
     247        //manipulatorInterface is more specific
     248        if (manipulatorType.IsAssignableFrom(manipulatorInterface)) {
     249          //and compatible to all other found manipulator types
     250          bool compatible = true;
     251          foreach (Type manipulatorInterface2 in manipulatorInterfaces) {
     252            if (!manipulatorInterface.IsAssignableFrom(manipulatorInterface2)) {
     253              compatible = false;
     254              break;
     255            }
     256          }
     257
     258          if (compatible)
     259            manipulatorType = manipulatorInterface;
     260        }
     261      }
     262     
     263      Type genericType = typeof(ShakingOperator<>).MakeGenericType(manipulatorType);
     264      ShakingParameter.Value = (IShakingOperator)Activator.CreateInstance(genericType, new object[]{});
     265
     266      ShakingParameter.Value.Parameterize(Problem);
     267    }
     268    private void UpdateLocalImprovementOperator() {
     269      LocalImprovementParameter.Value.Parameterize(Problem);
     270    }
     271    private void UpdateAnalyzers() {
     272      Analyzer.Operators.Clear();
     273      if (Problem != null) {
     274        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>()) {
     275          foreach (IScopeTreeLookupParameter param in analyzer.Parameters.OfType<IScopeTreeLookupParameter>())
     276            param.Depth = 1;
     277          Analyzer.Operators.Add(analyzer);
     278        }
     279      }
     280      Analyzer.Operators.Add(qualityAnalyzer);
     281    }
     282    private VariableNeighborhoodSearchMainLoop FindMainLoop(IOperator start) {
     283      IOperator mainLoop = start;
     284      while (mainLoop != null && !(mainLoop is VariableNeighborhoodSearchMainLoop))
     285        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
     286      if (mainLoop == null) return null;
     287      else return (VariableNeighborhoodSearchMainLoop)mainLoop;
     288    }
     289    #endregion
    123290  }
    124291}
  • branches/VNS/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/VariableNeighborhoodSearchMainLoop.cs

    r5622 r5642  
    7272      get { return (ValueLookupParameter<ILocalImprovement>)Parameters["LocalImprovement"]; }
    7373    }
    74     public ValueLookupParameter<ShakingOperator> ShakingParameter {
    75       get { return (ValueLookupParameter<ShakingOperator>)Parameters["Shaking"]; }
     74    public ValueLookupParameter<IShakingOperator> ShakingParameter {
     75      get { return (ValueLookupParameter<IShakingOperator>)Parameters["Shaking"]; }
    7676    }
    7777    #endregion
     
    103103      Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of evaluated solutions."));
    104104      Parameters.Add(new ValueLookupParameter<ILocalImprovement>("LocalImprovement", "The local improvement operation."));
    105       Parameters.Add(new ValueLookupParameter<ShakingOperator>("Shaking", "The shaking operation."));
     105      Parameters.Add(new ValueLookupParameter<IShakingOperator>("Shaking", "The shaking operation."));
    106106      #endregion
    107107
     
    148148
    149149      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("OuterIterations", new IntValue(0)));
    150       variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("Index", new DoubleValue(0)));
     150      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Index", new IntValue(0)));
    151151      variableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("Continue", new BoolValue(false)));
    152152      variableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("IsBetter", new BoolValue(false)));
     
    242242      #region Create operator graph
    243243      OperatorGraph.InitialOperator = variableCreator;
    244       variableCreator.Successor = analyzer1;
    245       analyzer1.Successor = subScopesProcessor0;
     244      variableCreator.Successor = subScopesProcessor0;
    246245      subScopesProcessor0.Operators.Add(bestQualityInitializer);
    247       subScopesProcessor0.Successor = resultsCollector1;
     246      subScopesProcessor0.Successor = analyzer1;
     247      analyzer1.Successor = resultsCollector1;
    248248      /////////
    249249      resultsCollector1.Successor = iteration;
Note: See TracChangeset for help on using the changeset viewer.