Changeset 8053 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment
- Timestamp:
- 06/19/12 13:17:29 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/IPotvinVehicleAssignmentMoveOperator.cs
r6857 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/VehicleAssignment/PotvinVehicleAssignmentExhaustiveMoveGenerator.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; 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 31 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMove.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 HeuristicLab.Common; 22 23 using HeuristicLab.Core; 24 using HeuristicLab.Optimization; 23 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 24 using HeuristicLab.Encodings.PermutationEncoding;25 using HeuristicLab.Common;26 using System.Collections.Generic;27 26 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 using HeuristicLab.Data;29 27 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Optimization;31 28 32 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 33 30 [Item("PotvinVehicleAssignmentMove", "Item that describes a relocation move on a VRP representation.")] 34 31 [StorableClass] 35 public class PotvinVehicleAssignmentMove : Item, IVRPMove {32 public class PotvinVehicleAssignmentMove : Item, IVRPMove { 36 33 [Storable] 37 34 public IVRPEncoding Individual { get; protected set; } 38 35 39 36 [Storable] 40 37 public int Tour1 { get; protected set; } … … 43 40 public int Tour2 { get; protected set; } 44 41 45 46 public PotvinVehicleAssignmentMove(): base() { 42 43 public PotvinVehicleAssignmentMove() 44 : base() { 47 45 Tour1 = -1; 48 46 Tour2 = -1; … … 64 62 protected PotvinVehicleAssignmentMove(PotvinVehicleAssignmentMove original, Cloner cloner) 65 63 : base(original, cloner) { 66 67 64 this.Tour1 = original.Tour1; 65 this.Tour2 = original.Tour2; 68 66 69 67 this.Individual = cloner.Clone(Individual) as PotvinEncoding; -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveAttribute.cs
r6857 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. … … 45 45 protected PotvinVehicleAssignmentMoveAttribute(PotvinVehicleAssignmentMoveAttribute original, Cloner cloner) 46 46 : base(original, cloner) { 47 48 49 50 51 47 this.Tour = original.Tour; 48 this.Vehicle = original.Vehicle; 49 this.Distance = original.Distance; 50 this.Overload = original.Overload; 51 this.Tardiness = original.Tardiness; 52 52 } 53 53 public PotvinVehicleAssignmentMoveAttribute(double moveQuality, int tour, int vehicle, -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveEvaluator.cs
r6857 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 24 using HeuristicLab.Parameters; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data;27 using HeuristicLab.Common;28 using HeuristicLab.Optimization;29 26 30 27 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 45 42 public PotvinVehicleAssignmentMoveEvaluator() 46 43 : base() { 47 44 Parameters.Add(new LookupParameter<PotvinVehicleAssignmentMove>("PotvinVehicleAssignmentMove", "The move that should be evaluated.")); 48 45 } 49 46 … … 63 60 64 61 UpdateEvaluation(newSolution); 65 } 62 } 66 63 } 67 64 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveGenerator.cs
r6857 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 PotvinVehicleAssignmentMoveGenerator() 51 48 : base() { 52 53 49 Parameters.Add(new LookupParameter<PotvinVehicleAssignmentMove>("PotvinVehicleAssignmentMove", "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/VehicleAssignment/PotvinVehicleAssignmentMoveMaker.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 HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 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 using HeuristicLab.Problems.VehicleRouting.Variants;32 29 33 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 40 37 41 38 public override ILookupParameter VRPMoveParameter { 42 39 get { return VehicleAssignmentMoveParameter; } 43 40 } 44 41 45 42 public ILookupParameter<VariableCollection> MemoriesParameter { 46 get { return (ILookupParameter<VariableCollection>)Parameters["Memories"]; } 43 get { return (ILookupParameter<VariableCollection>)Parameters["Memories"]; } 47 44 } 48 45 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveTabuCriterion.cs
r6857 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 { … … 158 158 } 159 159 } 160 160 161 161 MoveTabuParameter.ActualValue = new BoolValue(isTabu); 162 162 return base.Apply(); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveTabuMaker.cs
r6857 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.Optimization.Operators; 24 using HeuristicLab.Data; 25 using HeuristicLab.Operators; 26 using HeuristicLab.Optimization; 25 27 using HeuristicLab.Parameters; 26 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 28 using HeuristicLab.Operators;29 using HeuristicLab.Data;30 using HeuristicLab.Optimization;31 30 32 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 50 49 } 51 50 52 51 53 52 public ILookupParameter<PotvinVehicleAssignmentMove> VehicleAssignmentMoveParameter { 54 53 get { return (ILookupParameter<PotvinVehicleAssignmentMove>)Parameters["PotvinVehicleAssignmentMove"]; } … … 85 84 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, else if it is a minimization problem.")); 86 85 87 88 89 86 Parameters.Add(new LookupParameter<PotvinVehicleAssignmentMove>("PotvinVehicleAssignmentMove", "The moves that should be made.")); 87 Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move.")); 88 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 90 89 91 92 93 90 Parameters.Add(new LookupParameter<DoubleValue>("Distance", "The distance of the individual")); 91 Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload of the individual")); 92 Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness of the individual")); 94 93 } 95 94 … … 128 127 tardiness = TardinessParameter.ActualValue.Value; 129 128 130 tabuList.Add(new PotvinVehicleAssignmentMoveAttribute(baseQuality, move.Tour1, move.Individual.GetVehicleAssignment(move.Tour1), 129 tabuList.Add(new PotvinVehicleAssignmentMoveAttribute(baseQuality, move.Tour1, move.Individual.GetVehicleAssignment(move.Tour1), 131 130 distance, overload, tardiness)); 132 131 tabuList.Add(new PotvinVehicleAssignmentMoveAttribute(baseQuality, move.Tour2, move.Individual.GetVehicleAssignment(move.Tour2), -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMultiMoveGenerator.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; 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 { … … 65 64 for (int i = 0; i < SampleSizeParameter.ActualValue.Value; i++) { 66 65 var move = PotvinVehicleAssignmentSingleMoveGenerator.Apply(individual, ProblemInstance, RandomParameter.ActualValue); 67 if (move != null)66 if (move != null) 68 67 result.Add(move); 69 68 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentSingleMoveGenerator.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; 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 33 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 43 40 44 41 #endregion 45 42 46 43 public ILookupParameter<IRandom> RandomParameter { 47 44 get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
Note: See TracChangeset
for help on using the changeset viewer.