X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=clnl;a=blobdiff_plain;f=bin%2Fruncmd.scala;h=1e7987b94d5c8055d7012a8baac4be40b16fe547;hp=916a56cbfaf4e4eb71743d47dc71b0f09c6e54ab;hb=6c59eecb1168aa02dd44efa6f416a77117e968ce;hpb=b398914bb75f7d9ac9b1d19076e98338281900b0 diff --git a/bin/runcmd.scala b/bin/runcmd.scala index 916a56c..1e7987b 100755 --- a/bin/runcmd.scala +++ b/bin/runcmd.scala @@ -22,6 +22,7 @@ import org.nlogo.util.Utils.url2String val workspace = HeadlessWorkspace.newInstance workspace.silent = true workspace.openFromSource(url2String(api.ModelReader.emptyModelPath)) +/* 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)) mirror.Mirrorables.allMirrorables(workspace.world).map( x => { System.out.print("(") @@ -39,6 +40,15 @@ mirror.Mirrorables.allMirrorables(workspace.world).map( x => { }) System.out.println(")") - }) + })*/ + +workspace.runCompiledCommands(new api.SimpleJobOwner("test", workspace.world.mainRNG, api.AgentKind.Observer), workspace.compileCommands("random-seed 15", api.AgentKind.Observer)) +for(_ <- 1 to 40) + System.out.println(workspace.runCompiledReporter(new api.SimpleJobOwner("test", workspace.world.mainRNG, api.AgentKind.Observer), workspace.compileReporter("random-float 30"))) + +val m = new org.nlogo.util.MersenneTwisterFast(); +m.setSeed(15); +for(_ <- 1 to 40) + System.out.println(30d * m.nextDouble()) workspace.dispose