Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11193 for branches


Ignore:
Timestamp:
07/16/14 12:27:31 (10 years ago)
Author:
pfleck
Message:

#2208 Implemented OrienteeringLocalImprovementOperator.

Location:
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3
Files:
2 added
2 edited

Legend:

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

    r11192 r11193  
    6666    }
    6767
    68     public double CalculateInsertionCost(IList<int> path, int point, int insertPosition, double fixedPenalty) {
    69       double detour = this[path[insertPosition - 1], point] + this[point, path[insertPosition]];
     68    public double CalculateInsertionCosts(IList<int> path, int pointPosition, int insertPosition, double fixedPenalty) {
     69      double detour = this[path[insertPosition - 1], pointPosition] + this[pointPosition, path[insertPosition]];
    7070      detour += fixedPenalty;
    7171      detour -= this[path[insertPosition - 1], path[insertPosition]];
    7272      return detour;
    7373    }
     74
     75    public double CalculateReplacementCosts(List<int> path, int pointPosition, int replacementPosition) {
     76      double detour = this[pointPosition - 1, replacementPosition] + this[replacementPosition, pointPosition + 1];
     77      detour -= this[pointPosition - 1, pointPosition] + this[pointPosition, pointPosition + 1];
     78      return detour;
     79    }
    7480  }
    7581}
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/HeuristicLab.Problems.Orienteering-3.3.csproj

    r11191 r11193  
    4949    <Compile Include="Creators\GreedyOrienteeringTourCreator.cs" />
    5050    <Compile Include="DistanceMatrix.cs" />
     51    <Compile Include="Improvers\OrienteeringLocalImprovementOperator.cs" />
    5152    <Compile Include="Interfaces\IOrienteeringEvaluator.cs" />
    5253    <Compile Include="Evaluators\OrienteeringEvaluator.cs" />
Note: See TracChangeset for help on using the changeset viewer.