Seeking Recommendations: Best Way to Visualize NetLogo Simulations on Website

71 views
Skip to first unread message

zahidullah sherzad

unread,
Oct 9, 2023, 2:26:25 PM10/9/23
to netlogo-users
Dear NetLogo Community,

I hope this message finds you well. As a passionate member of the NetLogo community, I am reaching out to seek your valuable insights and recommendations.

I have been working on a project involving NetLogo simulations and am excited about the prospect of sharing these simulations on our website. However, I would greatly appreciate your expertise and guidance in determining the best approach for visualizing these simulations effectively.

Given the depth of knowledge within this community, I believe your input will be instrumental in helping me make an informed decision. Whether it's through embedding, interactive tools, or other innovative methods, I am eager to explore the most suitable way to present these simulations to our website visitors.

If you have any experience, suggestions, or recommended tools, please feel free to share them with me. Your expertise will not only benefit our project but also contribute to the wider NetLogo community.

Thank you in advance for your valuable recommendations. I look forward to learning from your insights and experiences.

Warm regards,

Zahidullah Sherzad

Wade Schuette

unread,
Oct 9, 2023, 2:40:07 PM10/9/23
to zahidullah sherzad, netlogo-users
Do you want to run the simulations on-line,
or just display the animated results?


--
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 on the web visit https://groups.google.com/d/msgid/netlogo-users/c4c2e35e-eb78-4b27-8e74-4c01728aaa34n%40googlegroups.com.

Paolo Gaudiano

unread,
Oct 9, 2023, 2:40:20 PM10/9/23
to zahidullah sherzad, netlogo-users
Hello Zahidullah,

Recently I had to convert a fairly significant simulation into a web-based app, for which I used the built-in converter to export NetLogo as html for NetLogo Web. I have done this before on several occasions in the past.

Some aspects were pretty painful to deal with:

1) I made the mistake of not being careful about what extensions work with NLW, and developed a huge chunk of code using the time extension to create an event-based scheduler. I ended up spending a lot of time completely re-writing it so it could work online.

2) When I first got it working, it was taking forever to load in the browser (to the point where it was impossible to figure out what was happening). Turns out, I was making heavy use of “run()” and “runresult()” which are painfully slow the first time you initialize the model. Had to do some significant refactoring there.

3) Generally speaking, I find the look-and-feel of the NLW version to be sub-par. The built-in plots are nearly illegible, color schemes are not nice (and some aspects not even WCAG compliant). In an earlier project I ended up write some CSS to clean up the interface, but it was a manual and clunky solution. It would be nice if someone found a way to make the NLW interface nicer and more user-friendly.

It would be nice to have more powerful tools to visualize NetLogo runs, thank you for taking the time to start this thread.

Paolo

Aleria   |  ARC  |  NYU    Forbes   |  TEDx   |  @icopaolo   |  LinkedIn   |    Pronouns:  He/Him/His  |  Name pronunciation
--

Wade Schuette

unread,
Oct 9, 2023, 2:50:51 PM10/9/23
to netlogo-users
Another question is how many simultaneous users do you need to support?
Netlogo has interfaces to Python ( and all the Python extensions for graphics ), and to OBDC.
You could have Netlogo running on a PC supporting web-based graphical interface,
running at PC speed,  if one user at a time met your needs.  PC speed could be
quite high if your virtual PC was actually in the cloud, I think.   Haven't tried it.

Wade

James Steiner

unread,
Oct 10, 2023, 12:30:58 AM10/10/23
to zahidullah sherzad, netlogo-users
I have done some work with creating multiple viewports in the NetLogo world view so that the same model can be visualized in multiple ways.

The same technique can be used to use part of the world view for other kinds of model information display, such as custom plots and such.

I think way too many modelers assume they must use the entire world as the simulation space.

--

Paolo Gaudiano

unread,
Oct 10, 2023, 7:00:43 AM10/10/23
to James Steiner, netlogo-users
I have done similar things as well, treating the world as a canvas and then specifying areas within the canvas as the agents’ space and other “custom” things like bar charts, a timeline readout, etc. - see the attached screenshot (this is one version of a tool we used for a recent publication, Zhang & Gaudiano (2023) An Agent-Based Simulation of How Promotion Biases Impact Corporate Gender Diversity

Jeremy Baker

unread,
Oct 17, 2023, 11:24:34 AM10/17/23
to Paolo Gaudiano, netlogo-users
Hey Paulo,

I just wanted to let you know that the NetLogo devel team discussed the issues you raised in a recent meeting.  I had a few follow up questions:
  • Can you provide any details on the slowness you saw with `run` and `runresult`?  The kind of slowdown you see there sounds more like a bug.  I assume you were using them with string args?  If you're able to share a demo model here or privately to feed...@ccl.northwestern.edu that'd be helpful.
  • What sorts of CSS customizations were you looking to do with your model?  What would make those customizations easier?
For plots, it's true that they look different in web than desktop.  Unfortunately getting the appearance to match 1-to-1 would take a lot of effort, given the differences in the platforms.  Our best advice at the moment is to setup and resize the plots in NetLogo Web until they look good to you.  Typically they will then look okay in desktop, maybe just a little large.

We do plan to implement more extensions for NetLogo Web as we have time, but it's unfortunately slow going as we're a small team.  I know the missing extensions are a show stopper for a lot of people.

Thanks for sharing your thoughts!

-Jeremy


From: netlog...@googlegroups.com <netlog...@googlegroups.com> on behalf of Paolo Gaudiano <pa...@aleria.tech>
Sent: Monday, October 9, 2023 1:40 PM
To: zahidullah sherzad <zahidullah...@gmail.com>; netlogo-users <netlog...@googlegroups.com>
Subject: Re: [netlogo-users] Seeking Recommendations: Best Way to Visualize NetLogo Simulations on Website
 
Reply all
Reply to author
Forward
0 new messages