Changeset 15973 for branches/2522_RefactorPluginInfrastructure/HeuristicLab.Problems.Scheduling/3.3/Evaluators
- Timestamp:
- 06/28/18 11:13:37 (6 years ago)
- Location:
- branches/2522_RefactorPluginInfrastructure
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2522_RefactorPluginInfrastructure
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Problems.Scheduling/3.3/Evaluators/MakespanEvaluator.cs
r12012 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Problems.Scheduling/3.3/Evaluators/MeanTardinessEvaluator.cs
r12012 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Problems.Scheduling/3.3/Evaluators/ScheduleEvaluator.cs
r12012 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Problems.Scheduling/3.3/Evaluators/SchedulingEvaluator.cs
r12012 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 26 26 using HeuristicLab.Encodings.ScheduleEncoding; 27 27 using HeuristicLab.Operators; 28 using HeuristicLab.Optimization; 28 29 using HeuristicLab.Parameters; 29 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 32 33 [Item("SchedulingEvaluator", "First applies the decoder operator to obtain a schedule from an encoding and then applies the evaluator to obtain a quality.")] 33 34 [StorableClass] 34 public class SchedulingEvaluator : InstrumentedOperator, ISchedulingEvaluator {35 public class SchedulingEvaluator : InstrumentedOperator, ISchedulingEvaluator, IStochasticOperator { 35 36 36 37 public IValueLookupParameter<IScheduleDecoder> ScheduleDecoderParameter { … … 49 50 get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; } 50 51 } 52 // ABE: This parameter exists purely, because some IScheduleDecoders are stochastic... 53 // ... which could be solved by letting the algorithm parameterize them ... 54 // ... but they have to use the same RNG as the evaluator (due to parallel execution)... 55 // ... in particular relevant for Island-GA and ALPS (Local- vs GlobalRandom). 56 public ILookupParameter<IRandom> RandomParameter { 57 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 58 } 51 59 52 60 [StorableConstructor] … … 58 66 Parameters.Add(new ValueLookupParameter<IScheduleEvaluator>("ScheduleEvaluator", "The actual schedule evaluation operator.")); 59 67 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value aka fitness value of the solution.")); 68 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use.")); 60 69 QualityParameter.Hidden = true; 61 70 } … … 63 72 public override IDeepCloneable Clone(Cloner cloner) { 64 73 return new SchedulingEvaluator(this, cloner); 74 } 75 76 [StorableHook(HookType.AfterDeserialization)] 77 private void AfterDeserialization() { 78 // BackwardsCompatibility3.3 79 #region Backwards compatible code, remove with 3.4 80 if (!Parameters.ContainsKey("Random")) { 81 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use.")); 82 } 83 #endregion 65 84 } 66 85
Note: See TracChangeset
for help on using the changeset viewer.