This module contains all the migration schemes and the distributed GA related functions.
New in version 0.6: The Migration module.
This is the base class for all migration schemes
Parameters: |
|
---|
Exchange individuals
Get the zlib compression level of network data
The values are in the interval described on the Network.pickleAndCompress()
Gets the group name
Note
all islands of evolution which are supposed to exchange individuals, must have the same group name.
Return the the generation frequency supposed to migrate and receive individuals
Return type: | the number of generations |
---|
Return the number of individuals that will migrate
Return type: | the number of individuals to be replaced |
---|
Return the number of individuals that will be replaced in the migration process
Returns true if is time to migrate
Pickes an individual from population using specific selection method
Return type: | an individual object |
---|
Select num_individuals number of individuals and return a pool
Parameters: |
|
---|---|
Return type: | list with individuals |
This is the function slot for the selection method if you want to change the default selector, you must do this:
migration_scheme.selector.set(Selectors.GRouletteWheel)
Set the zlib compression level of network data
The values are in the interval described on the Network.pickleAndCompress()
Parameters: |
|
---|
Sets the GA Engine handler
Sets the group name
Parameters: |
|
---|
Note
all islands of evolution which are supposed to exchange individuals, must have the same group name.
Sets the generation frequency supposed to migrate and receive individuals.
Parameters: |
|
---|
Which interface you will use to send/receive data
Parameters: |
|
---|
Set the number of individuals that will migrate
Parameters: |
|
---|
Return the number of individuals that will be replaced in the migration process
Parameters: |
|
---|
Initializes the migration scheme
Stops the migration engine
This is the Simple Migration class for distributed GA
>>> mig = WANMigration("192.168.0.1", "10000", "group1")
Parameters: |
|
---|
This is the main method, is where the individuals are exchanged
Get the zlib compression level of network data
The values are in the interval described on the Network.pickleAndCompress()
Gets the group name
Note
all islands of evolution which are supposed to exchange individuals, must have the same group name.
Return the the generation frequency supposed to migrate and receive individuals
Return type: | the number of generations |
---|
Return the number of individuals that will migrate
Return type: | the number of individuals to be replaced |
---|
Return the number of individuals that will be replaced in the migration process
Returns true if is time to migrate
Pickes an individual from population using specific selection method
Return type: | an individual object |
---|
Select num_individuals number of individuals and return a pool
Parameters: |
|
---|---|
Return type: | list with individuals |
This is the function slot for the selection method if you want to change the default selector, you must do this:
migration_scheme.selector.set(Selectors.GRouletteWheel)
Set the zlib compression level of network data
The values are in the interval described on the Network.pickleAndCompress()
Parameters: |
|
---|
Sets the GA Engine handler
Sets the group name
Parameters: |
|
---|
Note
all islands of evolution which are supposed to exchange individuals, must have the same group name.
Sets the generation frequency supposed to migrate and receive individuals.
Parameters: |
|
---|
Which interface you will use to send/receive data
Parameters: |
|
---|
Set the number of individuals that will migrate
Parameters: |
|
---|
Return the number of individuals that will be replaced in the migration process
Parameters: |
|
---|
Sets the topology of the migrations
Parameters: |
|
---|
Start capture of packets and initialize the migration scheme
Stops the migration engine