find_netlogo_version() attempts to determine the NetLogo version installed
on the user's system.
Usage
find_netlogo_version(netlogo_home = find_netlogo_home())Arguments
- netlogo_home
(optional) A
characterstring specifying the path to the NetLogo installation directory. If not provided, the function will try to find it automatically usingfind_netlogo_home()(default:find_netlogo_home()).
Value
A character string specifying the NetLogo
version (e.g., "7.0.2"). Returns an empty string ("") if the version
cannot be determined.
Details
The function uses the following detection methods in order:
Console execution: If the NetLogo console executable is found, it runs
NetLogo_Console --versionto retrieve the version information. This is the most reliable method.Directory name extraction: If the executable is not found, it attempts to extract the version number from the installation directory name (e.g.,
netlogo-7.0.2yields"7.0.2").
Note that the directory name fallback may produce slightly different results if the directory was renamed or uses a non-standard naming convention.
See also
Other utility functions:
find_netlogo_console(),
find_netlogo_home(),
inspect_experiment_file(),
parse_netlogo_list()