You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use an sensitivity analysis on the model I build in NetLogo but I always get the following error message in R:
Exception` in thread "main" Expected a literal value. at position 0 in
at org.nlogo.core.Fail$.exception(Fail.scala:27)
at org.nlogo.core.Fail$.exception(Fail.scala:25)
at org.nlogo.core.Fail$.exception(Fail.scala:23)
at org.nlogo.parse.LiteralParser.readLiteralPrefix(LiteralParser.scala:83)
at org.nlogo.parse.LiteralParser.getLiteralValue(LiteralParser.scala:33)
at org.nlogo.parse.CompilerUtilities$.$anonfun$readFromString$3(CompilerUtilities.scala:22)
at org.nlogo.parse.CompilerUtilities$.$anonfun$numberOrElse$1(CompilerUtilities.scala:37)
at scala.util.Either$RightProjection.getOrElse(Either.scala:666)
at org.nlogo.parse.CompilerUtilities$.numberOrElse(CompilerUtilities.scala:36)
at org.nlogo.parse.CompilerUtilities$.readFromString(CompilerUtilities.scala:22)
at org.nlogo.fileformat.LabLoader.$anonfun$readProtocolElement$4(LabLoader.scala:70)
at scala.collection.TraversableLike$WithFilter.$anonfun$map$2(TraversableLike.scala:739)
at scala.collection.Iterator.foreach(Iterator.scala:929)
at scala.collection.Iterator.foreach$(Iterator.scala:929)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
at scala.collection.IterableLike.foreach(IterableLike.scala:71)
at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:738)
at org.nlogo.fileformat.LabLoader.readEnumeratedValueSetElement$1(LabLoader.scala:66)
at org.nlogo.fileformat.LabLoader.$anonfun$readProtocolElement$5(LabLoader.scala:77)
at scala.collection.immutable.List.flatMap(List.scala:335)
at org.nlogo.fileformat.LabLoader.valueSets$1(LabLoader.scala:74)
at org.nlogo.fileformat.LabLoader.readProtocolElement(LabLoader.scala:94)
at org.nlogo.fileformat.LabLoader.$anonfun$apply$1(LabLoader.scala:45)
at scala.collection.immutable.List.map(List.scala:283)
at org.nlogo.fileformat.LabLoader.apply(LabLoader.scala:45)
at org.nlogo.fileformat.LabLoader.apply(LabLoader.scala:30)
at org.nlogo.fileformat.LabFormat.load(NLogoLabFormat.scala:37)
at org.nlogo.fileformat.LabFormat.load$(NLogoLabFormat.scala:35)
at org.nlogo.fileformat.NLogoLabFormat.load(NLogoLabFormat.scala:40)
at org.nlogo.headless.BehaviorSpaceCoordinator$.$anonfun$selectProtocol$1(BehaviorSpaceCoordinator.scala:34)
at scala.Option.map(Option.scala:146)
at org.nlogo.headless.BehaviorSpaceCoordinator$.selectProtocol(BehaviorSpaceCoordinator.scala:32)
at org.nlogo.headless.Main$.runExperiment(Main.scala:23)
at org.nlogo.headless.Main$.$anonfun$main$1(Main.scala:12)
at org.nlogo.headless.Main$.$anonfun$main$1$adapted(Main.scala:12)
at scala.Option.foreach(Option.scala:257)
at org.nlogo.headless.Main$.main(Main.scala:12)
at org.nlogo.headless.Main.main(Main.scala)
Fehler in util_gather_results(nl, outfile, seed, siminputrow) :
Output file is empty - simulation aborted due to a runtime error!
Make sure that parameter value definitions of the experiment are valid and the model code is running properly!
This even happens with your example of the wolf-sheep model:
Hi and sorry for the delayed response.
I checked the code example and discovered the problem. After adding the simdesign, if you check the siminput tibble in your nl object (nl@simdesign@siminput) you will see that there are a lot of NAs in the tibble. This is due to the eFAST algorithm. The number of samples depends on the number of variables. If the number of samples is too low, NA values are created. Thus, to solve your problem you just have to increase the number of samples of your simdesign (for the example above 65 samples seem to be the minimum number of samples).
However, I agree that this should be printed on the interface. We will probably add a warning when NAs are created by simdesigns.
Hello,
I want to use an sensitivity analysis on the model I build in NetLogo but I always get the following error message in R:
This even happens with your example of the wolf-sheep model:
I dont really know about programming so maybe the solution to this is very trivial but I would be very thankful for your help!
The text was updated successfully, but these errors were encountered: