- Timestamp:
- 11/22/19 15:54:31 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProblemDefinitionScript.cs
r17363 r17366 63 63 } 64 64 void ISingleObjectiveProblemDefinition<TEncoding, TEncodedSolution>.Evaluate(ISingleObjectiveSolutionContext<TEncodedSolution> solutionContext, IRandom random, CancellationToken cancellationToken) { 65 double quality = CompiledProblemDefinition.Evaluate(solutionContext.EncodedSolution, random, cancellationToken); 66 solutionContext.EvaluationResult = new SingleObjectiveEvaluationResult(quality); 65 CompiledProblemDefinition.Evaluate(solutionContext, random, cancellationToken); 67 66 } 68 67 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/Templates/SingleObjectiveCombinedEncodingProblem_Template.cs
r16801 r17366 2 2 using System.Linq; 3 3 using System.Collections.Generic; 4 using System.Threading; 4 5 using HeuristicLab.Common; 5 6 using HeuristicLab.Core; … … 28 29 } 29 30 30 public override double Evaluate(CombinedSolution solution, IRandom random ) {31 public override double Evaluate(CombinedSolution solution, IRandom random, CancellationToken cancellationToken) { 31 32 // Use vars.yourVariable to access variables in the variable store i.e. yourVariable 32 33 var quality = 0.0; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/Templates/SingleObjectiveProblem_Template.cs
r13373 r17366 2 2 using System.Linq; 3 3 using System.Collections.Generic; 4 using System.Threading; 4 5 using HeuristicLab.Common; 5 6 using HeuristicLab.Core; … … 20 21 } 21 22 22 public override double Evaluate(SOLUTION_CLASS solution, IRandom random ) {23 public override double Evaluate(SOLUTION_CLASS solution, IRandom random, CancellationToken cancellationToken) { 23 24 // Use vars.yourVariable to access variables in the variable store i.e. yourVariable 24 25 var quality = 0.0;
Note: See TracChangeset
for help on using the changeset viewer.