Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/PTSPMoveEvaluator.cs @ 12191

Last change on this file since 12191 was 12191, checked in by apolidur, 9 years ago

#2221: Splitting PTSP into Analytical and Estimated

File size: 1.5 KB
Line 
1using System;
2using HeuristicLab.Common;
3using HeuristicLab.Core;
4using HeuristicLab.Data;
5using HeuristicLab.Operators;
6using HeuristicLab.Optimization;
7using HeuristicLab.Parameters;
8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
9
10namespace HeuristicLab.Problems.PTSP {
11  /// <summary>
12  /// A base class for operators which evaluate TSP solutions.
13  /// </summary>
14  [Item("PTSPMoveEvaluator", "A base class for operators which evaluate TSP moves.")]
15  [StorableClass]
16  public abstract class PTSPMoveEvaluator : SingleSuccessorOperator, IPTSPMoveEvaluator, IMoveOperator {
17
18    public abstract Type EvaluatorType { get; }
19    public override bool CanChangeName {
20      get { return false; }
21    }
22
23    public ILookupParameter<DoubleValue> QualityParameter {
24      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
25    }
26    public ILookupParameter<DoubleValue> MoveQualityParameter {
27      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
28    }
29
30    [StorableConstructor]
31    protected PTSPMoveEvaluator(bool deserializing) : base(deserializing) { }
32    protected PTSPMoveEvaluator(PTSPMoveEvaluator original, Cloner cloner) : base(original, cloner) { }
33    protected PTSPMoveEvaluator()
34      : base() {
35      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of a TSP solution."));
36      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The evaluated quality of a move on a TSP solution."));
37    }
38  }
39}
Note: See TracBrowser for help on using the repository browser.