Package com.tnsai.coordination
Class MultiRoundContractNet.Builder
java.lang.Object
com.tnsai.coordination.MultiRoundContractNet.Builder
- Enclosing class:
MultiRoundContractNet
Builder for MultiRoundContractNet.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceptanceThreshold(double threshold) Sets the acceptance threshold (score below which a proposal is accepted).addContractor(com.tnsai.agents.Agent contractor) Adds a contractor agent.Adds a negotiation listener.build()Builds the MultiRoundContractNet.contractors(List<com.tnsai.agents.Agent> contractors) Sets the contractor agents.evaluator(MultiRoundContractNet.ProposalEvaluator evaluator) Sets the proposal evaluator.improvementThreshold(double threshold) Sets the improvement threshold (expected improvement per round).manager(com.tnsai.agents.Agent manager) Sets the manager agent.maxRounds(int maxRounds) Sets the maximum number of negotiation rounds.Sets the proposal source.proposalTimeout(Duration timeout) Sets the timeout for waiting for proposals.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
manager
Sets the manager agent. -
contractors
Sets the contractor agents. -
addContractor
Adds a contractor agent. -
maxRounds
Sets the maximum number of negotiation rounds. -
improvementThreshold
Sets the improvement threshold (expected improvement per round). For example, 0.1 means 10% improvement expected each round. -
acceptanceThreshold
Sets the acceptance threshold (score below which a proposal is accepted). -
proposalTimeout
Sets the timeout for waiting for proposals. -
evaluator
Sets the proposal evaluator. -
proposalRequester
public MultiRoundContractNet.Builder proposalRequester(MultiRoundContractNet.ProposalRequester requester) Sets the proposal source. Required: the protocol has no way to reach contractors by itself — building without a requester fails at construction rather than fabricating proposals (TAN-5893).- Since:
- 0.15.0
-
addListener
public MultiRoundContractNet.Builder addListener(MultiRoundContractNet.NegotiationListener listener) Adds a negotiation listener. -
build
Builds the MultiRoundContractNet.
-