Free cookie consent management tool by TermsFeed Policy Generator

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

#1722 fixed more licensing information and source formatting

Location:
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW
Files:
6 edited

Legend:

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

    r6855 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.
     
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using HeuristicLab.Common;
    2823
    2924namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances {
     
    3833
    3934    public double ArrivalSpareCapacity {
    40       get { return arrivalSpareCapacity;  }
     35      get { return arrivalSpareCapacity; }
    4136    }
    4237
    43     public CVRPPDTWInsertionInfo(int start, int end, double spareCapacity, double tourStartTime, 
     38    public CVRPPDTWInsertionInfo(int start, int end, double spareCapacity, double tourStartTime,
    4439      double arrivalTime, double leaveTime, double spareTime, double waitingTime, List<int> visited, double arrivalSpareCapacity)
    4540      : base(start, end, spareCapacity, tourStartTime, arrivalTime, leaveTime, spareTime, waitingTime) {
    46         this.visited = visited;
    47         this.arrivalSpareCapacity = arrivalSpareCapacity;
     41      this.visited = visited;
     42      this.arrivalSpareCapacity = arrivalSpareCapacity;
    4843    }
    4944  }
    50  
    51   public class CVRPPDTWEvaluation: CVRPTWEvaluation {
     45
     46  public class CVRPPDTWEvaluation : CVRPTWEvaluation {
    5247    public int PickupViolations { get; set; }
    5348  }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPPDTW/CVRPPDTWEvaluator.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.
     
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
     24using HeuristicLab.Common;
     25using HeuristicLab.Core;
     26using HeuristicLab.Data;
     27using HeuristicLab.Parameters;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2629using 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;
    3330using HeuristicLab.Problems.VehicleRouting.Variants;
    34 using HeuristicLab.Problems.VehicleRouting.Encodings;
    35 using HeuristicLab.Common;
    3631
    3732namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances {
    3833  [Item("CVRPPDTWEvaluator", "Represents a single depot CVRPPDTW evaluator.")]
    3934  [StorableClass]
    40   public class CVRPPDTWEvaluator: CVRPTWEvaluator {
     35  public class CVRPPDTWEvaluator : CVRPTWEvaluator {
    4136    public ILookupParameter<IntValue> PickupViolationsParameter {
    4237      get { return (ILookupParameter<IntValue>)Parameters["PickupViolations"]; }
     
    119114        double arrivalSpareCapacity = capacity - currentLoad;
    120115
    121         bool validPickupDelivery = 
     116        bool validPickupDelivery =
    122117          validPickupDelivery =
    123118          ((demand[end] >= 0) ||
     
    134129
    135130        double spareCapacity = capacity - currentLoad;
    136         CVRPPDTWInsertionInfo stopInfo = new CVRPPDTWInsertionInfo(start, end, spareCapacity, tourStartTime, 
     131        CVRPPDTWInsertionInfo stopInfo = new CVRPPDTWInsertionInfo(start, end, spareCapacity, tourStartTime,
    137132          arrivalTime, time, spareTime, waitTime, new List<int>(stops.Keys), arrivalSpareCapacity);
    138133        tourInfo.AddStopInsertionInfo(stopInfo);
     
    172167    }
    173168
    174     protected override double GetTourInsertionCosts(IVRPProblemInstance instance, IVRPEncoding solution, TourInsertionInfo tourInsertionInfo, int index, int customer, 
     169    protected override double GetTourInsertionCosts(IVRPProblemInstance instance, IVRPEncoding solution, TourInsertionInfo tourInsertionInfo, int index, int customer,
    175170      out bool feasible) {
    176171      CVRPPDTWInsertionInfo insertionInfo = tourInsertionInfo.GetStopInsertionInfo(index) as CVRPPDTWInsertionInfo;
     
    309304      PickupViolationsParameter.ActualValue.Value = (tourEvaluation as CVRPPDTWEvaluation).PickupViolations;
    310305    }
    311    
     306
    312307    [StorableConstructor]
    313308    protected CVRPPDTWEvaluator(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPPDTW/CVRPPDTWProblemInstance.cs

    r7934 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.
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWEvaluation.cs

    r6855 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.
     
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using HeuristicLab.Common;
    2822
    2923namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances {
     
    3428      get { return tourStartTime; }
    3529    }
    36    
     30
    3731    private double arrivalTime;
    3832
     
    6155    public CVRPTWInsertionInfo(int start, int end, double spareCapacity, double tourStartTime, double arrivalTime, double leaveTime, double spareTime, double waitingTime)
    6256      : base(start, end, spareCapacity) {
    63         this.tourStartTime = tourStartTime;
    64         this.arrivalTime = arrivalTime;
    65         this.leaveTime = leaveTime;
    66         this.spareTime = spareTime;
    67         this.waitingTime = waitingTime;
     57      this.tourStartTime = tourStartTime;
     58      this.arrivalTime = arrivalTime;
     59      this.leaveTime = leaveTime;
     60      this.spareTime = spareTime;
     61      this.waitingTime = waitingTime;
    6862    }
    6963  }
    70  
    71   public class CVRPTWEvaluation: CVRPEvaluation {
     64
     65  public class CVRPTWEvaluation : CVRPEvaluation {
    7266    public double Tardiness { get; set; }
    7367    public double TravelTime { get; set; }
  • 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) { }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWProblemInstance.cs

    r7934 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.
Note: See TracChangeset for help on using the changeset viewer.