Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/26/10 15:18:42 (15 years ago)
Author:
abeham
Message:

#866

  • Updated external evaluation problem
  • Added some Drivers
  • Updated message
Location:
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IExternalEvaluationDriver.cs

    r3852 r3859  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Core;
     24using Google.ProtocolBuffers;
     25using Google.ProtocolBuffers.Descriptors;
    2326
    2427namespace HeuristicLab.Problems.ExternalEvaluation {
     
    3336    /// <remarks>
    3437    /// Must be called before calling <seealso cref="Send"/> or <seealso cref="Receive"/>.
    35     /// The concrete implementation of the driver may require additional information on how to start a connection.
     38    /// The concrete implementation of the driver may require additional information on how to start a connection,
     39    /// which should be passed into the concrete driver's constructor.
    3640    /// </remarks>
    3741    void Start();
    3842    /// <summary>
    39     /// Tells the driver to send a particular message.
     43    /// Evaluates a given solution in a blocking manner.
    4044    /// </summary>
    41     /// <param name="msg">The message that should be transmitted.</param>
    42     /// <remarks>
    43     /// This call is non-blocking, the message need not be received synchronously.
    44     /// </remarks>
    45     void Send(MainMessage msg);
     45    /// <param name="solution">The solution message that should be evaluated.</param>
     46    /// <returns>The resulting quality message from the external process.</returns>
     47    QualityMessage Evaluate(SolutionMessage solution);
    4648    /// <summary>
    47     /// Tells the driver to receive the next message.
     49    /// Evaluates a given solution in a non-blocking manner.
    4850    /// </summary>
    49     /// <exception cref="ConnectionTerminatedException">Thrown when the other client sent a message saying it will end the connection. In this case <see cref="Stop"/> is called automatically.</exception>
    50     /// <exception cref="NotSupportedException">Thrown when there is no notion of a "next" message for a given driver.</exception>
    51     /// <returns>The message that was received or null if no message is present.</returns>
    52     /// <remarks>
    53     /// This call is non-blocking and returns null if no message is present.
    54     /// </remarks>
    55     MainMessage Receive();
    56     /// <summary>
    57     /// Tells the driver to receive the next message of the type given in the parameter.
    58     /// </summary>
    59     /// <exception cref="NotSupportedException">Some implementations may not support receiving a specific message.</exception>
    60     /// <returns>The message that was received.</returns>
    61     /// <remarks>
    62     /// This call is non-blocking and returns null if no message is present.
    63     /// </remarks>
    64     /// <param name="messageDescriptor">The fullname of the descriptor for the message type to receive.</param>
    65     MainMessage Receive(MainMessage message);
     51    /// <param name="solution">The solution message that should be evaluated.</param>
     52    /// <param name="callback">The callback method that is invoked when evaluation is finished.</param>
     53    void EvaluateAsync(SolutionMessage solution, Action<QualityMessage> callback);
    6654    /// <summary>
    6755    /// Tells the driver to stop and terminate open connections.
Note: See TracChangeset for help on using the changeset viewer.