Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/10/15 16:38:17 (9 years ago)
Author:
abeham
Message:

#2208:

  • Added missing license headers
  • Updates copyright year
  • Renamed analyzer (us spelling)
  • Removed script
  • Implemented samples unit test
  • Changed solution view to use horizontal splitting, removed viewhosts
  • Updated instance provider to use .NET45 zip compression
  • Restructuring and reformatting
Location:
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3

    • Property svn:ignore
      •  

        old new  
        22obj
        33Plugin.cs
         4*.DotSettings
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Creators/GreedyOrienteeringTourCreator.cs

    r11321 r12721  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3030
    3131namespace HeuristicLab.Problems.Orienteering {
    32   [Item("GreedyOrienteeringTourCreator", @"The initial solution for P-VNS is generated by means of a greedy algorithm that takes into
    33 account all vertices vi that are located within the cost limit Tmax. These points are sorted
    34 in descending order regarding the sum of their objective values. Afterwards, the algorithm
    35 starts with a tour only including the starting and ending point and successively inserts the
    36 points from this list at the first position in which they can feasibly be inserted. (Schilde et. al. 2009)")]
     32  /// <summary>
     33  /// The initial solution for P-VNS is generated by means of a greedy algorithm that takes into
     34  /// account all vertices vi that are located within the cost limit Tmax. These points are sorted
     35  /// in descending order regarding the sum of their objective values. Afterwards, the algorithm
     36  /// starts with a tour only including the starting and ending point and successively inserts the
     37  /// points from this list at the first position in which they can feasibly be inserted.
     38  /// (Schilde et. al. 2009)
     39  /// </summary>
     40  [Item("GreedyOrienteeringTourCreator", @"Implements the solution creation procedure described in Schilde M., Doerner K.F., Hartl R.F., Kiechle G. 2009. Metaheuristics for the bi-objective orienteering problem. Swarm Intelligence, Volume 3, Issue 3, pp 179-201.")]
    3741  [StorableClass]
    3842  public sealed class GreedyOrienteeringTourCreator : IntegerVectorCreator, IOrienteeringSolutionCreator {
     
    8084    }
    8185
    82     protected override IntegerVector Create(IRandom _, IntValue __, IntMatrix ___) {
     86    protected override IntegerVector Create(IRandom random, IntValue length, IntMatrix bounds) {
    8387      int startPoint = StartingPointParameter.ActualValue.Value;
    8488      int endPoint = TerminalPointParameter.ActualValue.Value;
     
    105109        endPoint
    106110      };
    107       double length = distances[startPoint, endPoint];
     111      double tourLength = distances[startPoint, endPoint];
    108112
    109113      // Add points in a greedy way
     
    118122
    119123            // If the insertion would be feasible, perform it
    120             if (length + detour <= maxDistance) {
     124            if (tourLength + detour <= maxDistance) {
    121125              tour.Insert(insertPosition, feasiblePoints[i]);
    122               length += detour;
     126              tourLength += detour;
    123127              feasiblePoints.RemoveAt(i);
    124128              insertionPerformed = true;
Note: See TracChangeset for help on using the changeset viewer.