Skip to content

Class skydata::behaviour::migration::RandomMigrate

ClassList > skydata > behaviour > migration > RandomMigrate

More...

Inherits the following classes: SKAgentBehaviour

Public Functions

Type Name
RandomMigrate (SKAgent agent)
void action ()
SKAID getRandom (Set< SKAID > harbours)

Detailed Description

This strategy of migration aims to change harbour regularly.

To do that, regularly, the agent draw a random Harbour and migrate on it.

This behaviour use one parameter : * timer_RandomMigrate : an integer corresponding to delay (in ms) between two migrations

Public Functions Documentation

function RandomMigrate

inline skydata::behaviour::migration::RandomMigrate::RandomMigrate (
    SKAgent agent
) 

Add this behaviour to an agent

Parameters:

  • agent : the agent

function action

inline void skydata::behaviour::migration::RandomMigrate::action () 

Start the behaviour


function getRandom

inline SKAID skydata::behaviour::migration::RandomMigrate::getRandom (
    Set< SKAID > harbours
) 

Draw a random harbour

Parameters:

  • harbours : list of possible harbour

Returns:

the identity of the next harbour



The documentation for this class was generated from the following file /home/maxime/Desktop/skd_proto_v2/skd/src/main/java/skydata/behaviour/migration/RandomMigrate.java