The arrays will be unrolled in column and the scalar variable will be repeated. If you want another behaviour you can use the option singleRow := true.
Romain Le 02/11/2015 16:32, Murat Yildizoglu a écrit : > Thanks a lot Romain! > > That's helpful. > Maybe a last point: How the CSVhook will handle the array, when > writing it to the file? > If I want to get back 50 observation points on three variables t,x,y > for example, I will have to transform these to arrays > in lines containing t,x,y. No? > That should be done manually, no? > > 2015-11-02 16:01 GMT+01:00 Romain Reuillon <[email protected] > <mailto:[email protected]>>: > > For netlogo you would need to use array of double: > > val res = Array[Double] > > NetLogo5Task(....) set ( > netLogoOutputs += ("variable", res) > ) > > Then you can use this variable in your CSV Hook. Does it answer > your question ? > > Romain > > > > Le 02/11/2015 15:41, Murat Yildizoglu a écrit : >> >> 2015-11-02 15:30 GMT+01:00 Romain Reuillon >> <[email protected] <mailto:[email protected]>>: >> >> >> Array variables would be a solution. Another one (may be >> easier) would be to produce a file in your netlogo script >> during the simulation. You will then be able to collect this >> file at the end of the simulation for instance: >> >> val result = Val[File] >> >> NetLogo5Task(....) set ( >> outputFiles += ("output.csv", result) >> ) >> >> val copyFile = CopyFileHook(result, workdirectory / >> "result${i}.csv") >> >> >> >> Thanks a lot Romain! Happy to back again :-) The new version >> seems very nice. >> >> Then I would have to paste together all these files by hand, I >> imagine, and that would be quite painful (I could also do it >> using a script in R of course, but nevertheless...). >> Array variables, decoded correctly in OM, and saved to a CSV >> after being combined, would be a better solution I think. It >> would be costlier in NL in terms of memory, but writing to files >> would also slow a bit the program. >> >> How could I do it? I cannot find any information in the >> documentation on the manipulation of different types of variables >> and tubes. >> >> Amitiés, >> >> Murat >> >> -- >> Prof. Murat Yildizoglu >> >> Université Montesquieu Bordeaux IV >> GREThA (UMR CNRS 5113) >> Avenue Léon Duguit >> 33608 Pessac cedex >> France >> >> Bureau : E-331 >> >> mail: yildi-at-u-bordeaux4.fr <http://yildi-at-u-bordeaux4.fr> >> >> web: yildizoglu.info <http://yildizoglu.info> >> >> >> _______________________________________________ >> OpenMOLE-users mailing list >> [email protected] <mailto:[email protected]> >> http://fedex.iscpif.fr/mailman/listinfo/openmole-users > > > _______________________________________________ > OpenMOLE-users mailing list > [email protected] <mailto:[email protected]> > http://fedex.iscpif.fr/mailman/listinfo/openmole-users > > > > > -- > Prof. Murat Yildizoglu > > Université Montesquieu Bordeaux IV > GREThA (UMR CNRS 5113) > Avenue Léon Duguit > 33608 Pessac cedex > France > > Bureau : E-331 > > mail: yildi-at-u-bordeaux4.fr <http://yildi-at-u-bordeaux4.fr> > > web: yildizoglu.info <http://yildizoglu.info> > > > _______________________________________________ > OpenMOLE-users mailing list > [email protected] > http://fedex.iscpif.fr/mailman/listinfo/openmole-users
signature.asc
Description: OpenPGP digital signature
_______________________________________________ OpenMOLE-users mailing list [email protected] http://fedex.iscpif.fr/mailman/listinfo/openmole-users
