#region License Information /* HeuristicLab * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) * * This file is part of HeuristicLab. * * HeuristicLab is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * HeuristicLab is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HeuristicLab. If not, see . */ #endregion using HeuristicLab.Common; using HeuristicLab.Core; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers { [Item("QAPAfterCrossoverCombinedOperator", "An operator that contains all operators that need to be executed after crossover for the QAP.")] [StorableClass] public class QAPAfterCrossoverCombinedOperator : AfterCrossoverCombinedOperator { [StorableConstructor] protected QAPAfterCrossoverCombinedOperator(bool deserializing) : base(deserializing) { } protected QAPAfterCrossoverCombinedOperator(QAPAfterCrossoverCombinedOperator original, Cloner cloner) : base(original, cloner) { } public QAPAfterCrossoverCombinedOperator() : base() { } protected override void SimilarityCalculatorParameter_ValueChanged(object sender, System.EventArgs e) { SimilarityCalculatorParameter.Value.QualityVariableName = "Quality"; SimilarityCalculatorParameter.Value.SolutionVariableName = "Assignment"; } public override IDeepCloneable Clone(Cloner cloner) { return new QAPAfterCrossoverCombinedOperator(this, cloner); } public override void InitializeOperators() { base.InitializeOperators(); cxAnalyzer.ParentsQualityParameter.ActualName = "Quality"; cxAnalyzer.QualityParameter.ActualName = "Quality"; varDuplicator.OriginalParameter.ActualName = "Assignment"; varDuplicator.CloneParameter.ActualName = "AssignmentClone"; var umAnalyzer = new PermutationUnwantedMutationAnalyzer(); umAnalyzer.SolutionVariableName = "Assignment"; cxAnalyzer.UnwantedMutationAnalyzerParameter.Value = umAnalyzer; solToPopAnalyzer.SolutionParameter.ActualName = "Assignment"; solToPopAnalyzer.QualityParameter.ActualName = "Quality"; wqAnalyzer.ParentsQualityParameter.ActualName = "Quality"; selPressureAnalyzer.SolutionQualityName = "Quality"; } } }