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/Improvers/OrienteeringLocalImprovementOperator.cs

    r11319 r11320  
    5858      get { return (ILookupParameter<IntValue>)Parameters["TerminalPoint"]; }
    5959    }
    60     public ILookupParameter<DoubleValue> FixedPenaltyParameter {
    61       get { return (ILookupParameter<DoubleValue>)Parameters["FixedPenalty"]; }
     60    public ILookupParameter<DoubleValue> PointVisitingCostsParameter {
     61      get { return (ILookupParameter<DoubleValue>)Parameters["PointVisitingCosts"]; }
    6262    }
    6363    #region ILocalImprovementOperator Parameters
     
    9999      Parameters.Add(new LookupParameter<IntValue>("StartingPoint", "Index of the starting point."));
    100100      Parameters.Add(new LookupParameter<IntValue>("TerminalPoint", "Index of the ending point."));
    101       Parameters.Add(new LookupParameter<DoubleValue>("FixedPenalty", "The penalty for each visited vertex."));
     101      Parameters.Add(new LookupParameter<DoubleValue>("PointVisitingCosts", "The costs for visiting a point."));
    102102
    103103      Parameters.Add(new ValueLookupParameter<IntValue>("LocalIterations", "The number of iterations that have already been performed.", new IntValue(0)));
     
    119119      var distances = DistanceMatrixParameter.ActualValue;
    120120      var scores = ScoresParameter.ActualValue;
    121       double fixedPenalty = FixedPenaltyParameter.ActualValue.Value;
     121      double pointVisitingCosts = PointVisitingCostsParameter.ActualValue.Value;
    122122      double maxLength = MaximumDistanceParameter.ActualValue.Value;
    123123      int maxIterations = MaximumIterationsParameter.ActualValue.Value;
     
    129129      var tour = IntegerVectorParameter.ActualValue.ToList();
    130130
    131       double tourLength = distances.CalculateTourLength(tour, fixedPenalty);
     131      double tourLength = distances.CalculateTourLength(tour, pointVisitingCosts);
    132132      double tourScore = tour.Sum(point => scores[point]);
    133133
     
    148148        // Determine if any of the visitable points can be included at any position within the tour
    149149        IncludeNewPoints(tour, visitablePoints,
    150           distances, fixedPenalty, maxLength, scores,
     150          distances, pointVisitingCosts, maxLength, scores,
    151151          ref tourLength, ref tourScore, ref evaluations, ref optimizationDone);
    152152
     
    211211    }
    212212    private void IncludeNewPoints(List<int> tour, List<int> visitablePoints,
    213       DistanceMatrix distances, double fixedPenalty, double maxLength, DoubleArray scores,
     213      DistanceMatrix distances, double pointVisitingCosts, double maxLength, DoubleArray scores,
    214214      ref double tourLength, ref double tourScore, ref int evaluations, ref bool optimizationDone) {
    215215
     
    224224          evaluations++;
    225225
    226           double detour = distances.CalculateInsertionCosts(tour, tourPosition, visitablePoints[i], fixedPenalty);
     226          double detour = distances.CalculateInsertionCosts(tour, tourPosition, visitablePoints[i], pointVisitingCosts);
    227227
    228228          // Determine if including the point does not violate any constraint
Note: See TracChangeset for help on using the changeset viewer.