|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjadex.bdi.planlib.protocols.ProposalEvaluator
public class ProposalEvaluator
A default implementation of the proposal evaluator interface. The implementation determines acceptable proposals by comparing proposals or evaluations to a given limit value.
The evaluation process implemented in the evaluateProposals() method is distributed across three methods, which can be separately overwritten if needed, while reusing functionality of the other methods.
| Field Summary | |
|---|---|
protected boolean |
ascending
Flag indicating if evaluations are rated ascending (the higher the better) or the other way round. |
static java.lang.String |
EVALUATION_ACCEPTABLE
Evaluation value indicating an acceptable proposal that should be considered in further negotiation rounds. |
protected java.util.Comparator |
evaluation_comparator
A comparator used for comparing evaluations. |
static java.lang.String |
EVALUATION_INACCEPTABLE
Evaluation value indicating an inacceptable proposal that should be excluded. |
protected java.lang.Object |
evaluation_limit
Limit determining the acceptability of an evaluation. |
| Constructor Summary | |
|---|---|
protected |
ProposalEvaluator()
Create a default proposal evaluator. |
|
ProposalEvaluator(java.util.Comparator evaluation_comparator,
java.lang.Object evaluation_limit,
boolean ascending)
Create a default proposal evaluator with a given limit value. |
|
ProposalEvaluator(java.lang.Object evaluation_limit,
boolean ascending)
Create a default proposal evaluator with a given limit value. |
| Method Summary | |
|---|---|
protected java.lang.Object |
evaluateProposal(java.lang.Object cfp,
java.lang.Object cfp_info,
NegotiationRecord[] history,
ParticipantProposal proposal)
Evaluate the given proposal. |
ParticipantProposal[] |
evaluateProposals(java.lang.Object cfp,
java.lang.Object cfp_info,
NegotiationRecord[] history,
ParticipantProposal[] proposals)
Evaluate the given proposals and determine winning proposals. |
protected boolean |
isProposalAcceptable(java.lang.Object cfp,
java.lang.Object cfp_info,
NegotiationRecord[] history,
ParticipantProposal proposal)
Check if a proposal is acceptable. |
protected ParticipantProposal[] |
orderAcceptables(java.lang.Object cfp,
java.lang.Object cfp_info,
NegotiationRecord[] history,
ParticipantProposal[] proposals)
Order acceptable proposals by preference. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String EVALUATION_INACCEPTABLE
public static final java.lang.String EVALUATION_ACCEPTABLE
protected java.util.Comparator evaluation_comparator
protected java.lang.Object evaluation_limit
protected boolean ascending
| Constructor Detail |
|---|
protected ProposalEvaluator()
public ProposalEvaluator(java.lang.Object evaluation_limit,
boolean ascending)
evaluation_limit - The limit specifying which proposals are acceptable.ascending - Sort order, which specifies that all evaluations below or equal (true)
or above or equal (false) to the limit are acceptable.
public ProposalEvaluator(java.util.Comparator evaluation_comparator,
java.lang.Object evaluation_limit,
boolean ascending)
evaluation_comparator - A comparator used to compare proposal evaluations.evaluation_limit - The limit specifying which proposals are acceptable.ascending - Sort order, which specifies that all evaluations below or equal (true)
or above or equal (false) to the limit are acceptable.| Method Detail |
|---|
public ParticipantProposal[] evaluateProposals(java.lang.Object cfp,
java.lang.Object cfp_info,
NegotiationRecord[] history,
ParticipantProposal[] proposals)
evaluateProposals in interface IProposalEvaluatorcfp - The original call-for-proposal object.cfp_info - Local meta information associated to the interaction.history - The history of negotiation rounds.proposals - The received proposals.
protected java.lang.Object evaluateProposal(java.lang.Object cfp,
java.lang.Object cfp_info,
NegotiationRecord[] history,
ParticipantProposal proposal)
cfp - The original call-for-proposal object.cfp_info - Local meta information associated to the interaction.history - The history of negotiation rounds.proposal - A received proposal.
protected boolean isProposalAcceptable(java.lang.Object cfp,
java.lang.Object cfp_info,
NegotiationRecord[] history,
ParticipantProposal proposal)
cfp - The original call-for-proposal object.cfp_info - Local meta information associated to the interaction.history - The history of negotiation rounds.proposal - A received proposal.
protected ParticipantProposal[] orderAcceptables(java.lang.Object cfp,
java.lang.Object cfp_info,
NegotiationRecord[] history,
ParticipantProposal[] proposals)
cfp - The original call-for-proposal object.cfp_info - Local meta information associated to the interaction.history - The history of negotiation rounds.proposals - The acceptable proposals.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||