logist.agent
Class AgentImpl

java.lang.Object
  extended by logist.agent.AgentImpl
All Implemented Interfaces:
VehicleController

public abstract class AgentImpl
extends java.lang.Object
implements VehicleController

An agent in the pickup and delivery problem.

The concrete behavior of an agent is defined by a logist.behavior class.

Author:
Robin Steiger

Nested Class Summary
static class AgentImpl.Type
           
 
Method Summary
abstract  java.lang.Long askBid(Task task)
           
 void beginRound(TaskSet empty)
           
static AgentImpl forClass(java.lang.String agentName, java.util.Map<java.lang.String,java.lang.String> map, java.lang.Class<?> behavior)
           
 Agent getInfo()
           
 java.util.List<VehicleImpl> getVehicles()
           
 void notifyResult(Task previous, int winner, java.lang.Long[] offers)
           
 void setup(int id, Context sim, Company company)
           
 java.lang.String toString()
           
abstract  AgentImpl.Type type()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface logist.simulation.VehicleController
nextAction, stuckAction
 

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setup

public void setup(int id,
                  Context sim,
                  Company company)

beginRound

public void beginRound(TaskSet empty)

askBid

public abstract java.lang.Long askBid(Task task)

notifyResult

public void notifyResult(Task previous,
                         int winner,
                         java.lang.Long[] offers)

getVehicles

public java.util.List<VehicleImpl> getVehicles()

getInfo

public Agent getInfo()

forClass

public static AgentImpl forClass(java.lang.String agentName,
                                 java.util.Map<java.lang.String,java.lang.String> map,
                                 java.lang.Class<?> behavior)

type

public abstract AgentImpl.Type type()