- Timestamp:
- 11/25/14 03:26:00 (10 years ago)
- Location:
- branches/OptimizationNetworks
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks
- Property svn:mergeinfo changed
-
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVector.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCreator.cs
r10291 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCrossover.cs
r10291 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorManipulator.cs
r10291 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Creators/RandomBinaryVectorCreator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 using HeuristicLab.Core; 24 24 using HeuristicLab.Data; 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 … … 32 33 [StorableClass] 33 34 public sealed class RandomBinaryVectorCreator : BinaryVectorCreator { 35 private const string TrueProbabilityParameterName = "TruePropability"; 36 37 private IFixedValueParameter<DoubleValue> TrueProbabilityParameter { 38 get { return (IFixedValueParameter<DoubleValue>)Parameters[TrueProbabilityParameterName]; } 39 } 40 41 public double TrueProbability { 42 get { return TrueProbabilityParameter.Value.Value; } 43 set { TrueProbabilityParameter.Value.Value = value; } 44 } 45 34 46 [StorableConstructor] 35 47 private RandomBinaryVectorCreator(bool deserializing) : base(deserializing) { } 48 36 49 private RandomBinaryVectorCreator(RandomBinaryVectorCreator original, Cloner cloner) : base(original, cloner) { } 37 public RandomBinaryVectorCreator() : base() {}50 public override IDeepCloneable Clone(Cloner cloner) { return new RandomBinaryVectorCreator(this, cloner); } 38 51 39 public override IDeepCloneable Clone(Cloner cloner) { 40 return new RandomBinaryVectorCreator(this, cloner); 52 public RandomBinaryVectorCreator() 53 : base() { 54 Parameters.Add(new FixedValueParameter<DoubleValue>(TrueProbabilityParameterName, "Probability of true value", new DoubleValue(0.5))); 55 } 56 57 [StorableHook(HookType.AfterDeserialization)] 58 private void AfterDeserialization() { 59 if (!Parameters.ContainsKey(TrueProbabilityParameterName)) 60 Parameters.Add(new FixedValueParameter<DoubleValue>(TrueProbabilityParameterName, "Probability of true value", new DoubleValue(0.5))); 41 61 } 42 62 … … 46 66 /// <param name="random">The random number generator.</param> 47 67 /// <param name="length">The length of the binary vector.</param> 68 /// <param name="trueProbability">The propability for true to occur at a certain position in the binary vector</param> 48 69 /// <returns>The newly created binary vector.</returns> 49 public static BinaryVector Apply(IRandom random, int length) { 50 BinaryVector result = new BinaryVector(length, random); 70 public static BinaryVector Apply(IRandom random, int length, double trueProbability = 0.5) { 71 BinaryVector result; 72 73 //Backwards compatiblity code to ensure the same behavior for existing algorithm runs 74 //remove with HL 3.4 75 if (trueProbability.IsAlmost(0.5)) 76 result = new BinaryVector(length, random); 77 else { 78 var values = new bool[length]; 79 for (int i = 0; i < length; i++) 80 values[i] = random.NextDouble() < trueProbability; 81 result = new BinaryVector(values); 82 } 51 83 return result; 52 84 } 53 85 54 86 protected override BinaryVector Create(IRandom random, IntValue length) { 55 return Apply(random, length.Value );87 return Apply(random, length.Value, TrueProbability); 56 88 } 57 89 } -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/MultiBinaryVectorCrossover.cs
r10346 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/NPointCrossover.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/UniformCrossover.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorCreator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorCrossover.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorManipulator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorMoveOperator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorMultiNeighborhoodShakingOperator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorOperator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IOneBitflipMoveOperator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SinglePositionBitflipManipulator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SomePositionsBitflipManipulator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/ExhaustiveOneBitflipMoveGenerator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMove.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveAttribute.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveGenerator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveMaker.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveTabuChecker.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveTabuMaker.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/StochasticOneBitflipMultiMoveGenerator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/StochasticOneBitflipSingleMoveGenerator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneIndexMove.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Plugin.cs.frame
r10037 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 26 26 /// Plugin class for HeuristicLab.Encodings.BinaryVectorEncoding plugin. 27 27 /// </summary> 28 [Plugin("HeuristicLab.Encodings.BinaryVectorEncoding", "3.3. 9.$WCREV$")]28 [Plugin("HeuristicLab.Encodings.BinaryVectorEncoding", "3.3.10.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Encodings.BinaryVectorEncoding-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Collections", "3.3")] -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Properties/AssemblyInfo.cs.frame
r10037 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 3HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 54 54 // by using the '*' as shown below: 55 55 [assembly: AssemblyVersion("3.3.0.0")] 56 [assembly: AssemblyFileVersion("3.3. 9.$WCREV$")]56 [assembly: AssemblyFileVersion("3.3.10.$WCREV$")] -
branches/OptimizationNetworks/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/ShakingOperators/BinaryVectorShakingOperator.cs
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.