Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance: Run many simulations on a single NetLogo instance #60

Open
bitbacchus opened this issue Jan 4, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@bitbacchus
Copy link
Collaborator

See #57 , to solve this use NetLogo's Controlling API instead of experiment xml files.

@bitbacchus bitbacchus added enhancement New feature or request help wanted Extra attention is needed labels Jan 4, 2022
@nldoc
Copy link
Contributor

nldoc commented May 11, 2023

Hi @bitbacchus,
I was following up on the discussion in the issue linked above.
I saw your proposal to run multiple simulations in the same NetLogo instance.
However, I am not convinced that this is a "better" solution.
There were reasons we decided to implement nlrx that way, let me explain.

When I started running NetLogo from R, I always used RNetLogo. When running projects with many simulations, we always encountered a lot of problems with NetLogo and ever increasing memory consumption.
It turned out that it is just not possible to re-use the same NetLogo instance over and over again. At some point it will break.
For me that was a quite frustrating experience, and actually led to the basic idea around nlrx: having independent sessions with a fresh start for every single simulation. This was actually a game changer for me and the reason why nlrx is alive :)

While I do in general agree that this creates a lot of overhead, it also brings a lot of stability. For sure there is a trade-off.
However, I would strongly advise against changing the approach of how nlrx calls NetLogo.

One thing we could think about is kind of a hybrid-approach, which leaves the decision to the user.
However, I will anyway not have the time to implement/test such a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants