How to share NetLogo model online

I am trying to share my NetLogo model online so that others can run it on their laptops or smartphones without the NetLogo desktop installed.

I found that you can run models online using NetLogo web ( http://www.netlogoweb.org/launch#http://www.netlogoweb.org/assets/modelslib/Sample%20Models/Biology/Evolution/Cooperation.nlogo ), and you can also download the model from NetLogo to the NetLogo network. The loaded model can be exported as a .html file.

I'm having trouble creating a link for a .html file that others may run. I tried to transfer the name of the .html file directly, and also put it in a public folder in Dropbox and Google Drive. As long as the link is available on Dropbox or on Google Drive, the file will not be launched.

Any suggestions on what to do next will be greatly appreciated!

+5
source share
1 answer

You are not the first person to encounter this problem, so I added a section to the NetLogo Web FAQ to explain the situation and how the solutions look. You can find the text here or inline at the bottom of this publication.

However, I don’t think you really need the whole mini essay that I wrote. It seems to me that you wanted to use Dropbox, but it just was not visible as . As it turned out, the Dropbox documentation is a good guide on how to publish files to Dropbox. If you follow their instructions, I think you should get some files that are easily accessible. Regarding how to specifically use your public Dropbox URLs with NetLogo Web, you can see the Dropbox paragraph in the FAQ for more details.

Text from frequently asked questions:

In short, the only thing required is a hosting service, which allows you to directly contact the hosted files. However, free and easy-to-use hosting services these days are surprisingly small. We understand that this complicates the work of many of our users, and we definitely plan to provide our own service, which will make it easier for people in the future. However, there are still a few options that we can offer.

For the vast majority of NetLogo Web users, an excellent option is to use Dropbox , which is a free option for file hosting. To host NetLogo network files on Dropbox, you must host them publicly (as described here ). Once you do this, if your file is a .nlogo file, follow the instructions here and share the link //netlogoweb.org/web? modelURL //netlogoweb.org/web? modelURL using the Dropbox public link URL for the modelURL value. If instead your file is a standalone HTML model (generated by following the instructions in the Export: HTML section here ), just pass the public link that you received from Dropbox, as it will point directly to the model.

GitHub is also a good Dropbox alternative for this. Instructions on how to upload files to GitHub can be found here .

Another option is to use Modeling Commons , which is a public place to download, share and discuss NetLogo models. All models loaded into Modeling Commons integrate with NetLogo Web through the Run in NetLogo Web tab on the model page. For any model, if you open this Run tab and then copy the current URL of your browser, this URL can be used to directly access the web version of the NetLogo model.

Another option (for more advanced users) is to place the files on a public web server that you have access to. If you want to host a standalone HTML model (generated according to the instructions in the "Export: HTML" section here ), then just run this host and distribute a link to where you place the HTML file.

Hosting a .nlogo file on a web server is more complex. To do this, run the file and make sure your web server allows it to access cross origin. For this, you may need the server to set the Access-Control-Allow-Origin header in the HTTP .nlogo HTTP response to either * or any NetLogo web domain you use (i.e. http://netlogoweb.org or https://netlogoweb.org or http://netlogo-web.org or https://netlogo-web.org ). Then follow the instructions here and share your model using the //netlogoweb.org/web? modelURL link //netlogoweb.org/web? modelURL //netlogoweb.org/web? modelURL using the URL of the model on the web server for the modelURL value.

+2
source

All Articles