Changeset 12969 for branches/gteufl/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinManipulator.cs
- Timestamp:
- 09/25/15 14:39:59 (9 years ago)
- Location:
- branches/gteufl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gteufl
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 25 obj
-
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
- Property svn:ignore
-
branches/gteufl/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
-
branches/gteufl/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinManipulator.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 55 55 protected abstract void Manipulate(IRandom random, PotvinEncoding individual); 56 56 57 protected int SelectRandomTourBiasedByLength(IRandom random, PotvinEncoding individual) {57 protected static int SelectRandomTourBiasedByLength(IRandom random, PotvinEncoding individual, IVRPProblemInstance instance) { 58 58 int tourIndex = -1; 59 59 … … 61 61 double[] probabilities = new double[individual.Tours.Count]; 62 62 for (int i = 0; i < individual.Tours.Count; i++) { 63 probabilities[i] = 1.0 / ((double)individual.Tours[i].Stops.Count / (double) ProblemInstance.Cities.Value);63 probabilities[i] = 1.0 / ((double)individual.Tours[i].Stops.Count / (double)instance.Cities.Value); 64 64 sum += probabilities[i]; 65 65 } … … 82 82 } 83 83 84 protected bool FindInsertionPlace(PotvinEncoding individual, int city, int routeToAvoid, bool allowInfeasible, out int route, out int place) {84 protected static bool FindInsertionPlace(PotvinEncoding individual, int city, int routeToAvoid, bool allowInfeasible, out int route, out int place) { 85 85 return individual.FindInsertionPlace( 86 86 city, routeToAvoid, allowInfeasible, out route, out place); 87 87 } 88 88 89 public override IOperation Apply() {89 public override IOperation InstrumentedApply() { 90 90 IVRPEncoding solution = VRPToursParameter.ActualValue; 91 91 if (!(solution is PotvinEncoding)) { … … 96 96 (VRPToursParameter.ActualValue as PotvinEncoding).Repair(); 97 97 98 return base. Apply();98 return base.InstrumentedApply(); 99 99 } 100 100 }
Note: See TracChangeset
for help on using the changeset viewer.