Skip to content

Instantly share code, notes, and snippets.

@chasset
Last active May 23, 2017 12:30
Show Gist options
  • Save chasset/7132a4e00c3b0c0ecdd565f8052e0a78 to your computer and use it in GitHub Desktop.
Save chasset/7132a4e00c3b0c0ecdd565f8052e0a78 to your computer and use it in GitHub Desktop.
val density = Val[Double]
val seed = Val[Int]
val burned = Val[Double]
val cmds =
List(
"random-seed ${seed}",
"setup",
"while [any? turtles] [go]"
)
val fireTask =
NetLogo6Task(workDirectory / "Fire.nlogo", cmds) set (
inputs += seed,
outputs += (seed, density),
netLogoInputs += (density, "density"),
netLogoOutputs += ("burned-trees", burned)
)
val csvHook = CSVHook(workDirectory / "result.csv", density, burned, seed)
val env = SLURMEnvironment(
login0,
domain0,
port = port0
)
val exploration =
DirectSampling(
evaluation = Replication(fireTask hook csvHook on env, seed, 100),
sampling = density in (20.0 to 80.0 by 1.0)
)
exploration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment