- Timestamp:
- 12/18/19 16:11:21 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/SingleObjectiveExternalEvaluationProblem.cs
r17363 r17382 105 105 106 106 #region Single Objective Problem Overrides 107 public override doubleEvaluate(TEncodedSolution solution, IRandom random, CancellationToken cancellationToken) {107 public override ISingleObjectiveEvaluationResult Evaluate(TEncodedSolution solution, IRandom random, CancellationToken cancellationToken) { 108 108 var qualityMessage = Evaluate(BuildSolutionMessage(solution), cancellationToken); 109 109 if (!qualityMessage.HasExtension(SingleObjectiveQualityMessage.QualityMessage_)) 110 110 throw new InvalidOperationException("The received message is not a SingleObjectiveQualityMessage."); 111 return qualityMessage.GetExtension(SingleObjectiveQualityMessage.QualityMessage_).Quality; 111 var quality = qualityMessage.GetExtension(SingleObjectiveQualityMessage.QualityMessage_).Quality; 112 return new SingleObjectiveEvaluationResult(quality); 113 112 114 } 113 115 public virtual QualityMessage Evaluate(SolutionMessage solutionMessage, CancellationToken cancellationToken) {
Note: See TracChangeset
for help on using the changeset viewer.