Commit 7e7af166 authored by Romain Reuillon's avatar Romain Reuillon
Browse files

Update market entry

parent 3c921a3b
......@@ -36,23 +36,20 @@ val aggregate =
val modelCapsule = Capsule(ants)
val evolution =
SteadyStateEvolution(
algorithm =
NSGA2(
mu = 10,
genome = Seq(gDiffusionRate in (0.0, 99.0), gEvaporationRate in (0.0, 99.0)),
objectives = Seq(obj),
stochastic = Stochastic(seed = seed)
),
NSGA2Evolution(
mu = 10,
genome = Seq(gDiffusionRate in (0.0, 99.0), gEvaporationRate in (0.0, 99.0)),
objectives = Seq(obj),
stochastic = Stochastic(seed = seed),
evaluation = modelCapsule -- aggregate,
parallelism = 10,
termination = 100
termination = 10000
)
// Define a hook to save the Pareto frontier
val savePopulationHook = SavePopulationHook(evolution, workDirectory / "calibration")
val env = LocalEnvironment(5)
val env = LocalEnvironment(4)
// Plug everything together to create the workflow
(evolution hook savePopulationHook on env)
import _file_.Calibrate._
// Define the population (200) and the computation time (1h)
// The remaining is the same as above
// Define the island model with 2,000 concurrent islands.
// The algorithm stops after 200,000 islands evaluations.
val evolution =
SteadyStateEvolution(
algorithm =
NSGA2(
mu = 200,
genome = Seq(gDiffusionRate in (0.0, 99.0), gEvaporationRate in (0.0, 99.0)),
objectives = Seq(obj),
stochastic = Stochastic(seed = seed)
),
NSGA2Evolution(
genome = Seq(gDiffusionRate in (0.0, 99.0), gEvaporationRate in (0.0, 99.0)),
objectives = Seq(obj),
stochastic = Stochastic(seed = seed),
evaluation = modelCapsule -- aggregate,
termination = 1 hour
parallelism = 2000,
termination = 2000000
distribution = Island(10 minutes)
)
// Define the island model with 2,000 concurrent islands.
// The algorithm stops after 200,000 islands evaluations.
val island = IslandEvolution(evolution, parallelism = 2000, termination = 200000)
val savePopulationHook = SavePopulationHook(island, workDirectory / "results")
val savePopulationHook = SavePopulationHook(evolution, workDirectory / "results")
// Define the execution environment
val env = LocalEnvironment(4)
// Define the workflow
(island on env hook savePopulationHook)
(evolution on env hook savePopulationHook)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment