Changeset 16751 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable
- Timestamp:
- 04/03/19 15:37:38 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/CompiledMultiObjectiveOptimizationSupport.cs
r13372 r16751 5 5 public class CompiledMultiObjectiveOptimizationSupport : CompiledOptimizationSupport, IMultiObjectiveOptimizationSupport { 6 6 7 public void Analyze(I Solution[] individuals, double[][] qualities, ResultCollection results, IRandom random) {7 public void Analyze(IEncodedSolution[] individuals, double[][] qualities, ResultCollection results, IRandom random) { 8 8 // Use vars.yourVariable to access variables in the variable store i.e. yourVariable 9 9 // Write or update results given the range of vectors and resulting qualities -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/CompiledSingleObjectiveOptimizationSupport.cs
r13372 r16751 6 6 public class CompiledSingleObjectiveOptimizationSupport : CompiledOptimizationSupport, ISingleObjectiveOptimizationSupport { 7 7 8 public void Analyze(I Solution[] individuals, double[] qualities, ResultCollection results, IRandom random) {8 public void Analyze(IEncodedSolution[] individuals, double[] qualities, ResultCollection results, IRandom random) { 9 9 // Use vars.yourVariable to access variables in the variable store i.e. yourVariable 10 10 // Write or update results given the range of vectors and resulting qualities … … 17 17 } 18 18 19 public IEnumerable<I Solution> GetNeighbors(ISolution individual, IRandom random) {19 public IEnumerable<IEncodedSolution> GetNeighbors(IEncodedSolution individual, IRandom random) { 20 20 // Use vars.yourVariable to access variables in the variable store i.e. yourVariable 21 21 // Create new vectors, based on the given one that represent small changes … … 24 24 // Algorithm will draw only a finite amount of samples 25 25 // Change to a for-loop to return a concrete amount of neighbors 26 var neighbor = (I Solution)individual.Clone();26 var neighbor = (IEncodedSolution)individual.Clone(); 27 27 // For instance, perform a single bit-flip in a binary parameter 28 28 //var bIndex = random.Next(neighbor.BinaryVector("b").Length); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/MultiObjectiveOptimizationSupportScript.cs
r16723 r16751 39 39 } 40 40 41 void IMultiObjectiveOptimizationSupport.Analyze(I Solution[] individuals, double[][] qualities, ResultCollection results, IRandom random) {41 void IMultiObjectiveOptimizationSupport.Analyze(IEncodedSolution[] individuals, double[][] qualities, ResultCollection results, IRandom random) { 42 42 CompiledInstance.Analyze(individuals, qualities, results, random); 43 43 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Programmable/SingleObjectiveOptimizationSupportScript.cs
r16723 r16751 40 40 } 41 41 42 void ISingleObjectiveOptimizationSupport.Analyze(I Solution[] individuals, double[] qualities, ResultCollection results, IRandom random) {42 void ISingleObjectiveOptimizationSupport.Analyze(IEncodedSolution[] individuals, double[] qualities, ResultCollection results, IRandom random) { 43 43 CompiledInstance.Analyze(individuals, qualities, results, random); 44 44 } 45 45 46 IEnumerable<I Solution> ISingleObjectiveOptimizationSupport.GetNeighbors(ISolution individual, IRandom random) {46 IEnumerable<IEncodedSolution> ISingleObjectiveOptimizationSupport.GetNeighbors(IEncodedSolution individual, IRandom random) { 47 47 return CompiledInstance.GetNeighbors(individual, random); 48 48 }
Note: See TracChangeset
for help on using the changeset viewer.