logist.behavior
Interface DeliberativeBehavior


public interface DeliberativeBehavior

The behavior of a deliberative agent.

Author:
Robin Steiger

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

setup

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.

The agent argument allows you to access important information about your agent, most notably:

Parameters:
topology - The topology of the simulation
distribution - The task distribution of the simulation
agent - The properties of the agent

plan

Plan plan(Vehicle vehicle,
          TaskSet tasks)
Computes the transportation plan for a vehicle.
In a single agent system, the agent can assume that the vehicle is carrying no tasks. In a multi-agent system this method might be called again during the execution of a plan (see planCancelled(logist.task.TaskSet) ).

Parameters:
vehicle - The vehicle that the agent is controlling
tasks - The list of tasks to be handled
Returns:
The plan for the vehicle

planCancelled

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) . 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.

Parameters:
carriedTasks - the tasks that the vehicle is holding