Interface Migration
- All Known Implementing Classes:
SingleNeighborMigration
public interface Migration
A migration strategy for an island model. Since each island can execute in separate threads or processes, be
mindful of thread safety.
Migrations execute in the same thread as the current island. Therefore, you can freely read and write to the current population without synchronization.
Each island has a thread-safe immigration queue. This stores the migrants that are arriving to the current island. Therefore, avoid reading or writing to any neighboring islands directly, use their immigration queue!
The migration code should also create copies of migrating solutions. By convention, this should be done when adding the solution to an immigration queue. This is especially important when running in a shared memory environment (threaded).
-
Method Summary
-
Method Details
-
migrate
Performs a single migration operation between the current island and its neighbors.- Parameters:
current
- the current islandneighbors
- the neighboring islands
-