fipaos.tutorial.emarkets.agent.seller.component
Class ComponentSellerAgent
fipaos.agent.FIPAOSAgent
|
+--fipaos.tutorial.emarkets.agent.SubscribingAgent
|
+--fipaos.tutorial.emarkets.agent.seller.SellerAgent
|
+--fipaos.tutorial.emarkets.agent.seller.component.ComponentSellerAgent
- public class ComponentSellerAgent
- extends SellerAgent
- implements SellerAbility
This class represents an Component Seller that wishes to sell finished components to a Manufacturer Buyer
Constructor Summary |
ComponentSellerAgent(String platform_profile, String name, String owner) Constructs a SellerAgent |
Method Summary |
NegotiationMessage | createCounterProposal(String buyer_id, NegotiationMessage proposal) If the negotiation has not finished and this seller wishes to send a new round of cfp's then this method is
called to create new cfp messages in reply to proposals from the buyers. |
NegotiationMessage | createInitialCFP() Generates the initial call for proposals to the Manufacturer Buyer agents |
void | evaluateBids() Algorithm to evaluate any received bids and decide whether a further iteration is needed |
void | initialiseOfferEngine() initialises the offers engine |
static void | main(String[] args) A main method to enable the agent to be run from the command line. |
synchronized void | shutdown() Attempts to unsubscribe from the market manager before shutting down the agent |
Methods inherited from class fipaos.tutorial.emarkets.agent.seller.SellerAgent |
dealWithEscrowProtocolFailure, dealWithEscrowProtocolInform, dealWithFIPASubscribeInform, dealWithFIPASubscribeRefuse, dealWithNegotiationProtocolPropose, doneEmarketsTimerTask, doneEscrowProtocolInitiatorHandlerTask, doneNegotiationProtocolInitiatorHandlerTask, getCredits, getItems, getTargetCredits, GUIClosed |
Methods inherited from class fipaos.agent.FIPAOSAgent |
activate, forward, forward, getAID, getCurrentConversation, getHAP, getLocalAMS, getLocalAMSAID, getLocalDF, getLocalDFAID, getNewConversation, getOwnership, getPlatformProfile, getProfile, getState, isShutdown, notify, notify, notifyDone, notifyError, notifyMessageInEndedConversation, notifyMessageUndeliverable, notifyTimeout, sendNotUnderstood, sendNotUnderstood, setMessageSender, waitForPushLock |
ComponentSellerAgent
public ComponentSellerAgent(String platform_profile, String name, String owner)
- Constructs a SellerAgent
- Parameters:
- platform_profile - The location of the platform profile
- name - The agent name
- owner - The owner of this agent
createCounterProposal
public NegotiationMessage createCounterProposal(String buyer_id, NegotiationMessage proposal)
- If the negotiation has not finished and this seller wishes to send a new round of cfp's then this method is
called to create new cfp messages in reply to proposals from the buyers.
- Parameters:
- buyer_id - The buyer that sent this proposal
- proposal - The proposal from the buyer containing the number of items that the buyer wishes to purchase,
and the price per item they wish to pay
- Returns: A new CFP containing a new price per item and number of items on offer to the buyer
createInitialCFP
public NegotiationMessage createInitialCFP()
- Generates the initial call for proposals to the Manufacturer Buyer agents
- Returns: A NegotiationMessage that contains the number of items on offer to each buyer and the price per item
evaluateBids
public void evaluateBids()
- Algorithm to evaluate any received bids and decide whether a further iteration is needed
initialiseOfferEngine
public void initialiseOfferEngine()
- initialises the offers engine
main
public static void main(String[] args)
- A main method to enable the agent to be run from the command line.
The agent takes two command line parameters - the platform profile location,
which is set up by the SetupFIPAOS.bat file to be in the system variable %PLATFORM%,
and the agent name.
- Parameters:
- args.
args[0] - = location of platform.profile
args[1] = name to assign to this agent
shutdown
public synchronized void shutdown()
- Attempts to unsubscribe from the market manager before shutting down the agent
to Class fipaos.tutorial.emarkets.agent.seller.offer.OfferEngine- Reference to an OfferEngine that can be instantiated with any object that implements the OfferEngine interface