Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/19/12 13:17:29 (12 years ago)
Author:
ascheibe
Message:

#1722 fixed more licensing information and source formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWEvaluator.cs

    r7276 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
     23using HeuristicLab.Common;
     24using HeuristicLab.Core;
     25using HeuristicLab.Data;
     26using HeuristicLab.Parameters;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2628using HeuristicLab.Problems.VehicleRouting.Interfaces;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using HeuristicLab.Core;
    29 using HeuristicLab.Parameters;
    30 using HeuristicLab.Data;
    31 using HeuristicLab.Optimization;
    32 using HeuristicLab.PluginInfrastructure;
    3329using HeuristicLab.Problems.VehicleRouting.Variants;
    34 using HeuristicLab.Problems.VehicleRouting.Encodings;
    35 using HeuristicLab.Common;
    3630
    3731namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances {
    3832  [Item("CVRPTWEvaluator", "Represents a single depot CVRPTW evaluator.")]
    3933  [StorableClass]
    40   public class CVRPTWEvaluator: CVRPEvaluator {
     34  public class CVRPTWEvaluator : CVRPEvaluator {
    4135    public ILookupParameter<DoubleValue> TardinessParameter {
    4236      get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
     
    5549      eval.InsertionInfo.AddTourInsertionInfo(tourInfo);
    5650      double originalQuality = eval.Quality;
    57      
     51
    5852      IHomogenousCapacitatedProblemInstance cvrpInstance = instance as IHomogenousCapacitatedProblemInstance;
    5953      DoubleArray demand = instance.Demand;
     
    111105          currentWaitingTime = readyTime[end] - time;
    112106
    113         double waitTime = readyTime[end]-time;
     107        double waitTime = readyTime[end] - time;
    114108
    115109        waitingTime += currentWaitingTime;
     
    225219          //arrive later than before, probably don't have to wait
    226220          if (nextStop.WaitingTime > 0) {
    227             additionalTime -= Math.Min(additionalTime, nextStop.WaitingTime);           
     221            additionalTime -= Math.Min(additionalTime, nextStop.WaitingTime);
    228222          }
    229223
     
    232226            double spare = nextStop.SpareTime - additionalTime;
    233227            if (spare < 0)
    234               tardiness += -spare; 
     228              tardiness += -spare;
    235229          } else {
    236230            tardiness += additionalTime;
     
    263257      TravelTimeParameter.ActualValue.Value = (tourEvaluation as CVRPTWEvaluation).TravelTime;
    264258    }
    265    
     259
    266260    [StorableConstructor]
    267261    protected CVRPTWEvaluator(bool deserializing) : base(deserializing) { }
Note: See TracChangeset for help on using the changeset viewer.