Interface MultiRoundContractNet.ProposalRequester

Enclosing class:
MultiRoundContractNet
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface MultiRoundContractNet.ProposalRequester
Source of contractor proposals. The protocol cannot reach contractors on its own — callers supply the messaging mechanism (TAN-5893). The protocol stops waiting after timeout; implementations should also apply that cap to their transport and respond to interruption so timed-out work is released promptly.
Since:
0.15.0
  • Method Details

    • request

      Proposal request(com.tnsai.agents.Agent contractor, MultiRoundContractNet.NegotiationTask task, int round, double targetScore, Duration timeout)
      Requests a proposal from a contractor.
      Parameters:
      contractor - the contractor agent to ask
      task - the task being negotiated
      round - current negotiation round (1-based)
      targetScore - score the manager is aiming for this round (Double.MAX_VALUE in round 1)
      timeout - maximum time to wait for the answer
      Returns:
      the contractor's proposal, or null to decline. The proposal must carry task's id and contractor's id; a proposal naming a different task or contractor is dropped with a warning and never reaches the award decision.