- Timestamp:
- 02/10/15 09:57:29 (9 years ago)
- Location:
- branches/ALPS
- Files:
-
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS
- Property svn:mergeinfo changed
-
branches/ALPS/HeuristicLab.Encodings.IntegerVectorEncoding
- Property svn:mergeinfo changed
-
branches/ALPS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedBlendAlphaBetaCrossover.cs
r11171 r11975 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Optimization; 26 27 using HeuristicLab.Parameters; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 37 38 [Item("RoundedBlendAlphaBetaCrossover", "The rounded blend alpha beta crossover (BLX-a-b) for integer vectors is similar to the blend alpha crossover (BLX-a), but distinguishes between the better and worse of the parents. The interval from which to choose the new offspring can be extended beyond the better parent by specifying a higher alpha value, and beyond the worse parent by specifying a higher beta value. The new offspring is sampled uniformly in the extended range and rounded to the next feasible integer.")] 38 39 [StorableClass] 39 public class RoundedBlendAlphaBetaCrossover : BoundedIntegerVectorCrossover {40 public class RoundedBlendAlphaBetaCrossover : BoundedIntegerVectorCrossover, ISingleObjectiveOperator { 40 41 /// <summary> 41 42 /// Whether the problem is a maximization or minimization problem. -
branches/ALPS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedHeuristicCrossover.cs
r11171 r11975 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Optimization; 26 27 using HeuristicLab.Parameters; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 35 36 [Item("RoundedHeuristicCrossover", "The heuristic crossover produces offspring that extend the better parent in direction from the worse to the better parent.")] 36 37 [StorableClass] 37 public class RoundedHeuristicCrossover : BoundedIntegerVectorCrossover {38 public class RoundedHeuristicCrossover : BoundedIntegerVectorCrossover, ISingleObjectiveOperator { 38 39 /// <summary> 39 40 /// Whether the problem is a maximization or minimization problem. -
branches/ALPS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj
r11677 r11975 129 129 </Compile> 130 130 <Compile Include="Crossovers\RoundedUniformArithmeticCrossover.cs" /> 131 <Compile Include="IntegerVectorEncoding.cs" /> 131 132 <Compile Include="IntegerVectorOperator.cs" /> 132 133 <Compile Include="Interfaces\IBoundedIntegerVectorOperator.cs" /> -
branches/ALPS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorStdDevStrategyParameterOperator.cs
r11394 r11975 23 23 24 24 namespace HeuristicLab.Encodings.IntegerVectorEncoding { 25 public interface IIntegerVectorStdDevStrategyParameterOperator : I Item{25 public interface IIntegerVectorStdDevStrategyParameterOperator : IOperator { 26 26 } 27 27 } -
branches/ALPS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/ShakingOperators/IntegerVectorShakingOperator.cs
r11171 r11975 25 25 using HeuristicLab.Common; 26 26 using HeuristicLab.Core; 27 using HeuristicLab.Data; 27 28 using HeuristicLab.Optimization; 28 29 using HeuristicLab.Optimization.Operators; … … 37 38 [Item("IntegerVectorShakingOperator", "A shaking operator for VNS which uses available manipulation operators to perform the shaking.")] 38 39 [StorableClass] 39 public class IntegerVectorShakingOperator : ShakingOperator<IIntegerVectorManipulator>, IIntegerVectorMultiNeighborhoodShakingOperator, IStochasticOperator {40 public class IntegerVectorShakingOperator : ShakingOperator<IIntegerVectorManipulator>, IIntegerVectorMultiNeighborhoodShakingOperator, IStochasticOperator, IBoundedIntegerVectorOperator { 40 41 41 42 public ILookupParameter<IntegerVector> IntegerVectorParameter { … … 45 46 public ILookupParameter<IRandom> RandomParameter { 46 47 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 48 } 49 50 public IValueLookupParameter<IntMatrix> BoundsParameter { 51 get { return (IValueLookupParameter<IntMatrix>)Parameters["Bounds"]; } 47 52 } 48 53 … … 57 62 Parameters.Add(new LookupParameter<IntegerVector>("IntegerVector", "The integer vector to shake.")); 58 63 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator that will be used for stochastic shaking operators.")); 64 Parameters.Add(new ValueLookupParameter<IntMatrix>("Bounds", "A 2 column matrix specifying the lower and upper bound for each dimension. If there are less rows than dimension the bounds vector is cycled.")); 65 59 66 foreach (IIntegerVectorManipulator shaker in ApplicationManager.Manager.GetInstances<IIntegerVectorManipulator>().OrderBy(x => x.Name)) 60 67 if (!(shaker is ISelfAdaptiveManipulator)) Operators.Add(shaker); 68 } 69 70 [StorableHook(HookType.AfterDeserialization)] 71 private void AfterDeserialization() { 72 #region Backwards compatible code, remove with 3.4 73 if (!Parameters.ContainsKey("Bounds")) 74 Parameters.Add(new ValueLookupParameter<IntMatrix>("Bounds", "A 2 column matrix specifying the lower and upper bound for each dimension. If there are less rows than dimension the bounds vector is cycled.")); 75 #endregion 61 76 } 62 77
Note: See TracChangeset
for help on using the changeset viewer.