Changeset 11321
- Timestamp:
- 09/01/14 12:15:49 (10 years ago)
- Location:
- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Creators/GreedyOrienteeringTourCreator.cs
r11320 r11321 36 36 points from this list at the first position in which they can feasibly be inserted. (Schilde et. al. 2009)")] 37 37 [StorableClass] 38 public sealed class GreedyOrienteeringTourCreator : IntegerVectorCreator {38 public sealed class GreedyOrienteeringTourCreator : IntegerVectorCreator, IOrienteeringSolutionCreator { 39 39 public override bool CanChangeName { get { return false; } } 40 40 -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/HeuristicLab.Problems.Orienteering-3.3.csproj
r11305 r11321 88 88 <Compile Include="Interfaces\IOrienteeringEvaluator.cs" /> 89 89 <Compile Include="Evaluators\OrienteeringEvaluator.cs" /> 90 <Compile Include="Interfaces\IOrienteeringSolutionCreator.cs" /> 90 91 <Compile Include="OrienteeringProblem.cs" /> 91 92 <Compile Include="OrienteeringScript.cs" /> -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Interfaces/IOrienteeringEvaluator.cs
r11186 r11321 20 20 #endregion 21 21 22 using HeuristicLab.Core; 23 using HeuristicLab.Data; 24 using HeuristicLab.Encodings.IntegerVectorEncoding; 22 25 using HeuristicLab.Optimization; 23 26 24 27 namespace HeuristicLab.Problems.Orienteering { 25 public interface IOrienteeringEvaluator : ISingleObjectiveEvaluator { } 28 public interface IOrienteeringEvaluator : ISingleObjectiveEvaluator { 29 ILookupParameter<IntegerVector> IntegerVectorParameter { get; } 30 ILookupParameter<DoubleArray> ScoresParameter { get; } 31 ILookupParameter<DistanceMatrix> DistanceMatrixParameter { get; } 32 ILookupParameter<DoubleValue> MaximumDistanceParameter { get; } 33 ILookupParameter<DoubleValue> PointVisitingCostsParameter { get; } 34 ILookupParameter<DoubleValue> PenaltyParameter { get; } 35 } 26 36 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs
r11320 r11321 39 39 [StorableClass] 40 40 public sealed class OrienteeringProblem 41 : SingleObjectiveHeuristicOptimizationProblem<IOrienteeringEvaluator, I IntegerVectorCreator>,41 : SingleObjectiveHeuristicOptimizationProblem<IOrienteeringEvaluator, IOrienteeringSolutionCreator>, 42 42 IStorableContent, IProblemInstanceConsumer<OPData>, IProblemInstanceConsumer<TSPData>, IProblemInstanceConsumer<CVRPData> { 43 43 … … 235 235 236 236 private void ParameterizeSolutionCreator() { 237 if (SolutionCreator is GreedyOrienteeringTourCreator) { 238 var creator = (GreedyOrienteeringTourCreator)SolutionCreator; 239 creator.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name; 240 creator.ScoresParameter.ActualName = ScoresParameter.Name; 241 creator.MaximumDistanceParameter.ActualName = MaximumDistanceParameter.Name; 242 creator.StartingPointParameter.ActualName = StartingPointParameter.Name; 243 creator.TerminalPointParameter.ActualName = TerminalPointParameter.Name; 244 creator.PointVisitingCostsParameter.ActualName = PointVisitingCostsParameter.Name; 245 } 237 SolutionCreator.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name; 238 SolutionCreator.ScoresParameter.ActualName = ScoresParameter.Name; 239 SolutionCreator.MaximumDistanceParameter.ActualName = MaximumDistanceParameter.Name; 240 SolutionCreator.StartingPointParameter.ActualName = StartingPointParameter.Name; 241 SolutionCreator.TerminalPointParameter.ActualName = TerminalPointParameter.Name; 242 SolutionCreator.PointVisitingCostsParameter.ActualName = PointVisitingCostsParameter.Name; 246 243 } 247 244 private void ParameterizeEvaluator() { 248 if (Evaluator is OrienteeringEvaluator) {249 var evaluator = (OrienteeringEvaluator)Evaluator;250 evaluator.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;251 evaluator.ScoresParameter.ActualName = ScoresParameter.Name;252 }245 Evaluator.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName; 246 Evaluator.ScoresParameter.ActualName = ScoresParameter.Name; 247 Evaluator.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name; 248 Evaluator.MaximumDistanceParameter.ActualName = MaximumDistanceParameter.Name; 249 Evaluator.PointVisitingCostsParameter.ActualName = PointVisitingCostsParameter.Name; 253 250 } 254 251 private void ParameterizeAnalyzer() {
Note: See TracChangeset
for help on using the changeset viewer.