Changeset 12271 for branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState
- Timestamp:
- 03/31/15 13:18:59 (10 years ago)
- Location:
- branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/AlpsSsGeneticAlgorithm.cs
r12270 r12271 131 131 Parameters.Add(new FixedValueParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)", new BoolValue(false)) { Hidden = true }); 132 132 Parameters.Add(new ValueParameter<IntValue>("BatchSize", "Number of inner iterations before updates and analyzers are fired.", new IntValue(100)) { Hidden = true }); 133 AgeInheritance = new ReductionOperation(ReductionOperations.Min);134 133 135 134 var randomCreator = new RandomCreator(); … … 282 281 } 283 282 283 protected override ReductionOperations GetAgeInheritanceReduction(AgeInheritance ageInheritance) { 284 switch (ageInheritance) { 285 case ALPS.AgeInheritance.Older: return ReductionOperations.Min; 286 case ALPS.AgeInheritance.Agerage: return ReductionOperations.Avg; 287 case ALPS.AgeInheritance.Younger: return ReductionOperations.Max; 288 default: throw new NotSupportedException("AgeInheritance " + ageInheritance + " is not supported."); 289 } 290 } 291 284 292 protected override void ParameterizeStochasticOperator(IOperator @operator) { 285 293 var stochasticOperator = @operator as IStochasticOperator; -
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/AlpsSsGeneticAlgorithmMainOperator.cs
r12259 r12271 48 48 var mutator = new Placeholder() { Name = "Mutator (Placeholder)" }; 49 49 var ageReducer = new DataReducer() { Name = "Calculate EvalsCreated" }; 50 var lastMove Reducer = new DataReducer() { Name = "CalculateLastMove" };50 var lastMoveAssigner = new Assigner() { Name = "Set LastMove" }; 51 51 var subScopesRemover = new SubScopesRemover(); 52 52 var evaluator = new Placeholder() { Name = "Evaluator (Placeholder)" }; … … 71 71 72 72 ageReducer.ParameterToReduce.ActualName = "EvalsCreated"; 73 ageReducer.ReductionOperation.ActualName = "AgeInheritance ";73 ageReducer.ReductionOperation.ActualName = "AgeInheritanceReduction"; 74 74 ageReducer.ReductionOperation.Value = null; 75 75 ageReducer.TargetParameter.ActualName = "EvalsCreated"; 76 76 ageReducer.TargetOperation.Value = new ReductionOperation(ReductionOperations.Assign); 77 ageReducer.Successor = lastMove Reducer;77 ageReducer.Successor = lastMoveAssigner; 78 78 79 lastMoveReducer.ParameterToReduce.ActualName = "LastMove"; 80 lastMoveReducer.ReductionOperation.ActualName = "AgeInheritance"; 81 lastMoveReducer.ReductionOperation.Value = null; 82 lastMoveReducer.TargetParameter.ActualName = "LastMove"; 83 lastMoveReducer.TargetOperation.Value = new ReductionOperation(ReductionOperations.Assign); 84 lastMoveReducer.Successor = subScopesRemover; 79 lastMoveAssigner.LeftSideParameter.ActualName = "LastMove"; 80 lastMoveAssigner.RightSideParameter.ActualName = "EvaluatedSolutions"; 81 lastMoveAssigner.Successor = subScopesRemover; 85 82 86 83 subScopesRemover.Successor = evaluator;
Note: See TracChangeset
for help on using the changeset viewer.