Explore with PPSE

Suggest edits
Documentation > Explore

Example 🔗

Here is a use example of the PPSE method in an OpenMOLE script:

// Seed declaration for random number generation
val myseed = Val[Int]

val param1 = Val[Double]
val param2 = Val[Double]
val output1 = Val[Double]
val output2 = Val[Double]

// PSE method
PPSEEvolution(
  evaluation = modelTask,
  parallelism = 10,
  termination = 100,
  genome = Seq(
    param1  in (0.0 to 1.0),
    param2 in (-10.0 to 10.0)),
  objective = Seq(
    output1 in (0.0 to 40.0 by 5.0),
    output2 in (0.0 to 4000.0 by 50.0))
) hook (workDirectory / "results", frequency = 100)
Optionally you can define density distribution on you inputs:

// Seed declaration for random number generation
val myseed = Val[Int]

val param1 = Val[Double]
val param2 = Val[Double]
val output1 = Val[Double]
val output2 = Val[Double]

// PSE method
PPSEEvolution(
  evaluation = modelTask,
  parallelism = 10,
  termination = 100,
  genome = Seq(
    param1  in (0.0 to 1.0),
    param2 in (-10.0 to 10.0)),
  objective = Seq(
    output1 in (0.0 to 40.0 by 5.0),
    output2 in (0.0 to 4000.0 by 50.0)),
  density = Seq(
    param1 in NormalDistribution(2.0, 0.1),
    param2 in NormalDistribution(0.0, 1.0)
  )
) hook (workDirectory / "results", frequency = 100)