Changeset 8053 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift
- Timestamp:
- 06/19/12 13:17:29 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/IPotvinPDShiftMoveOperator.cs
r6773 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 using HeuristicLab.Optimization;25 23 using HeuristicLab.Problems.VehicleRouting.Interfaces; 26 24 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftExhaustiveMoveGenerator.cs
r7791 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Parameters;27 using System.Collections.Generic;28 27 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Common;30 28 using HeuristicLab.Problems.VehicleRouting.Variants; 31 29 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMove.cs
r7906 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 23 using HeuristicLab.Common; 22 24 using HeuristicLab.Core; 25 using HeuristicLab.Optimization; 23 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 24 using HeuristicLab.Encodings.PermutationEncoding;25 using HeuristicLab.Common;26 using System.Collections.Generic;27 27 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 using HeuristicLab.Data;29 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Optimization;31 using System;32 29 33 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 34 31 [Item("PotvinPDShiftMove", "Item that describes a shift move on a PDP representation.")] 35 32 [StorableClass] 36 public class PotvinPDShiftMove : Item, IVRPMove {33 public class PotvinPDShiftMove : Item, IVRPMove { 37 34 [Storable] 38 35 public IVRPEncoding Individual { get; protected set; } 39 36 40 37 [Storable] 41 38 public int City { get; protected set; } … … 46 43 [Storable] 47 44 public int Tour { get; protected set; } 48 49 public PotvinPDShiftMove(): base() { 45 46 public PotvinPDShiftMove() 47 : base() { 50 48 City = -1; 51 49 Tour = -1; -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveEvaluator.cs
r6773 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 using HeuristicLab. Encodings.PermutationEncoding;24 using HeuristicLab.Data; 24 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data;27 using HeuristicLab.Common;28 using HeuristicLab.Optimization;29 27 30 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 57 55 public PotvinPDShiftMoveEvaluator() 58 56 : base() { 59 57 Parameters.Add(new LookupParameter<PotvinPDShiftMove>("PotvinPDShiftMove", "The move that should be evaluated.")); 60 58 61 62 63 59 Parameters.Add(new LookupParameter<VariableCollection>("Memories", "The TS memory collection.")); 60 Parameters.Add(new ValueParameter<StringValue>("AdditionFrequencyMemoryKey", "The key that is used for the addition frequency in the TS memory.", new StringValue("AdditionFrequency"))); 61 Parameters.Add(new ValueParameter<DoubleValue>("Lambda", "The lambda parameter.", new DoubleValue(0.015))); 64 62 } 65 63 … … 79 77 80 78 UpdateEvaluation(newSolution); 81 } 79 } 82 80 } 83 81 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveGenerator.cs
r6773 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System;22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab. Optimization;24 using HeuristicLab.Parameters; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Parameters;27 using System.Collections.Generic;28 26 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Common;30 27 31 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 50 47 public PotvinPDShiftMoveGenerator() 51 48 : base() { 52 53 49 Parameters.Add(new LookupParameter<PotvinPDShiftMove>("PotvinPDShiftMove", "The moves that should be generated in subscopes.")); 50 Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes.")); 54 51 } 55 52 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveMaker.cs
r7906 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 22 24 using HeuristicLab.Core; 23 using HeuristicLab.Data;24 using HeuristicLab.Operators;25 25 using HeuristicLab.Optimization; 26 26 using HeuristicLab.Parameters; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common;29 using HeuristicLab.Problems.VehicleRouting.ProblemInstances;30 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 31 29 using HeuristicLab.Problems.VehicleRouting.Variants; 32 using System.Collections.Generic;33 30 34 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 49 46 public PotvinPDShiftMoveMaker() 50 47 : base() { 51 52 48 Parameters.Add(new LookupParameter<PotvinPDShiftMove>("PotvinPDShiftMove", "The moves that should be made.")); 49 } 53 50 54 51 public override IDeepCloneable Clone(Cloner cloner) { … … 74 71 if (problemInstance is IPickupAndDeliveryProblemInstance) { 75 72 IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance; 76 73 77 74 int location = pdp.GetPickupDeliveryLocation(move.City); 78 75 Tour oldTour2 = solution.Tours.Find(t => t.Stops.Contains(location)); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuCriterion.cs
r7791 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 49 49 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { 50 50 get { return (LookupParameter<IVRPProblemInstance>)Parameters["ProblemInstance"]; } 51 } 51 } 52 52 53 53 public ILookupParameter<ItemList<IItem>> TabuListParameter { … … 157 157 } 158 158 } 159 159 160 160 MoveTabuParameter.ActualValue = new BoolValue(isTabu); 161 161 return base.Apply(); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuMaker.cs
r7791 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 24 25 using HeuristicLab.Optimization.Operators; 25 26 using HeuristicLab.Parameters; 26 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 28 using HeuristicLab.Data;29 29 30 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 63 63 public PotvinPDShiftMoveTabuMaker() 64 64 : base() { 65 66 67 65 Parameters.Add(new LookupParameter<PotvinPDShiftMove>("PotvinPDShiftMove", "The moves that should be made.")); 66 Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move.")); 67 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 68 68 69 70 71 72 69 Parameters.Add(new LookupParameter<DoubleValue>("Distance", "The distance of the individual")); 70 Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload of the individual")); 71 Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness of the individual")); 72 Parameters.Add(new LookupParameter<IntValue>("PickupViolations", "The number of pickup violations.")); 73 73 } 74 74 … … 97 97 if (PickupViolationsParameter.ActualValue != null) 98 98 pickupViolations = PickupViolationsParameter.ActualValue.Value; 99 99 100 100 return new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness, pickupViolations); 101 101 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMultiMoveGenerator.cs
r6909 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 25 using HeuristicLab.Data; 24 26 using HeuristicLab.Optimization; 27 using HeuristicLab.Parameters; 25 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Parameters; 27 using System.Collections.Generic; 29 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Common;30 using HeuristicLab.Data;31 using HeuristicLab.Problems.VehicleRouting.Encodings.General;32 31 33 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftSingleMoveGenerator.cs
r7791 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; 26 using HeuristicLab.Parameters; 25 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Parameters;27 using System.Collections.Generic;28 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Common;30 using HeuristicLab.Data;31 using HeuristicLab.Problems.VehicleRouting.Encodings.General;32 29 using HeuristicLab.Problems.VehicleRouting.Variants; 33 30 … … 36 33 [StorableClass] 37 34 public sealed class PotvinPDShiftSingleMoveGenerator : PotvinPDShiftMoveGenerator, 38 ISingleMoveGenerator { 35 ISingleMoveGenerator { 39 36 public ILookupParameter<IRandom> RandomParameter { 40 37 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } … … 82 79 } else { 83 80 return null; 84 } 81 } 85 82 } 86 83
Note: See TracChangeset
for help on using the changeset viewer.