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: |
|
---|
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 |
---|
Pickes an individual from population using specific selection method
Return type: | an individual object |
---|
Select num_individuals number of individuals and return a pool
Parameter: | num_individuals – the number of individuals to select |
---|---|
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()
Parameter: | level – the zlib compression level |
---|
Sets the group name
Parameter: | name – the group name |
---|
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.
Parameter: | generations – the number of generations |
---|
Which interface you will use to send/receive data
Parameters: |
|
---|
Set the number of individuals that will migrate
Parameter: | num_individuals – the number of individuals |
---|
Return the number of individuals that will be replaced in the migration process
Parameter: | num_individuals – the number of individuals to be replaced |
---|
This is the Simple Migration class for distributed GA
>>> mig = WANMigration("192.168.0.1", "10000", "group1")
Parameters: |
|
---|
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 |
---|
Pickes an individual from population using specific selection method
Return type: | an individual object |
---|
Select num_individuals number of individuals and return a pool
Parameter: | num_individuals – the number of individuals to select |
---|---|
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()
Parameter: | level – the zlib compression level |
---|
Sets the group name
Parameter: | name – the group name |
---|
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.
Parameter: | generations – the number of generations |
---|
Which interface you will use to send/receive data
Parameters: |
|
---|
Set the number of individuals that will migrate
Parameter: | num_individuals – the number of individuals |
---|
Return the number of individuals that will be replaced in the migration process
Parameter: | num_individuals – the number of individuals to be replaced |
---|
Sets the topology of the migrations
Parameter: | graph – the Util.Graph instance |
---|