#region License Information
/* HeuristicLab
* Copyright (C) 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.Data;
using HeuristicLab.Operators.Programmable;
using HeuristicLab.Parameters;
using HEAL.Attic;
namespace HeuristicLab.Optimization.Operators {
[Item("ProgrammableAnalyzer", "An analyzer that can be programmed for arbitrary needs.")]
[StorableType("6C821E9E-098E-409B-B281-9B530C1F5835")]
public class ProgrammableAnalyzer : ProgrammableSingleSuccessorOperator, IAnalyzer {
public virtual bool EnabledByDefault {
get { return false; }
}
[StorableConstructor]
protected ProgrammableAnalyzer(StorableConstructorFlag _) : base(_) { }
protected ProgrammableAnalyzer(ProgrammableAnalyzer original, Cloner cloner)
: base(original, cloner) {
}
public ProgrammableAnalyzer()
: base() {
Parameters.Add(new LookupParameter("Maximization", "True if the problem is a maximization problem."));
Parameters.Add(new ScopeTreeLookupParameter("Quality", "The qualities of the solutions."));
Parameters.Add(new ValueLookupParameter("Results", "The result collection where the solution should be stored."));
Parameters.ForEach(x => x.Hidden = false);
SelectNamespace("HeuristicLab.Optimization");
SelectNamespace("HeuristicLab.Optimization.Operators");
Assemblies[typeof(HeuristicLab.Optimization.ResultCollection).Assembly] = true;
Assemblies[typeof(HeuristicLab.Optimization.Operators.ProgrammableAnalyzer).Assembly] = true;
}
public override IDeepCloneable Clone(Cloner cloner) {
return new ProgrammableAnalyzer(this, cloner);
}
}
}