Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/10/10 13:00:54 (14 years ago)
Author:
svonolfe
Message:

Improved performance of PotvinEncoding(#1177)

Location:
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPEvaluator.cs

    r4377 r4378  
    7373      eval.Quality += instance.DistanceFactor.Value * distance;
    7474
    75       eval.Distance = distance;
    76       eval.VehicleUtilization = 1;
     75      eval.Distance += distance;
     76      eval.VehicleUtilization += 1;
    7777
    7878      double capacity = cvrpInstance.Capacity.Value;
     
    8181      }
    8282
    83       (eval as CVRPEvaluation).Overload = overweight;
     83      (eval as CVRPEvaluation).Overload += overweight;
    8484      double penalty = overweight * cvrpInstance.OverloadPenalty.Value;
    8585      eval.Penalty += penalty;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWEvaluator.cs

    r4377 r4378  
    101101      eval.Quality += instance.FleetUsageFactor.Value;
    102102      eval.Quality += instance.DistanceFactor.Value * distance;
    103       eval.Distance = distance;
    104       eval.VehicleUtilization = 1;
     103      eval.Distance += distance;
     104      eval.VehicleUtilization += 1;
    105105
    106106      double capacity = cvrpInstance.Capacity.Value;
     
    109109      }
    110110
    111       (eval as CVRPEvaluation).Overload = overweight;
     111      (eval as CVRPEvaluation).Overload += overweight;
    112112      double penalty = overweight * cvrpInstance.OverloadPenalty.Value;
    113113      eval.Penalty += penalty;
    114114      eval.Quality += penalty;
    115115
    116       (eval as CVRPTWEvaluation).Tardiness = tardiness;
    117       (eval as CVRPTWEvaluation).TravelTime = time;
     116      (eval as CVRPTWEvaluation).Tardiness += tardiness;
     117      (eval as CVRPTWEvaluation).TravelTime += time;
    118118
    119119      penalty = tardiness * vrptw.TardinessPenalty.Value;
Note: See TracChangeset for help on using the changeset viewer.