- Timestamp:
- 03/15/10 23:49:54 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Moves/TwoOpt
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Moves/TwoOpt/StochasticTwoOptMoveGenerator.cs
r3044 r3048 34 34 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 35 35 } 36 private ValueLookupParameter<Int Data> SampleSizeParameter {37 get { return (ValueLookupParameter<Int Data>)Parameters["SampleSize"]; }36 private ValueLookupParameter<IntValue> SampleSizeParameter { 37 get { return (ValueLookupParameter<IntValue>)Parameters["SampleSize"]; } 38 38 } 39 39 … … 41 41 : base() { 42 42 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator.")); 43 Parameters.Add(new ValueLookupParameter<Int Data>("SampleSize", "The number of moves to generate."));43 Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate.")); 44 44 } 45 45 -
trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Moves/TwoOpt/TwoOptMoveMaker.cs
r3044 r3048 32 32 [StorableClass] 33 33 public class TwoOptMoveMaker : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, IMoveMaker { 34 public ILookupParameter<Double Data> QualityParameter {35 get { return (LookupParameter<Double Data>)Parameters["Quality"]; }34 public ILookupParameter<DoubleValue> QualityParameter { 35 get { return (LookupParameter<DoubleValue>)Parameters["Quality"]; } 36 36 } 37 public ILookupParameter<Double Data> MoveQualityParameter {38 get { return (LookupParameter<Double Data>)Parameters["MoveQuality"]; }37 public ILookupParameter<DoubleValue> MoveQualityParameter { 38 get { return (LookupParameter<DoubleValue>)Parameters["MoveQuality"]; } 39 39 } 40 40 public ILookupParameter<TwoOptMove> TwoOptMoveParameter { … … 47 47 public TwoOptMoveMaker() 48 48 : base() { 49 Parameters.Add(new LookupParameter<Double Data>("Quality", "The quality of the solution."));49 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution.")); 50 50 Parameters.Add(new LookupParameter<TwoOptMove>("Move", "The move to evaluate.")); 51 Parameters.Add(new LookupParameter<Double Data>("MoveQuality", "The relative quality of the move."));51 Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move.")); 52 52 Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation.")); 53 53 } … … 56 56 TwoOptMove move = TwoOptMoveParameter.ActualValue; 57 57 Permutation permutation = PermutationParameter.ActualValue; 58 Double DatamoveQuality = MoveQualityParameter.ActualValue;59 Double Dataquality = QualityParameter.ActualValue;58 DoubleValue moveQuality = MoveQualityParameter.ActualValue; 59 DoubleValue quality = QualityParameter.ActualValue; 60 60 61 61 InversionManipulator.Apply(permutation, move.Index1, move.Index2); -
trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Moves/TwoOpt/TwoOptMoveTabuEvaluator.cs
r3044 r3048 41 41 get { return (LookupParameter<ItemList<IItem>>)Parameters["TabuList"]; } 42 42 } 43 public LookupParameter<Bool Data> MoveTabuParameter {44 get { return (LookupParameter<Bool Data>)Parameters["MoveTabu"]; }43 public LookupParameter<BoolValue> MoveTabuParameter { 44 get { return (LookupParameter<BoolValue>)Parameters["MoveTabu"]; } 45 45 } 46 46 private ScopeParameter CurrentScopeParameter { … … 51 51 : base() { 52 52 Parameters.Add(new LookupParameter<TwoOptMove>("Move", "The move to evaluate.")); 53 Parameters.Add(new LookupParameter<Bool Data>("MoveTabu", "The variable to store if a move was tabu."));53 Parameters.Add(new LookupParameter<BoolValue>("MoveTabu", "The variable to store if a move was tabu.")); 54 54 Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation.")); 55 55 Parameters.Add(new LookupParameter<ItemList<IItem>>("TabuList", "The tabu list.")); … … 83 83 } 84 84 } 85 MoveTabuParameter.ActualValue = new Bool Data(isTabu);85 MoveTabuParameter.ActualValue = new BoolValue(isTabu); 86 86 return base.Apply(); 87 87 } -
trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Moves/TwoOpt/TwoOptMoveTabuMaker.cs
r3044 r3048 41 41 get { return (LookupParameter<ItemList<IItem>>)Parameters["TabuList"]; } 42 42 } 43 public ValueLookupParameter<Int Data> TabuTenureParameter {44 get { return (ValueLookupParameter<Int Data>)Parameters["TabuTenure"]; }43 public ValueLookupParameter<IntValue> TabuTenureParameter { 44 get { return (ValueLookupParameter<IntValue>)Parameters["TabuTenure"]; } 45 45 } 46 46 … … 49 49 Parameters.Add(new LookupParameter<TwoOptMove>("Move", "The move that was made.")); 50 50 Parameters.Add(new LookupParameter<ItemList<IItem>>("TabuList", "The tabu list where move attributes are stored.")); 51 Parameters.Add(new ValueLookupParameter<Int Data>("TabuTenure", "The tenure of the tabu list."));51 Parameters.Add(new ValueLookupParameter<IntValue>("TabuTenure", "The tenure of the tabu list.")); 52 52 Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation.")); 53 53 } … … 56 56 ItemList<IItem> tabuList = TabuListParameter.ActualValue; 57 57 TwoOptMove move = TwoOptMoveParameter.ActualValue; 58 Int DatatabuTenure = TabuTenureParameter.ActualValue;58 IntValue tabuTenure = TabuTenureParameter.ActualValue; 59 59 Permutation permutation = PermutationParameter.ActualValue; 60 60
Note: See TracChangeset
for help on using the changeset viewer.