Index: /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Creators/GreedyOrienteeringTourCreator.cs
===================================================================
--- /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Creators/GreedyOrienteeringTourCreator.cs (revision 11320)
+++ /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Creators/GreedyOrienteeringTourCreator.cs (revision 11321)
@@ -36,5 +36,5 @@
points from this list at the first position in which they can feasibly be inserted. (Schilde et. al. 2009)")]
[StorableClass]
- public sealed class GreedyOrienteeringTourCreator : IntegerVectorCreator {
+ public sealed class GreedyOrienteeringTourCreator : IntegerVectorCreator, IOrienteeringSolutionCreator {
public override bool CanChangeName { get { return false; } }
Index: /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/HeuristicLab.Problems.Orienteering-3.3.csproj
===================================================================
--- /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/HeuristicLab.Problems.Orienteering-3.3.csproj (revision 11320)
+++ /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/HeuristicLab.Problems.Orienteering-3.3.csproj (revision 11321)
@@ -88,4 +88,5 @@
+
Index: /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringEvaluator.cs
===================================================================
--- /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringEvaluator.cs (revision 11320)
+++ /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringEvaluator.cs (revision 11321)
@@ -20,7 +20,17 @@
#endregion
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
using HeuristicLab.Optimization;
namespace HeuristicLab.Problems.Orienteering {
- public interface IOrienteeringEvaluator : ISingleObjectiveEvaluator { }
+ public interface IOrienteeringEvaluator : ISingleObjectiveEvaluator {
+ ILookupParameter IntegerVectorParameter { get; }
+ ILookupParameter ScoresParameter { get; }
+ ILookupParameter DistanceMatrixParameter { get; }
+ ILookupParameter MaximumDistanceParameter { get; }
+ ILookupParameter PointVisitingCostsParameter { get; }
+ ILookupParameter PenaltyParameter { get; }
+ }
}
Index: /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringSolutionCreator.cs
===================================================================
--- /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringSolutionCreator.cs (revision 11321)
+++ /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringSolutionCreator.cs (revision 11321)
@@ -0,0 +1,35 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+
+namespace HeuristicLab.Problems.Orienteering {
+ public interface IOrienteeringSolutionCreator : IIntegerVectorCreator {
+ ILookupParameter DistanceMatrixParameter { get; }
+ ILookupParameter ScoresParameter { get; }
+ ILookupParameter MaximumDistanceParameter { get; }
+ ILookupParameter StartingPointParameter { get; }
+ ILookupParameter TerminalPointParameter { get; }
+ ILookupParameter PointVisitingCostsParameter { get; }
+ }
+}
Index: /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs
===================================================================
--- /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs (revision 11320)
+++ /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs (revision 11321)
@@ -39,5 +39,5 @@
[StorableClass]
public sealed class OrienteeringProblem
- : SingleObjectiveHeuristicOptimizationProblem,
+ : SingleObjectiveHeuristicOptimizationProblem,
IStorableContent, IProblemInstanceConsumer, IProblemInstanceConsumer, IProblemInstanceConsumer {
@@ -235,20 +235,17 @@
private void ParameterizeSolutionCreator() {
- if (SolutionCreator is GreedyOrienteeringTourCreator) {
- var creator = (GreedyOrienteeringTourCreator)SolutionCreator;
- creator.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name;
- creator.ScoresParameter.ActualName = ScoresParameter.Name;
- creator.MaximumDistanceParameter.ActualName = MaximumDistanceParameter.Name;
- creator.StartingPointParameter.ActualName = StartingPointParameter.Name;
- creator.TerminalPointParameter.ActualName = TerminalPointParameter.Name;
- creator.PointVisitingCostsParameter.ActualName = PointVisitingCostsParameter.Name;
- }
+ SolutionCreator.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name;
+ SolutionCreator.ScoresParameter.ActualName = ScoresParameter.Name;
+ SolutionCreator.MaximumDistanceParameter.ActualName = MaximumDistanceParameter.Name;
+ SolutionCreator.StartingPointParameter.ActualName = StartingPointParameter.Name;
+ SolutionCreator.TerminalPointParameter.ActualName = TerminalPointParameter.Name;
+ SolutionCreator.PointVisitingCostsParameter.ActualName = PointVisitingCostsParameter.Name;
}
private void ParameterizeEvaluator() {
- if (Evaluator is OrienteeringEvaluator) {
- var evaluator = (OrienteeringEvaluator)Evaluator;
- evaluator.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
- evaluator.ScoresParameter.ActualName = ScoresParameter.Name;
- }
+ Evaluator.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+ Evaluator.ScoresParameter.ActualName = ScoresParameter.Name;
+ Evaluator.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name;
+ Evaluator.MaximumDistanceParameter.ActualName = MaximumDistanceParameter.Name;
+ Evaluator.PointVisitingCostsParameter.ActualName = PointVisitingCostsParameter.Name;
}
private void ParameterizeAnalyzer() {