|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DeliberativeBehavior
The behavior of a deliberative agent.
| Method Summary | |
|---|---|
Plan |
plan(Vehicle vehicle,
TaskSet tasks)
Computes the transportation plan for a vehicle. |
void |
planCancelled(TaskSet carriedTasks)
In a multi-agent system the plan of an agent might get 'stuck' in which case this method is called followed by a call to plan(logist.simulation.Vehicle, logist.task.TaskSet)
. |
void |
setup(Topology topology,
TaskDistribution distribution,
Agent agent)
The setup method is called exactly once, before the simulation starts and before any other method is called. |
| Method Detail |
|---|
void setup(Topology topology,
TaskDistribution distribution,
Agent agent)
The agent argument allows you to access important information about your agent, most notably:
Agent.vehicles() the list of vehicles controlled
by the agentAgent.getTasks() the set of tasks that the agent
has accepted but not yet delivered
topology - The topology of the simulationdistribution - The task distribution of the simulationagent - The properties of the agent
Plan plan(Vehicle vehicle,
TaskSet tasks)
planCancelled(logist.task.TaskSet)
).
vehicle - The vehicle that the agent is controllingtasks - The list of tasks to be handled
void planCancelled(TaskSet carriedTasks)
plan(logist.simulation.Vehicle, logist.task.TaskSet)
. The argument carriedTasks is the set of task that the vehicle has
picked up but not yet delivered. These tasks have to be considered the
next time a plan is computed.
You can also use Vehicle.getCurrentTasks() to
obtain the set of tasks that the vehicle is holding.
carriedTasks - the tasks that the vehicle is holding
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||