Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/16/15 16:45:17 (9 years ago)
Author:
pfleck
Message:

#1674

  • ProtoBuff QualityMessages
    • Changed the QualityMessage to be able to be used for single- and multi-objective problems.
    • The new SingleObjectiveQualityMessage and MultiObjectiveQualityMessage now "inherits" from QualityMessages to be able to be used in a polymorph manner.
    • This is done via protobuf's nested extensions (see http://www.indelible.org/ink/protobuf-polymorphism/).
  • EvaluationCache
    • The EvaluationCache now now stores the QualityMessage instead of a single double. This way the cache can be used for single- and multi-objective problems and additionally opens the possibility to extend the quality message with any data. (previously extended data was lost when the cache was persisted and loaded again)
    • When deserializing an older version of the cache a new single objective quality message is created from the double value. This way, no compatibility is broken and version must not be incremented.
  • Adapted the ExternalEvaluationProblem to the changes of the EvaluationCache and the QualityMessage.
  • Added a MultiObjectiveExternalEvaluationProblem on basis of the ExternalEvaluationProblem and added a IExternalEvaluationProblem interface.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.4/Protos/ExternalEvaluationMessages.proto

    r8298 r13180  
    6464}
    6565
     66// Nested Extensions http://www.indelible.org/ink/protobuf-polymorphism/
    6667message QualityMessage {
    6768  required int32 solutionId = 1;
    68   required double quality = 2;
    69 
     69  enum Type {
     70    SingleObjectiveQualityMessage = 1;
     71    MultiObjectiveQualityMessage = 2;
     72  }
     73  required Type type = 2;
    7074  extensions 1000 to max;
    7175}
     76
     77message SingleObjectiveQualityMessage {
     78  extend QualityMessage {
     79    required SingleObjectiveQualityMessage qualityMessage = 1000;  // unique QualityMessage extension number
     80  }
     81  required double quality = 1;
     82}
     83message MultiObjectiveQualityMessage {
     84  extend QualityMessage {
     85    required MultiObjectiveQualityMessage qualityMessage = 1001;  // unique QualityMessage extension number
     86  }
     87  repeated double qualities = 1;
     88}
     89
    7290 
    7391service EvaluationService {
    74   rpc Evaluate (SolutionMessage) returns (QualityMessage);
     92  rpc EvaluateSingleObjective (SolutionMessage) returns (SingleObjectiveQualityMessage);
     93  rpc EvaluateMultiObjectives (SolutionMessage) returns (MultiObjectiveQualityMessage);
    7594}
Note: See TracChangeset for help on using the changeset viewer.