Package jadex.bdi.booktrading
Class BuyerAgent
java.lang.Object
jadex.bdi.booktrading.BuyerAgent
- All Implemented Interfaces:
INegotiationAgent
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbody()The agent body.voidcreateGoal(Order order) Create a purchase or sell oder.protected voidgenerateNegotiationReport(Order order, jadex.common.Tuple2<IBuyBookService, Integer>[] proposals, double acceptable_price) Generate and add a negotiation report.jadex.core.IComponentgetAgent()Get the agent.getGoals()Get all purchase or sell goals.Get all orders.getReports(Order order) Get all reports.protected longgetTime()Get the current time.protected voidvoidshutdown()Called when agent terminates.
-
Field Details
-
agent
protected jadex.core.IComponent agent -
reports
-
gui
-
-
Constructor Details
-
BuyerAgent
public BuyerAgent()
-
-
Method Details
-
body
public void body()The agent body. -
shutdown
public void shutdown()Called when agent terminates. -
getOrders
Description copied from interface:INegotiationAgentGet all orders.- Specified by:
getOrdersin interfaceINegotiationAgent
-
getTime
protected long getTime()Get the current time. -
purchaseBook
-
generateNegotiationReport
protected void generateNegotiationReport(Order order, jadex.common.Tuple2<IBuyBookService, Integer>[] proposals, double acceptable_price) Generate and add a negotiation report. -
getAgent
public jadex.core.IComponent getAgent()Get the agent.- Specified by:
getAgentin interfaceINegotiationAgent- Returns:
- The agent.
-
createGoal
Create a purchase or sell oder.- Specified by:
createGoalin interfaceINegotiationAgent
-
getGoals
Get all purchase or sell goals.- Specified by:
getGoalsin interfaceINegotiationAgent
-
getReports
Get all reports.- Specified by:
getReportsin interfaceINegotiationAgent
-