Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/20/11 13:53:07 (13 years ago)
Author:
svonolfe
Message:

Further improved performance (#1561)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/PotvinEncoding.cs

    r6449 r6450  
    7373      route = -1;
    7474      place = -1;
    75       bool bestFeasible = false;
    7675      double minDetour = 0;
    7776
     
    8685              capacity, distMatrix);
    8786
    88             if (!bestFeasible || feasible) {
     87            if (feasible) {
    8988              double newLength = Tours[tour].GetLength(distMatrix);
    9089              double detour = newLength - length;
    9190
    92               if (route <= 0 || detour < minDetour || (!(bestFeasible && !feasible)) && detour < minDetour || (feasible && !bestFeasible)) {
     91              if (route <= 0 || detour < minDetour) {
    9392                route = tour;
    9493                place = i;
    9594                minDetour = detour;
    96 
    97                 if (feasible)
    98                   bestFeasible = true;
    9995              }
    10096            }
Note: See TracChangeset for help on using the changeset viewer.