Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/01/14 10:36:54 (10 years ago)
Author:
pfleck
Message:

#2208 Renamed FixedPenalty to PointVisitingCosts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Creators/GreedyOrienteeringTourCreator.cs

    r11319 r11320  
    5555      get { return (ILookupParameter<IntValue>)Parameters["TerminalPoint"]; }
    5656    }
    57     public ILookupParameter<DoubleValue> FixedPenaltyParameter {
    58       get { return (ILookupParameter<DoubleValue>)Parameters["FixedPenalty"]; }
     57    public ILookupParameter<DoubleValue> PointVisitingCostsParameter {
     58      get { return (ILookupParameter<DoubleValue>)Parameters["PointVisitingCosts"]; }
    5959    }
    6060    #endregion
     
    7373      Parameters.Add(new LookupParameter<IntValue>("StartingPoint", "Index of the starting point."));
    7474      Parameters.Add(new LookupParameter<IntValue>("TerminalPoint", "Index of the ending point."));
    75       Parameters.Add(new LookupParameter<DoubleValue>("FixedPenalty", "The penalty for each visited vertex."));
     75      Parameters.Add(new LookupParameter<DoubleValue>("PointVisitingCosts", "The costs for visiting a point."));
    7676    }
    7777
     
    8585      int numPoints = ScoresParameter.ActualValue.Length;
    8686      var distances = DistanceMatrixParameter.ActualValue;
    87       double fixedPenalty = FixedPenaltyParameter.ActualValue.Value;
     87      double pointVisitingCosts = PointVisitingCostsParameter.ActualValue.Value;
    8888      double maxDistance = MaximumDistanceParameter.ActualValue.Value;
    8989      var scores = ScoresParameter.ActualValue;
     
    9292      var feasiblePoints = (
    9393        from point in Enumerable.Range(0, numPoints)
    94         let distance = distances[startPoint, point] + distances[point, endPoint] + fixedPenalty
     94        let distance = distances[startPoint, point] + distances[point, endPoint] + pointVisitingCosts
    9595        let score = scores[point]
    9696        where distance <= maxDistance
     
    115115          for (int insertPosition = 1; insertPosition < tour.Count; insertPosition++) {
    116116            // Create the candidate tour
    117             double detour = distances.CalculateInsertionCosts(tour, insertPosition, feasiblePoints[i], fixedPenalty);
     117            double detour = distances.CalculateInsertionCosts(tour, insertPosition, feasiblePoints[i], pointVisitingCosts);
    118118
    119119            // If the insertion would be feasible, perform it
Note: See TracChangeset for help on using the changeset viewer.