Package com.tnsai.coordination
Class Proposal
java.lang.Object
com.tnsai.coordination.Proposal
Represents a proposal from a contractor agent in the Contract-Net protocol.
Contractors submit proposals in response to a Call for Proposals (CFP).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleCalculates a score for this proposal based on cost, time, and confidence.doublecalculateScore(double maxCost, long maxTimeMs) Calculates a score with configurable normalization bounds.doubledoublegetCost()longtoString()
-
Constructor Details
-
Proposal
-
-
Method Details
-
calculateScore
public double calculateScore()Calculates a score for this proposal based on cost, time, and confidence. Uses default normalization bounds (maxCost=1000, maxTimeMs=60000). Lower score is better. -
calculateScore
public double calculateScore(double maxCost, long maxTimeMs) Calculates a score with configurable normalization bounds. Lower score is better.- Parameters:
maxCost- maximum expected cost for normalizationmaxTimeMs- maximum expected time in milliseconds for normalization- Returns:
- weighted score (40% cost, 30% time, 30% confidence)
-
getProposalId
-
getContractorId
-
getTaskId
-
getCost
public double getCost() -
getEstimatedTimeMs
public long getEstimatedTimeMs() -
getConfidence
public double getConfidence() -
getCapabilities
-
getSubmittedAt
-
toString
-