6 scalaVersion := "2.10.3"
8 libraryDependencies ++= Seq(
9 "asm" % "asm-all" % "3.3.1",
10 "org.picocontainer" % "picocontainer" % "2.13.6",
11 "org.nlogo" % "NetLogo" % "6.0.0-M3" from "http://ccl.northwestern.edu/devel/6.0.0-M3/NetLogo.jar",
12 "org.nlogo" % "NetLogoHeadless" % "6.0.0-M3" from "http://ccl.northwestern.edu/devel/6.0.0-M3/NetLogoHeadless.jar"
16 import org.nlogo.headless.HeadlessWorkspace
17 import org.nlogo.mirror
20 import org.nlogo.util.Utils.url2String
22 val workspace = HeadlessWorkspace.newInstance
23 workspace.silent = true
24 workspace.openFromSource(url2String(api.ModelReader.emptyModelPath))
25 workspace.runCompiledCommands(new api.SimpleJobOwner("test", workspace.world.mainRNG, api.AgentKind.Observer), workspace.compileCommands("resize-world -2 2 -2 2 crt 1", api.AgentKind.Observer))
26 mirror.Mirrorables.allMirrorables(workspace.world).map( x => {
28 System.out.print(x.kind)
30 System.out.print(x.agentKey.id)
31 System.out.print(" (")
32 x.kind.Variables.values.toSeq.map( k => {
33 System.out.print("(" + k + " ")
34 x.getVariable(k.id) match {
35 case s: java.lang.String => System.out.print("\"s\"")
36 case v => System.out.print(v)
38 System.out.print(") ")
40 System.out.println(")")