Ok,
i make that,
thanks Romain :)

2016-11-23 11:51 GMT+01:00 Romain Reuillon <[email protected]>:

> You should use seeds as an array. Add i an input of the template task. And
> use ${seeds(0)} in the template task.
>
> FYI this give you 1 replication by tremble. If you want several
> replications use:
>
> val exploration =
>   ExplorationTask(
>     (tremble in (0.0 to 1.0 by 0.20)) x
>     (seeds in (UniformDistribution[Long]().sliding(4, 4).take(10)))
>   )
>
>
>
>
> Le 23/11/2016 à 09:56, sebastien rey coyrehourcq a écrit :
>
> Hi Romain,
> Thanks for answer,
>
> I use a templateTask with named parameters in parameters.xml, so i try
> something like that without success :
>
>
> val exploration =
>  ExplorationTask(
>    (tremble in (0.0 to 1.0 by 0.20)) zip
>    (seeds in (UniformDistribution[Long]().sliding(4, 4)))
>  )
>
> val emptyTask = EmptyTask() set (
>      inputs += (tremble, seeds),
>       s := seeds(0),
>       sDot := seeds(1),
>       sT := seeds(2),
>       sDT := seeds(3),
>       outputs += (tremble,s,sDot,sT,sDT)
> )
>
> val templateTask =
>    TemplateFileTask(workDirectory / "parameters.xml", fileoutput) set (
>      inputs += s,
>      inputs += sDot,
>      inputs += sT,
>      inputs += sDt,
>      inputs += tremble,
>      outputs += s,
>      outputs += tremble,
>      )
>
> exploration -< emptyTask -- templateTask
>
> But OpenMOLE return this :
>
>
> *org.openmole.core.console.ScalaREPL$CompilationError: (line 32) too many
> arguments for method apply: ()org.openmole.core.dsl.Val[Array[Long]] in
> trait ReferenceWrapper              s := seeds(0),*
>
> Cheers,
>
>
> ---
> Sébastien Rey Coyrehourcq
> Research Engineer, BAP E, UMR IDEES
> Sent from Nylas N1 <https://nylas.com/n1?ref=n1>, the extensible, open
> source mail client.
>
> On nov. 23 2016, at 12:42 am, Romain Reuillon <[email protected]>
> <[email protected]> wrote:
>
>>
>> Hi Seb,
>>
>> this works:
>>
>> val seeds = Val[Array[Long]]
>> val tremble = Val[Double]
>>
>> val exploration =
>>   ExplorationTask(
>>     (tremble in (0.0 to 1.0 by 0.20)) zip
>>     (seeds in (UniformDistribution[Long]().sliding(4, 4)))
>>   )
>>
>>
>> val model =
>>   EmptyTask() set (
>>     inputs += (tremble, seeds)
>>   )
>>
>> exploration -< model
>>
>>
>> In the model task you can use seeds(0), seeds(1)... seeds(3).
>>
>> Romain
>>
>>
>> Le 22/11/2016 à 22:39, reyman a écrit :
>>
>> Hi,
>>
>> I'm trying to get a vector of independant seed corresponding to one
>> replication.
>>
>> Model need four independent seed to works :
>>
>> val s = Val[Long]
>> val sDot = Val[Long]
>> val sT = Val[Long]
>> val sDt = Val[Long]
>> val tremble = Val[Double]
>>
>> I want sampling like that *(tremble in (0.0 to 1.0 by 0.20)) x ( s,
>> sDot, sT, sDt in  (UniformDistribution[Long]() take 4))*
>>
>> I try something like this, but it's seems false, any idea ?
>>
>> val exploration =
>>   ExplorationTask(
>>     (tremble in (0.0 to 1.0 by 0.20)) x
>>     (s in (UniformDistribution[Long]() take 1),
>>      sDot in (UniformDistribution[Long]() take 1),
>>      sT in (UniformDistribution[Long]() take 1),
>>      sDt in (UniformDistribution[Long]() take 1))
>>   )
>>
>> val templateTask =
>>     TemplateFileTask(workDirectory / "parameters.xml", fileoutput) set (
>>       inputs += s,
>>       inputs += sDot,
>>       inputs += sT,
>>       inputs += sDt,
>>       inputs += tremble,
>> }
>>
>> Thanks,
>> Best R.
>>
>>
>> --
>> <http://stackoverflow.com/users/385881/reyman64>
>>
>>
>> _______________________________________________
>> OpenMOLE-users mailing 
>> [email protected]http://fedex.iscpif.fr/mailman/listinfo/openmole-users
>>
>>
>>
>
> _______________________________________________
> OpenMOLE-users mailing 
> [email protected]http://fedex.iscpif.fr/mailman/listinfo/openmole-users
>
>
>
> _______________________________________________
> OpenMOLE-users mailing list
> [email protected]
> http://fedex.iscpif.fr/mailman/listinfo/openmole-users
>
>


-- 
<http://stackoverflow.com/users/385881/reyman64>
_______________________________________________
OpenMOLE-users mailing list
[email protected]
http://fedex.iscpif.fr/mailman/listinfo/openmole-users

Reply via email to