Island Distribution Scheme

Suggest edits
Documentation > Advanced Concepts

Contents

A custom distribution method 🔗

For distributed environments, the island distribution scheme is well adapted. Islands of population evolve for a while on a remote node. When an island is finished, its final population is merged back into a global archive. A new island is then generated until the termination criterion, i.e. the total number of islands to generate, is met.

The island scheme is used via the specific task Island to be added in the workflow. This task takes three parameters:
  • an evolution task method, which is the calibration task (SteadyStateEvolution in the example below), to be distributed on the nodes of the distributed environment
  • parallelism is the maximum number of concurrent islands
  • the termination criterion is the total number of evolutions performed by all the islands. It can be a number of evolution or a duration. In the example below, each island performs its evolution tasks for 5 minutes.
// Generate a workflow that orchestrates 100 concurrent islands.
// The workflow stops when 10,000 islands of 5 minutes have completed.
val evolution =
  NSGA2Evolution(
    genome = Seq(x in (0.0, 1.0), y in (0.0, 1.0)),
    objectives = Seq(o1, o2),
    evaluation = model,
    termination = 10000,
    parallelism = 100,
    distribution = Island(5 minutes)
  )

// Definition of a hook to save the population of solutions on the local machine running OpenMOLE
val savePopulation = SavePopulationHook(evolution, workDirectory / "evolution")

// Construction of the complete mole with the execution environment, and the hook.
// Here the generated workflow will run using 4 threads of the local machine.
(evolution on LocalEnvironment(4) hook savePopulation)