具有表扩展名的无头行为空间 [英] Headless Behavior Space with table extension

查看:82
本文介绍了具有表扩展名的无头行为空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有一个使用netlogo界面完成的项目.

I currently have a project that I've completed using the netlogo interface.

我的项目包含多个.nls文件,而我的.nls文件之一使用表扩展名.我创建了一个行为空间实验,并为简单起见将其命名为实验.

My project includes multiple .nls files and one of my .nls files use the table extension. I've created a behavior space experiment and named it experiment for simplicity.

我正在尝试在Netlogo.jar所在的Netlogo应用程序目录中使用以下命令无头运行实验.

I'm trying to run the experiment headless using the following commands in my Netlogo application's directory where the Netlogo.jar is located.

java -Xmx1024m -Dfile.encoding=UTF-8 -cp ./Netlogo.jar org.nlogo.headless.Main --model /path/to/file/experiment.nlogo --experiment experiment  --table /path/to/output/table-output.csv --spreadsheet /path/to/output/spreadsheet-output.csv 

我收到以下错误.看来我无法从.nls文件检测到我的扩展名.该如何解决?

I'm getting the following error. It seems that I can't detect my extension from the .nls file. How can this be fixed?

Exception in thread "main" Nothing named TABLE:PUT has been defined at position 895 in 
    at org.nlogo.compiler.CompilerExceptionThrowers$.exception(CompilerExceptionThrowers.scala:26)
    at org.nlogo.compiler.IdentifierParser.org$nlogo$compiler$IdentifierParser$$getAgentVariableReporter(IdentifierParser.scala:107)
    at org.nlogo.compiler.IdentifierParser$$anonfun$processToken2$2.apply(IdentifierParser.scala:75)
    at org.nlogo.compiler.IdentifierParser$$anonfun$processToken2$2.apply(IdentifierParser.scala:68)
    at scala.Option.getOrElse(Option.scala:108)
    at org.nlogo.compiler.IdentifierParser.processToken2(IdentifierParser.scala:68)
    at org.nlogo.compiler.IdentifierParser.processToken$1(IdentifierParser.scala:31)
    at org.nlogo.compiler.IdentifierParser$$anonfun$process$1.apply(IdentifierParser.scala:34)
    at org.nlogo.compiler.IdentifierParser$$anonfun$process$1.apply(IdentifierParser.scala:34)
    at scala.collection.Iterator$$anon$19.next(Iterator.scala:401)
    at scala.collection.Iterator$class.toStream(Iterator.scala:1181)
    at scala.collection.Iterator$$anon$19.toStream(Iterator.scala:399)
    at scala.collection.Iterator$$anonfun$toStream$1.apply(Iterator.scala:1181)
    at scala.collection.Iterator$$anonfun$toStream$1.apply(Iterator.scala:1181)
    at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1060)
    at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1052)
    at scala.collection.immutable.StreamIterator$$anonfun$next$1.apply(Stream.scala:952)
    at scala.collection.immutable.StreamIterator$$anonfun$next$1.apply(Stream.scala:952)
    at scala.collection.immutable.StreamIterator$LazyCell.v(Stream.scala:941)
    at scala.collection.immutable.StreamIterator.hasNext(Stream.scala:946)
    at scala.collection.Iterator$class.isEmpty(Iterator.scala:329)
    at scala.collection.immutable.StreamIterator.isEmpty(Stream.scala:933)
    at scala.collection.immutable.StreamIterator.next(Stream.scala:948)
    at scala.collection.Iterator$$anon$2.next(Iterator.scala:898)
    at scala.collection.Iterator$$anon$2.head(Iterator.scala:885)
    at org.nlogo.compiler.ExpressionParser.recurse$1(ExpressionParser.scala:474)
    at org.nlogo.compiler.ExpressionParser.delayBlock(ExpressionParser.scala:479)
    at org.nlogo.compiler.ExpressionParser.parseExpressionInternal(ExpressionParser.scala:339)
    at org.nlogo.compiler.ExpressionParser.org$nlogo$compiler$ExpressionParser$$parseArgExpression(ExpressionParser.scala:290)
    at org.nlogo.compiler.ExpressionParser$$anonfun$parseArguments$1.apply$mcVI$sp(ExpressionParser.scala:96)
    at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:81)
    at org.nlogo.compiler.ExpressionParser.parseArguments(ExpressionParser.scala:95)
    at org.nlogo.compiler.ExpressionParser.parseStatement(ExpressionParser.scala:80)
    at org.nlogo.compiler.ExpressionParser.parse(ExpressionParser.scala:55)
    at org.nlogo.compiler.CompilerMain$$anonfun$compile$1.apply(CompilerMain.scala:34)
    at org.nlogo.compiler.CompilerMain$$anonfun$compile$1.apply(CompilerMain.scala:29)
    at scala.collection.Iterator$class.foreach(Iterator.scala:772)
    at scala.collection.JavaConversions$JIteratorWrapper.foreach(JavaConversions.scala:573)
    at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
    at scala.collection.JavaConversions$JCollectionWrapper.foreach(JavaConversions.scala:592)
    at org.nlogo.compiler.CompilerMain$.compile(CompilerMain.scala:29)
    at org.nlogo.compiler.Compiler$.compileProgram(Compiler.scala:28)
    at org.nlogo.headless.HeadlessModelOpener.openFromMap(HeadlessModelOpener.scala:53)
    at org.nlogo.headless.HeadlessWorkspace.openString(HeadlessWorkspace.scala:531)
    at org.nlogo.headless.HeadlessWorkspace.open(HeadlessWorkspace.scala:513)
    at org.nlogo.headless.Main$.newWorkspace$1(Main.scala:19)
    at org.nlogo.headless.Main$$anonfun$runExperiment$1.apply(Main.scala:24)
    at org.nlogo.headless.Main$$anonfun$runExperiment$1.apply(Main.scala:24)
    at org.nlogo.lab.Lab$$anonfun$1.apply(Lab.scala:33)
    at org.nlogo.lab.Lab$$anonfun$1.apply(Lab.scala:33)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
    at scala.collection.immutable.Range.foreach(Range.scala:78)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
    at scala.collection.immutable.Range.map(Range.scala:46)
    at org.nlogo.lab.Lab.run(Lab.scala:33)
    at org.nlogo.headless.Main$.runExperiment(Main.scala:24)
    at org.nlogo.headless.Main$$anonfun$main$1.apply(Main.scala:14)
    at org.nlogo.headless.Main$$anonfun$main$1.apply(Main.scala:14)
    at scala.Option.foreach(Option.scala:197)
    at org.nlogo.headless.Main$.main(Main.scala:14)
    at org.nlogo.headless.Main.main(Main.scala)

推荐答案

.nlogo文件似乎必须包含扩展名声明,而不是.nls文件.

It seems that the .nlogo file must contain the extension declaration rather than the .nls file.

这篇关于具有表扩展名的无头行为空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆