gama-plugin issueshttps://gitlab.openmole.org/openmole/gama-plugin/-/issues2020-02-05T07:25:15+01:00https://gitlab.openmole.org/openmole/gama-plugin/-/issues/1[REQUEST] Minimal tutorial2020-02-05T07:25:15+01:00RoiArthurB[REQUEST] Minimal tutorialHi,
**Problem launching GAMA**
I'm trying to use the gama-plugin but I don't really understand how it works.. From what I saw during my installation (docker install) the container get a part of the GAMA software (the headless part exac...Hi,
**Problem launching GAMA**
I'm trying to use the gama-plugin but I don't really understand how it works.. From what I saw during my installation (docker install) the container get a part of the GAMA software (the headless part exactly) but I don't see any other connection...
I'm trying to run a simple script that Benoit send me but the execution always fail (without error in console) :
```oms
// Declare the variable
val numberOfPreys = Val[Int]
val numberOfPreysAvg = Val[Double]
val nbPreysInit = Val[Int]
val seed = Val[Int]
// Gama task
// The first argument is the gaml
// The second argument of the GamaTask is the gama experiment name
// The third argument is the number of steps
val gama =
GamaTask(workDirectory , "predatorPrey.gaml", experiment = "prey_predatorExp", maxStep = 10, seed = seed) set (
inputs += nbPreysInit mapped "nb_preys_init",
outputs += numberOfPreys mapped "nb_preys",
) // Yes, the file is well placed
val average =
ScalaTask("val numberOfPreysAvg = numberOfPreys.map(_.toDouble).average") set (
inputs += numberOfPreys.toArray,
outputs += numberOfPreysAvg
)
val csvHook = CSVHook(workDirectory / "result.csv", nbPreysInit, numberOfPreysAvg)
DirectSampling(
evaluation = Replication(gama, seed, 10, aggregation = average) hook csvHook,
sampling = nbPreysInit in (0 to 200 by 10)
)
```
---
**Problem with demo OMS script**
Moreover (it may be because I'm not using this properly) the demo code ([here](https://openmole.org/Step+By+Step+Introduction.html#Workflow)) fail and return plenty of errors in my console as below :
```console
openmole_1 | Exception in thread "Thread-84" org.openmole.core.exception.InternalProcessingError: Error in antsTask@1491478695 for context values {diffusionRate=21.0, evaporationRate=9.0, openmole$seed=-1967721350612162129, population=125.0, seed=0}
openmole_1 | at org.openmole.core.workflow.tools.InputOutputCheck$.$anonfun$perform$1(InputOutputCheck.scala:126)
openmole_1 | at org.openmole.core.expansion.FromContext.apply(FromContext.scala:243)
openmole_1 | at org.openmole.core.expansion.FromContext.from(FromContext.scala:244)
openmole_1 | at org.openmole.core.workflow.task.Task.perform(Task.scala:96)
openmole_1 | at org.openmole.core.workflow.task.Task.perform$(Task.scala:94)
openmole_1 | at org.openmole.plugin.task.netlogo6.NetLogo6Task.perform(NetLogo6Task.scala:117)
openmole_1 | at org.openmole.core.workflow.job.MoleJob.perform(MoleJob.scala:87)
openmole_1 | at org.openmole.core.workflow.execution.LocalExecutor.$anonfun$run$2(LocalExecutor.scala:62)
openmole_1 | at scala.collection.Iterator.foreach(Iterator.scala:937)
openmole_1 | at scala.collection.Iterator.foreach$(Iterator.scala:937)
openmole_1 | at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
openmole_1 | at scala.collection.IterableLike.foreach(IterableLike.scala:70)
openmole_1 | at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
openmole_1 | at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
openmole_1 | at org.openmole.core.workflow.execution.LocalExecutor.$anonfun$run$1(LocalExecutor.scala:58)
openmole_1 | at org.openmole.core.outputmanager.OutputManager$.withStreamOutputs(OutputManager.scala:123)
openmole_1 | at org.openmole.core.workflow.execution.LocalExecutor.withRedirectedOutput(LocalExecutor.scala:119)
openmole_1 | at org.openmole.core.workflow.execution.LocalExecutor.run(LocalExecutor.scala:54)
openmole_1 | at java.lang.Thread.run(Thread.java:748)
openmole_1 | Caused by: org.openmole.core.exception.UserBadDataError: Error while opening the file /home/mole/workspace/.tmp/fd2c58a1-7799-4cfe-8601-1a2828e15889/execution8f20a3ea-dc27-458f-b961-6750d3cfe287/netlogoworkpsace73ef9d36-f65d-4b8a-af77-3816a205c871/projects/ants.nlogo:
openmole_1 | | java.lang.Exception: Unable to open model with current format: /home/mole/workspace/.tmp/fd2c58a1-7799-4cfe-8601-1a2828e15889/execution8f20a3ea-dc27-458f-b961-6750d3cfe287/netlogoworkpsace73ef9d36-f65d-4b8a-af77-3816a205c871/projects/ants.nlogo
openmole_1 | | at org.nlogo.api.ModelLoader.readModel(ModelLoader.scala:65)
openmole_1 | | at org.nlogo.api.ModelLoader.readModel$(ModelLoader.scala:60)
openmole_1 | | at org.nlogo.api.ConfigurableModelLoader.readModel(ModelLoader.scala:106)
openmole_1 | | at org.nlogo.headless.HeadlessWorkspace.open(HeadlessWorkspace.scala:502)
openmole_1 | | at org.openmole.plugin.tool.netlogo6.NetLogo6.open(NetLogo6.java:53)
openmole_1 | | at org.openmole.plugin.task.netlogo.NetLogoTask$.$anonfun$openNetLogoWorkspace$3(NetLogoTask.scala:89)
openmole_1 | | at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
openmole_1 | | at org.openmole.plugin.task.netlogo.NetLogoTask$.wrapError(NetLogoTask.scala:59)
openmole_1 | | at org.openmole.plugin.task.netlogo.NetLogoTask$.$anonfun$openNetLogoWorkspace$2(NetLogoTask.scala:89)
openmole_1 | | at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
openmole_1 | | at org.openmole.tool.thread.package$.withThreadClassLoader(package.scala:53)
openmole_1 | | at org.openmole.core.code.CodePackage.withThreadClassLoader(CodePackage.scala:49)
openmole_1 | | at org.openmole.core.code.CodePackage.withThreadClassLoader$(CodePackage.scala:48)
openmole_1 | | at org.openmole.core.workflow.dsl$.withThreadClassLoader(package.scala:46)
openmole_1 | | at org.openmole.plugin.task.netlogo.NetLogoTask$.openNetLogoWorkspace(NetLogoTask.scala:88)
openmole_1 | | at org.openmole.plugin.task.netlogo.NetLogoTask$.createInstance$1(NetLogoTask.scala:127)
openmole_1 | | at org.openmole.plugin.task.netlogo.NetLogoTask$.$anonfun$createPool$1(NetLogoTask.scala:136)
openmole_1 | | at org.openmole.tool.cache.WithNewInstance.apply(Pool.scala:59)
openmole_1 | | at org.openmole.plugin.task.netlogo.NetLogoTask.$anonfun$process$1(NetLogoTask.scala:328)
openmole_1 | | at org.openmole.core.expansion.FromContext.apply(FromContext.scala:243)
openmole_1 | | at org.openmole.core.expansion.FromContext.from(FromContext.scala:244)
openmole_1 | | at org.openmole.core.workflow.tools.InputOutputCheck$.$anonfun$perform$1(InputOutputCheck.scala:123)
openmole_1 | | at org.openmole.core.expansion.FromContext.apply(FromContext.scala:243)
openmole_1 | | at org.openmole.core.expansion.FromContext.from(FromContext.scala:244)
openmole_1 | | at org.openmole.core.workflow.task.Task.perform(Task.scala:96)
openmole_1 | | at org.openmole.core.workflow.task.Task.perform$(Task.scala:94)
openmole_1 | | at org.openmole.plugin.task.netlogo6.NetLogo6Task.perform(NetLogo6Task.scala:117)
openmole_1 | | at org.openmole.core.workflow.job.MoleJob.perform(MoleJob.scala:87)
openmole_1 | | at org.openmole.core.workflow.execution.LocalExecutor.$anonfun$run$2(LocalExecutor.scala:62)
openmole_1 | | at scala.collection.Iterator.foreach(Iterator.scala:937)
openmole_1 | | at scala.collection.Iterator.foreach$(Iterator.scala:937)
openmole_1 | | at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
openmole_1 | | at scala.collection.IterableLike.foreach(IterableLike.scala:70)
openmole_1 | | at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
openmole_1 | | at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
openmole_1 | | at org.openmole.core.workflow.execution.LocalExecutor.$anonfun$run$1(LocalExecutor.scala:58)
openmole_1 | | at org.openmole.core.outputmanager.OutputManager$.withStreamOutputs(OutputManager.scala:123)
openmole_1 | | at org.openmole.core.workflow.execution.LocalExecutor.withRedirectedOutput(LocalExecutor.scala:119)
openmole_1 | | at org.openmole.core.workflow.execution.LocalExecutor.run(LocalExecutor.scala:54)
openmole_1 | | at java.lang.Thread.run(Thread.java:748)
openmole_1 | at org.openmole.plugin.task.netlogo.NetLogoTask$.wrapError(NetLogoTask.scala:63)
openmole_1 | at org.openmole.plugin.task.netlogo.NetLogoTask$.$anonfun$openNetLogoWorkspace$2(NetLogoTask.scala:89)
openmole_1 | at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
openmole_1 | at org.openmole.tool.thread.package$.withThreadClassLoader(package.scala:53)
openmole_1 | at org.openmole.core.code.CodePackage.withThreadClassLoader(CodePackage.scala:49)
openmole_1 | at org.openmole.core.code.CodePackage.withThreadClassLoader$(CodePackage.scala:48)
openmole_1 | at org.openmole.core.workflow.dsl$.withThreadClassLoader(package.scala:46)
openmole_1 | at org.openmole.plugin.task.netlogo.NetLogoTask$.openNetLogoWorkspace(NetLogoTask.scala:88)
openmole_1 | at org.openmole.plugin.task.netlogo.NetLogoTask$.createInstance$1(NetLogoTask.scala:127)
openmole_1 | at org.openmole.plugin.task.netlogo.NetLogoTask$.$anonfun$createPool$1(NetLogoTask.scala:136)
openmole_1 | at org.openmole.tool.cache.WithNewInstance.apply(Pool.scala:59)
openmole_1 | at org.openmole.plugin.task.netlogo.NetLogoTask.$anonfun$process$1(NetLogoTask.scala:328)
openmole_1 | at org.openmole.core.expansion.FromContext.apply(FromContext.scala:243)
openmole_1 | at org.openmole.core.expansion.FromContext.from(FromContext.scala:244)
openmole_1 | at org.openmole.core.workflow.tools.InputOutputCheck$.$anonfun$perform$1(InputOutputCheck.scala:123)
openmole_1 | ... 18 more
```