--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/netlogo-users/44ec2abb-95db-4d86-b53d-2accf03aab37n%40googlegroups.com.
Hi Shir-May,
I'm the one who made HubNet Web and the conversion guide for it.
Thank you for your interest in the project.
is there a way to export simulation files - after it's finished?
In the desktop version - I exported CSV files, but as far as I understand I can't do this in the web version. (Is that right?)
You can export files in NetLogo Web, just not using language
primitives like `file-open`. Code that is running on web pages
isn't allowed to talk directly to the user's file system—you can
imagine what a problem it would be if any web page you went to
could read all the files on your computer. But there are language
extensions available in NetLogo Web that enable you to handle
files in ways that web browsers allow. Unfortunately (and maybe
ironically), the Web extension isn't one of them, as it isn't
implemented in NetLogo Web. (The `http-req` extension fills a
similar purpose, but isn't API-compatible with desktop's Web
extension, and won't help in this situation.)
The main way you should save a file from NetLogo Web is by using the `send-to`
extension, which is available in both desktop NetLogo and
NetLogo Web. A very simple example of its usage would be:
`send-to:file "my-favorite-fruits.txt"
"grapes\napples\noranges\nbananas"`.
Also, you mentioned CSV files. If it's helpful to you, the CSV
extension is available in NetLogo Web. However, its
`to-file` and `from-file` primitives are not implemented on the
web.
Finally, it sounds like you're having some difficulties with
narrowcast/client-specific plots in HubNet Web. The canonical
example of narrowcast plots is the Oil Cartel model, which you
might find helpful as a demonstration of how to do it.
Regardless, if you e-mail me the '.hnw.json' file for your model,
I can help with getting your histogram to work. After the
experience of converting all 39 of the HubNet models in the
NetLogo Models Library to run in HubNet Web, my bet is that I can
figure this one out, too.
Jason Bertsche