using HeuristicLab.Operators; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using HeuristicLab.Common; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; using HeuristicLab.Core; using HeuristicLab.Data; using HeuristicLab.Parameters; using HeuristicLab.Optimization; using HeuristicLab.PluginInfrastructure; using HeuristicLab.Analysis; namespace HeuristicLab.Algorithms.SimulatedAnnealing { [Item("-", "No reheats are performed.")] [StorableClass] public class NoReheatingOperator : SingleSuccessorOperator, IReheatingOperator { #region Strings private const string AnnealingOperatorName = "AnnealingOperator"; #endregion #region Parameters public ILookupParameter AnnealingOperatorParameter { get { return (ILookupParameter)Parameters[AnnealingOperatorName]; } } #endregion public NoReheatingOperator() : base() { #region Create parameters Parameters.Add(new LookupParameter(AnnealingOperatorName, "The operator that cools the temperature.")); #endregion Parameterize(); } [StorableConstructor] protected NoReheatingOperator(bool deserializing) : base(deserializing) { } protected NoReheatingOperator(NoReheatingOperator original, Cloner cloner) : base(original, cloner) { } public override IDeepCloneable Clone(Cloner cloner) { return new NoReheatingOperator(this, cloner); } public void Parameterize() { } public override IOperation Apply() { return new OperationCollection { ExecutionContext.CreateOperation(AnnealingOperatorParameter.ActualValue), base.Apply() }; } } }