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 TypeMethodDescriptionvoid
body()
The agent body.void
createGoal
(Order order) Create a purchase or sell oder.protected void
generateNegotiationReport
(Order order, jadex.common.Tuple2<IBuyBookService, Integer>[] proposals, double acceptable_price) Generate and add a negotiation report.jadex.core.IComponent
getAgent()
Get the agent.getGoals()
Get all purchase or sell goals.Get all orders.getReports
(Order order) Get all reports.protected long
getTime()
Get the current time.protected void
void
shutdown()
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:INegotiationAgent
Get all orders.- Specified by:
getOrders
in 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:
getAgent
in interfaceINegotiationAgent
- Returns:
- The agent.
-
createGoal
Create a purchase or sell oder.- Specified by:
createGoal
in interfaceINegotiationAgent
-
getGoals
Get all purchase or sell goals.- Specified by:
getGoals
in interfaceINegotiationAgent
-
getReports
Get all reports.- Specified by:
getReports
in interfaceINegotiationAgent
-