问题
I am unable to run the mathematica-netlogo link on my PC with a 64 bit processor running window 10. The versions of Netlogo and Mathematica are 6.0.1 and 11.1 Student Edition respectively.
The error arises when the function "NLStart[]" is run with the path of the Netlogo directory provided as an input to this function. The error message is as follows:
NLStart::netlogonotfound: NetLogo could not be found in: C:\Program Files\NetLogo 6.0.1\
Prior to this step, I successfully loaded the NetLogo Mathematica link package.
Any helpful suggestions to overcome this issue will be appreciated.
Thanks.
回答1:
I've just verified I was able to use NetLogo Mathematica Link with the following configuration:
- Mathematica 11.1.0.0
- NetLogo 6.0.1 64-bit
- Windows 10 64-bit
My Mathematica installation was untouched, as was my NetLogo installation - I did not have the Mathematica Link 6.0 hotfix installed for NetLogo 6.0.1. Also, NetLogo 6.0.1 was installed in "C:\Program Files\NetLogo 6.0.1" (some users choose to install to a different directory, or their primary drive is not lettered with "C:").
I opened Mathematica and ran the following commands:
- File > Install > type: Package, source: From File, file: C:\Program Files\NetLogo 6.0.1\Mathematica Link\NetLogo.m, install name: NetLogo, install for this user only. Note that when selecting this file, Mathematica will use the last directory you opened, so when the file dialog opens, first navigate to the the top of the drive then navigate down to NetLogo 6.0.1 (using a NetLogo.m file from an older NetLogo version will almost certainly break Mathematica link, and this is a very easy mistake to make).
- Entered in the notebook (cannot code block this): <<NetLogo`
- Entered in the notebook:
NLStart["C:\\Program Files\\NetLogo 6.0.1"]
(note the double backslashes and no trailing backslash). - The NetLogo window will open after a slight delay (depending on your system speed and memory)
If you've followed these steps and are still unable to open Mathematica Link, please comment and we can continue to troubleshoot.
Edit:
I wanted to consolidate troubleshooting steps for future readers. I've introduced a new version of NetLogo.m available here, which users should download for troubleshooting purposes (it will be distributed with future versions of NetLogo). Some steps to using this:
Mathematica will cache old "NetLogo.m" files. You can find where these caches are by using the following commands in Mathematica:
FileNameJoin[{ $BaseDirectory, "Applications" }]
FileNameJoin[{ $UserBaseDirectory, "Applications" }]
Visit the directories obtained in Step 1 and delete all "NetLogo.m" files from them.
- Download the new version of NetLogo.m
- Install the downloaded version of NetLogo.m (and run <<NetLogo`)
- Run
NLDiagnostics["C:\\Program Files\\NetLogo 6.0.1"]
to determine what paths are being searched. This function will produce a hash as an output. The keymissingJars
should be an empty list ({}
). - If you want to check java version, you can run
NLJavaDiagnostics[]
. ThejavaVersion
returned should start with "1.8.0", thejavaArchitecture
returned should be "64".
来源:https://stackoverflow.com/questions/43289271/unable-to-use-link-between-netlogo-6-0-1-and-mathematica-11-1-on-a-64-bit-proces