Line | |
---|
1 | using System;
|
---|
2 | using HeuristicLab.Common;
|
---|
3 | using HeuristicLab.Core;
|
---|
4 | using HeuristicLab.Data;
|
---|
5 | using HeuristicLab.Operators;
|
---|
6 | using HeuristicLab.Optimization;
|
---|
7 | using HeuristicLab.Parameters;
|
---|
8 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
9 |
|
---|
10 | namespace 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.