[14555] | 1 | using HeuristicLab.Operators;
|
---|
| 2 | using System;
|
---|
| 3 | using System.Collections.Generic;
|
---|
| 4 | using System.Linq;
|
---|
| 5 | using System.Text;
|
---|
| 6 | using System.Threading.Tasks;
|
---|
| 7 | using HeuristicLab.Common;
|
---|
| 8 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
| 9 | using HeuristicLab.Core;
|
---|
| 10 | using HeuristicLab.Data;
|
---|
| 11 | using HeuristicLab.Parameters;
|
---|
| 12 | using HeuristicLab.Optimization;
|
---|
| 13 | using HeuristicLab.PluginInfrastructure;
|
---|
| 14 | using HeuristicLab.Analysis;
|
---|
| 15 |
|
---|
| 16 | namespace HeuristicLab.Algorithms.SimulatedAnnealing
|
---|
| 17 | {
|
---|
| 18 | [Item("-", "No reheats are performed.")]
|
---|
| 19 | [StorableClass]
|
---|
| 20 | public class NoReheatingOperator : SingleSuccessorOperator, IReheatingOperator
|
---|
| 21 | {
|
---|
| 22 | #region Strings
|
---|
| 23 | private const string AnnealingOperatorName = "AnnealingOperator";
|
---|
| 24 |
|
---|
| 25 | #endregion
|
---|
[15333] | 26 | #region Parameters
|
---|
[14555] | 27 | public ILookupParameter<IOperator> AnnealingOperatorParameter
|
---|
| 28 | {
|
---|
| 29 | get { return (ILookupParameter<IOperator>)Parameters[AnnealingOperatorName]; }
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | #endregion
|
---|
| 33 |
|
---|
| 34 | public NoReheatingOperator() : base()
|
---|
| 35 | {
|
---|
| 36 | #region Create parameters
|
---|
| 37 | Parameters.Add(new LookupParameter<IOperator>(AnnealingOperatorName, "The operator that cools the temperature."));
|
---|
| 38 | #endregion
|
---|
| 39 |
|
---|
| 40 | Parameterize();
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | [StorableConstructor]
|
---|
| 44 | protected NoReheatingOperator(bool deserializing) : base(deserializing) { }
|
---|
| 45 | protected NoReheatingOperator(NoReheatingOperator original, Cloner cloner) : base(original, cloner) { }
|
---|
| 46 |
|
---|
| 47 |
|
---|
| 48 | public override IDeepCloneable Clone(Cloner cloner)
|
---|
| 49 | {
|
---|
| 50 | return new NoReheatingOperator(this, cloner);
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | public void Parameterize()
|
---|
| 54 | {
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 | public override IOperation Apply()
|
---|
| 58 | {
|
---|
| 59 | return new OperationCollection {
|
---|
| 60 | ExecutionContext.CreateOperation(AnnealingOperatorParameter.ActualValue),
|
---|
| 61 | base.Apply()
|
---|
| 62 | };
|
---|
| 63 | }
|
---|
| 64 | }
|
---|
| 65 | }
|
---|