javanetlogotraffic-simulation

Java implementation of Netlogo traffic simulation


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?


Solution

  • 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.