1

I am a bit newbie in the topic of Netlogo simulations. I am gathering information about invoking different traffic simulators. Is Netlogo have the possibility to receive a call from the Java side via a library that controls agents or the traffic flow or has some extension able to handle it by some external logic?

For example, the SUMO simulator is fully designed for traffic simulations, and it is pretty easy to control it using TraCI connection. Is there a possibility to write a similar grid simulation in NetLogo using only Java/Python/C++ code, or NetLogo simulator requires a clear Logo-semantic code in the NetLogo interface?

My comparison is caused by my investigation of specific solutions performance that use command-line, library or API. It seems NetLogo requires Logo-inspired code, which simulates processes with a GUI interface. GUI in this system appears to be a considerable slowdown...

As it lacks a communication interface and seems to be a single-threaded GUI-based simulator, I thought it is used mainly for elementary simulations.

Am I correct with this assumption? Is it a logo-inspired interpreter that cannot be used in large scale distributed systems and is usually used for a student-showcase purpose?

Alex R
  • 175
  • 1
  • 12
  • For anyone following me, here's a link to the [Netlogo Home Page](http://ccl.northwestern.edu/netlogo/index.shtml) and the [Netlogo User Manual](http://ccl.northwestern.edu/netlogo/docs/). – Gilbert Le Blanc Mar 19 '21 at 03:14

2 Answers2

2

NetLogo can communicate with Java, R, Mathematica, not sure what else. But NetLogo is not suitable for building GUI interfaces, it provides the simulation engine. Not just student showcase, but I probably wouldn't use it above about 50,000 agents so not really for large scale distributed systems

JenB
  • 17,620
  • 2
  • 17
  • 45
2

You don't need to use the NetLogo GUI; you can run simulations purely from the command line, as documented here: http://ccl.northwestern.edu/netlogo/docs/behaviorspace.html#advanced-usage

It's actually very common for researchers to do this, typically so they can run experiments on a cluster. Hundreds of research papers have been published using NetLogo as basis for doing simulations. NetLogo is also a teaching tool, but it would be very far from the truth to describe it as only for "student showcase" purposes.

The NetLogo language itself is single-threaded, but BehaviorSpace supports doing multiple simulation runs in parallel (in the GUI or on the command line, either way).

I don't know what you mean by “lacks a communication interface”; I think you're misinformed there. NetLogo can be and has been connected to many other tools and systems, and is extensible via Java APIs.

But do you have to write your simulation in the NetLogo language, which is a dialect of Logo? Yes, you do. The language can be augmented via the extensions API, but if you want to avoid NetLogo-the-language entirely, then NetLogo isn't a good choice.

Seth Tisue
  • 29,985
  • 11
  • 82
  • 149
  • Hi @Seth, thanks for the more descriptive answer. However, I have one more for you then - you write that "Netlogo can be [...] extensible via Java APIs" - When I was investigating the topic I was only able to use some specific version of netlogo e.g. "org.nlogo:netlogo:6.1.0" and run HeadlessSimulation - however, it required from me to write code with separate extension - .nlogo and I could only pass some parameters from Java. Is it the only way or I can somehow build Netlogo simulation (even with Logo language, but fully from Java?) – Alex R Mar 27 '21 at 19:53
  • Additionally, I asked the same question on the google-forum of a NetLogo group and they answer me that NetLogo have a lack of performance if it comes to large traffic simulations and they don't recommend this solution as specified solution e.g SUMO have better performance in this topic and are better for this kind of a solution. Also, they are better integrated with Java through TraCI interface – Alex R Mar 27 '21 at 19:55
  • 1
    "I can somehow build Netlogo simulation... fully from Java"? In short: no, NetLogo isn't designed or intended for that. – Seth Tisue Mar 28 '21 at 18:45