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/MultiDepotVRP/MDCVRP
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPEvaluator.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.
     
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
     22using HeuristicLab.Common;
     23using HeuristicLab.Core;
     24using HeuristicLab.Data;
     25using HeuristicLab.Parameters;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2627using 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;
    3328using HeuristicLab.Problems.VehicleRouting.Variants;
    34 using HeuristicLab.Problems.VehicleRouting.Encodings;
    35 using HeuristicLab.Common;
    3629
    3730namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances {
    3831  [Item("MDCVRPEvaluator", "Represents a multi depot CVRP evaluator.")]
    3932  [StorableClass]
    40   public class MDCVRPEvaluator: VRPEvaluator {
     33  public class MDCVRPEvaluator : VRPEvaluator {
    4134    public ILookupParameter<DoubleValue> OverloadParameter {
    4235      get { return (ILookupParameter<DoubleValue>)Parameters["Overload"]; }
     
    10396    }
    10497
    105     protected override double GetTourInsertionCosts(IVRPProblemInstance instance, IVRPEncoding solution, TourInsertionInfo tourInsertionInfo, int index, int customer, 
     98    protected override double GetTourInsertionCosts(IVRPProblemInstance instance, IVRPEncoding solution, TourInsertionInfo tourInsertionInfo, int index, int customer,
    10699      out bool feasible) {
    107100      CVRPInsertionInfo insertionInfo = tourInsertionInfo.GetStopInsertionInfo(index) as CVRPInsertionInfo;
    108      
     101
    109102      double costs = 0;
    110103      feasible = tourInsertionInfo.Penalty < double.Epsilon;
     
    120113        feasible = false;
    121114
    122         if(insertionInfo.SpareCapacity >= 0)
     115        if (insertionInfo.SpareCapacity >= 0)
    123116          costs += (demand - insertionInfo.SpareCapacity) * overloadPenalty;
    124117        else
    125118          costs += demand * overloadPenalty;
    126119      }
    127      
     120
    128121      return costs;
    129122    }
     
    140133      OverloadParameter.ActualValue.Value = (tourEvaluation as CVRPEvaluation).Overload;
    141134    }
    142    
     135
    143136    [StorableConstructor]
    144137    protected MDCVRPEvaluator(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPProblemInstance.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/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPPDTW/MDCVRPPDTWEvaluator.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("MDCVRPPDTWEvaluator", "Represents a multi depot CVRPPDTW evaluator.")]
    3934  [StorableClass]
    40   public class MDCVRPPDTWEvaluator: MDCVRPTWEvaluator {
     35  public class MDCVRPPDTWEvaluator : MDCVRPTWEvaluator {
    4136    public ILookupParameter<IntValue> PickupViolationsParameter {
    4237      get { return (ILookupParameter<IntValue>)Parameters["PickupViolations"]; }
     
    149144
    150145        double spareCapacity = capacity - currentLoad;
    151         CVRPPDTWInsertionInfo stopInfo = new CVRPPDTWInsertionInfo(start, end, spareCapacity, tourStartTime, 
     146        CVRPPDTWInsertionInfo stopInfo = new CVRPPDTWInsertionInfo(start, end, spareCapacity, tourStartTime,
    152147          arrivalTime, time, spareTime, waitTime, new List<int>(stops.Keys), arrivalSpareCapacity);
    153148        tourInfo.AddStopInsertionInfo(stopInfo);
     
    187182    }
    188183
    189     protected override double GetTourInsertionCosts(IVRPProblemInstance instance, IVRPEncoding solution, TourInsertionInfo tourInsertionInfo, int index, int customer, 
     184    protected override double GetTourInsertionCosts(IVRPProblemInstance instance, IVRPEncoding solution, TourInsertionInfo tourInsertionInfo, int index, int customer,
    190185      out bool feasible) {
    191186      CVRPPDTWInsertionInfo insertionInfo = tourInsertionInfo.GetStopInsertionInfo(index) as CVRPPDTWInsertionInfo;
     
    327322      PickupViolationsParameter.ActualValue.Value = (tourEvaluation as CVRPPDTWEvaluation).PickupViolations;
    328323    }
    329    
     324
    330325    [StorableConstructor]
    331326    protected MDCVRPPDTWEvaluator(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPPDTW/MDCVRPPDTWProblemInstance.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/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPTWEvaluator.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("MDCVRPTWEvaluator", "Represents a multi depot CVRPTW evaluator.")]
    3933  [StorableClass]
    40   public class MDCVRPTWEvaluator: MDCVRPEvaluator {
     34  public class MDCVRPTWEvaluator : MDCVRPEvaluator {
    4135    public ILookupParameter<DoubleValue> TardinessParameter {
    4236      get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
     
    130124        //service
    131125        double currentServiceTime = 0;
    132         if(end > 0)
     126        if (end > 0)
    133127          currentServiceTime = serviceTimes[end - 1];
    134128        serviceTime += currentServiceTime;
     
    193187        feasible = false;
    194188
    195         if(insertionInfo.SpareCapacity >= 0)
     189        if (insertionInfo.SpareCapacity >= 0)
    196190          costs += (demand - insertionInfo.SpareCapacity) * overloadPenalty;
    197191        else
     
    241235          //arrive later than before, probably don't have to wait
    242236          if (nextStop.WaitingTime > 0) {
    243             additionalTime -= Math.Min(additionalTime, nextStop.WaitingTime);           
     237            additionalTime -= Math.Min(additionalTime, nextStop.WaitingTime);
    244238          }
    245239
     
    248242            double spare = nextStop.SpareTime - additionalTime;
    249243            if (spare < 0)
    250               tardiness += -spare; 
     244              tardiness += -spare;
    251245          } else {
    252246            tardiness += additionalTime;
     
    279273      TravelTimeParameter.ActualValue.Value = (tourEvaluation as CVRPTWEvaluation).TravelTime;
    280274    }
    281    
     275
    282276    [StorableConstructor]
    283277    protected MDCVRPTWEvaluator(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPTWProblemInstance.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.