Learn R Programming

RNetLogo (version 0.9.2)

NLQuit: Quits a NetLogo instance.

Description

Quits the NetLogo workspace and closes the GUI window (if started with GUI).

Usage

NLQuit(nl.obj=NULL)

Arguments

nl.obj
(optional) A variable holding a reference to a NetLogo instance created with NLStart.

Value

  • No return value.

Warning

There is currently no way to kill a NetLogo instance with GUI completly. After executing NLQuit you can't run NLStart again. You have to quit your R session first and start a new one. The reason is, that NetLogo quits itself via System.exit (and has no funcionality to quit all threads manually) but executing System.exit will terminate the whole JVM which will terminate also rJava and finally R.). It can happen that some memory is not released although you have executed NLQuit. Therefore, it is a good idea to start a new R session whenever it is possible (e.g. if you are going to load a new model).

See Also

NLStart

Examples

Run this code
NLStart("C:/Program Files/NetLogo 4.1.3")
NLQuit()

Run the code above in your browser using DataLab