Skip to contents

find_netlogo_console() attempts to locate the NetLogo executable file on the user's system.

Usage

find_netlogo_console(netlogo_home = find_netlogo_home())

Arguments

netlogo_home

(optional) A character string specifying the path to the NetLogo installation directory. If not provided, the function will try to find it automatically using find_netlogo_home() (default: find_netlogo_home()).

Value

A character string specifying the path to the NetLogo executable file. Returns an empty string ("") if the executable cannot be found at any location.

Details

The function uses the following search order:

  1. Checks the NETLOGO_CONSOLE environment variable. If set and the file exists, returns that path.

  2. If the environment variable is not set or the file does not exist, constructs the path based on netlogo_home (e.g., <netlogo_home>/NetLogo_Console on Linux/macOS or <netlogo_home>/NetLogo_Console.exe on Windows).

Examples

if (FALSE) { # \dontrun{
  find_netlogo_console()
} # }