Module agents :: Class AgentJoiningPatrolStrategy
[hide private]
[frames] | no frames]

Class AgentJoiningPatrolStrategy

source code


Implements an agent that waits for some time, then joins a coordinated patrol - this is why it is a coordinated patrol

Instance Methods [hide private]
 
__init__(self, agentIndex, patrolPoints, edgeLengths, rulesOfTheSea)
Initializes the strategy.
source code
 
composeAction(self, agentWorldModel)
Given the (inferred) state of the world, decide on a set of actions.
source code

Inherited from AgentCoordinatedPatrolStrategy: allReachedStartingPoints, assignShipsToStates, getPath, processIncomingMsgs, processMsgPatrolDivision, processMsgPosition, processMsgReachedStart, processMsgStart, recordStatistics, reset, setNavigationTactic

Inherited from AgentStrategy: getOutgoingMessage, transmit

Class Variables [hide private]

Inherited from AgentCoordinatedPatrolStrategy: COMPUTE_PATROL_ASSIGNMENTS_AND_TRANSMIT, MOVING_TO_START, PATROLING, TRANSMIT_INITIAL_LOCATION, VOTE

Method Details [hide private]

__init__(self, agentIndex, patrolPoints, edgeLengths, rulesOfTheSea)
(Constructor)

source code 

Initializes the strategy.

Parameters:
  • agentIndex (int) - sort of an agent-id - an agent's index in the array of all agents
  • agentIndex (int) - the name of the file containing edges and nodes from measurements data
  • rulesOfTheSea (boolean) - Tells whether to respect the rules of the sea
Overrides: AgentStrategy.__init__

composeAction(self, agentWorldModel)

source code 

Given the (inferred) state of the world, decide on a set of actions.

Overrides: AgentStrategy.composeAction
(inherited documentation)