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
Error when connecting NetLogo 6.0 and R #1282
Comments
Hi! The RJava package hasn't been updated for NetLogo 6. At this point, you can use RJava with NetLogo 5.3.1, but it will not work with NetLogo 6. NetLogo 5.3.1 is still available for download here. While the |
Thank you very much
… El 11 ene 2017, a las 15:28, Robert Grider ***@***.***> escribió:
Hi, the RJava package hasn't been updated for NetLogo 6. While the r extension was included with NetLogo 6, we don't support the RJava package for R at this point. In the next few weeks, the development team here at the CCL will discuss supporting this long-term, as it appears it's actively used.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1282 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AK73YvYNLjjiUIuHJUXZa_WMakOk6m4kks5rROcigaJpZM4LgXZh>.
|
In the process of discussing support for the rJava package, we're trying to understand the features that rJava offers which aren't available in the NetLogo R extension. Do you or others have any use cases you can share with us? |
Hi
thank you for your help
I am new user to Netlogo.
I was trying just to start a Netlogo model simulation from the R program
My OS is Mac OSX 10.11.6 and the R version is the following
-------------------------------------------------------
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_COLLATE failed, using "C"
3: Setting LC_TIME failed, using "C"
4: Setting LC_MESSAGES failed, using "C"
5: Setting LC_MONETARY failed, using "C"
[R.app GUI 1.68 (7288) x86_64-apple-darwin13.4.0]
WARNING: You're using a non-UTF8 locale, therefore only ASCII characters will work.
Please read R for Mac OS X FAQ (see Help) section 9 and adjust your system preferences accordingly.
[Workspace restored from /Users/pablolopez-matencioperez/.RData]
[History restored from /Users/pablolopez-matencioperez/.Rapp.history]
library("RNetLogo")
Loading required package: rJava
Loading required package: igraph
Attaching package: 'igraph'
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
NLStart("/Applications/NetLogo\ 6.0")
java.lang.NoClassDefFoundError: org/nlogo/workspace/Controllable
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
Caused by: java.lang.ClassNotFoundException
at RJavaClassLoader.findClass(RJavaClassLoader.java:383)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 2 more
…-----------------------
This is the error that I get
Regards
Thank you very much
El 23 Jan 2017, a las 16:54, Robert Grider ***@***.***> escribió:
In the process of discussing support for the rJava package, we're trying to understand the features that rJava offers which aren't available in the NetLogo R extension. Do you or others have any use cases you can share with us?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1282 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AK73Yl8IFuz2YwOBWNO1-N9clO92xtggks5rVM1SgaJpZM4LgXZh>.
|
I haven't personally worked with the NetLogo R extension or RNetLogo yet, due to our model still being in an early development stage, but we're planing to use RNetLogo in the near future. From what I understand the NetLogo R extension is used to do R calculations from within NetLogo while RNetLogo is used to control NetLogo from within R (i.e. the other way around). The latter seems to be particularly suited for in-depth model analysis, calibration and automated run control. We're looking forward to utilize at least some of the simpler analyzing methods like Morris Screening and Full factorial design as described in this article for our NetLogo model in the near future. I've contacted Jan Thiele (the author of RNetLogo) and he said he's planing to update RNetLogo for the NetLogo 6 api, but he can't give a time-estimate yet as the development is confined to his free time. |
My understanding is that rNetLogo has been updated for NetLogo 6.0. Is this correct? If so, can I close this issue? |
Yes, all is fine now. Thank you very much for your help.
… El 27 Feb 2017, a las 18:56, Robert Grider ***@***.***> escribió:
My understanding is that rNetLogo has been updated for NetLogo 6.0. Is this correct? If so, can I close this issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1282 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AK73YimOp0gS3XiFNyshBqLnHHbVB66Fks5rgw5KgaJpZM4LgXZh>.
|
I am having the same problems using RNetlogo 6.0.1
Can anyone help me solve the problem? |
I am having the exact same problem as @elenanitodelbosque. @mrerrormessage, do you know if there is a fix to this issue? I have tried updating R, RStudio, Java, and all the like. Then I tried installing an old version of RNetLogo from cran-archive and found it was no longer compatible with java...! R version 3.4.0 (2017-04-21) Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
@ashleyasmus - I assume you're running NetLogo 6.0.1? If so, the below advice applies to you as well. @elenanitodelbosque, sorry it's taken so long to get back to you. The newer versions of NetLogo have a versioned NetLogo jar which needs to be provided to NLStart (in RNetLogo 1.0.3 and later). An example is given on page 3&4 of the RNetLogo Manual. On mac, this looks like:
On windows:
Note that each time you change your version of NetLogo, you will need to adjust both the |
Hi @mrerrormessage ! Thanks for the quick reply.
Interestingly, I had issues with R asking me to install an old version of Java (version 6) when I loaded RNetLogo's library. But, it looks like RStudio is still reaching for the new version of Java (8). I wonder if (& am worried that) there is some deeper incompatibility going on that requires a terminal fix. Here is the new session info:
|
I have done a terrible job keeping track of all I've done, but running this sudo command in Terminal on Mac OS fixed the problem for me: Thanks to this website. I wish I could re-create this issue for others, maybe @elenanitodelbosque will be helped by this?? Yowza. Java! |
@ashleyasmus glad to hear you've found a solution! I had been wondering whether there were possible java version issues involved. NetLogo (6.0 and later) requires Java 8 to run (Java 6 won't work), but you must also tell R where to find "libjvm.dylib". There are several ways to do that, and your command looks like it does the trick nicely. |
Suggestions on the Windows version of the fix @ashleyasmus found for macOS? I'm getting a nearly identical error:
|
Uh... not sure what happened. I tried using |
Hi, thanks for the help. Sadly I'm still having the same issues.
Then I tried the terminal command line from @ashleyasmus and back to running NLStart with RStudio but got the same error as shown above. |
@elenanitodelbosque , your problem looks like a java incompatibility instead of a problem locating the jar file. Run the following in R: library(rJava)
.jinit()
.jcall("java/lang/System", "S", "getProperty", "java.runtime.version") If the result does not start with "1.8.0", you are using an older, incompatible version of Java. To correct this, install the latest JDK / JRE from Oracle. You may additionally need to configure |
I encountered a similar but not quite the same error (it's org/nlogo/api/Exceptions$Handler):
The command I ran is:
I checked the file Could anyone help please? |
I get the same issue when connecting to NetLogo 6.0.3 from RStudio on Windows. The error message I get is:
|
@jalapic Are you using Java 9 by any chance? I was getting this error under Ubuntu 17.10, NetLogo 6.0.3, rJava 0.9-9 and RNetLogo 1.0-4, and going back to Java 8 from Java 9 fixed it. |
I receive the same error as @jalapic.
|
I am encountering the same error. I reinstalled everything, so I use the latest versions of all packages, JAVA etc. Any idea what to do now? |
Is this project dead? Would be a pity... |
@vonjd I just setup and ran a test model through RNetLogo on macOS and Windows 7, so it should still work. Unfortunately there are a lot of different pieces that need to fit together (NetLogo, R, RNetLogo, rJava, and Java). Here is a list of things to check:
Finally, if you need to use NetLogo 5.3.1, you might have to downgrade to an older version of RNetLogo. I'm not knowledgeable enough with R to give instructions, but it looks like source packages of the older versions are available. |
@LaCuneta: With |
Hello! I tried following the advices given above. I have NetLogo 6.0.4 and R3.6.
and I get this:
|
Newer Linux versions have Java 11 (or Java 14, or ...) installed. In order to switch to OpenJDK 8.
Check where For me, a reinstallation of the It has to be RNetLogo 6.0.4. |
Any progress with this? I too cannot load models with NLLoadModel() with Netlogo 6.2.0 on Mac OS and Netlogo 5.3.1 did not work either. Would be grateful for hints if there's a working version |
@DavidSchultner Have you tried the nlrx package? It can run NetLogo models from R, and I believe it supports NetLogo 6.2.0. |
@LaCuneta thanks - the nlrx has been discontinued as well... |
@DavidSchultner Hmm I don't see any mention of that in the nlrx docs and it looks like there were updates as recently as last month to it. Where are you seeing that it's discontinued? I do see this issue in their repo about the package being archived on CRAN, but it contains a workaround to load it from a different source. |
@LaCuneta loading via GitHub worked, thanks so much! I gave up too soon |
Hi! I have been running into similar issues using Java when trying to run rNetlogo. @mrerrormessage how do I tell R where to find "libjvm.dylib"? Can I do this within R without using the terminal? Also, now when I try running NLStart, I do not get an error message in the R console but I get an error message pop up saying: Do you know what this could mean? |
Hi,
We are sorry you ran into this problem. I suggest you try out the Simple R extension which has a simple point and click configuration menu for telling the extension about the location on your system of your R install. It is more straightforward to set up than the bundled R extension which requires the manual creation of a configuration file.
If you don’t already have NetLogo 6.3.0, our latest version I suggest you download it from here<https://ccl.northwestern.edu/netlogo/download.shtml>.
You can install the Simple R extension using NetLogo's built-in extension manager<http://ccl.northwestern.edu/netlogo/docs/extension-manager.html>.
Examples showing how to use it can be found here<https://github.com/NetLogo/SimpleR-Extension/blob/main/README.md#using>.
Information on switching to Simple R from the bundled R extension is here<https://github.com/NetLogo/SimpleR-Extension#transitioning-from-the-old-r-extension>.
Please let us know if this does not solve your problem, and we will look further into the issue.
Thanks,
Aaron ***@***.***<https://urldefense.com/v3/__https:/github.com/mrerrormessage__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmjS7J5jWQ$> is no longer a NetLogo developer)
…--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: kmbarn4 ***@***.***>
Date: Thursday, March 9, 2023 at 12:13 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi! I have been running into similar issues using Java when trying to run rNetlogo. @mrerrormessage<https://urldefense.com/v3/__https:/github.com/mrerrormessage__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmjS7J5jWQ$> how do I tell R where to find "libjvm.dylib"? Can I do this within R without using the terminal?
Also, now when I try running NLStart, I do not get an error message in the R console but I get an error message pop up saying:
"Error in setting cp. Class path is
:C/Users/civitellolabuser/Documents/R/win-library/3.5/rJava/java/boot;C:\Users\civitellolabuser\Documents\R\win-library\3.5\RNetlogo\java;C:\Users\civitellolabuser\Documents\R\win-library\3.5\RNetlogo\java\RNetlogo.jar"
Do you know what this could mean?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/1282*issuecomment-1462440944__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmhhI0WD9w$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2SGUMYMXVCKK6ZCXLTW3IFSDANCNFSM4C4BOZQQ__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmhum5qCJA$>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Hi Aaron,
Thank you for your help! Just so I understand, are you suggesting that I use the R extension in Netlogo rather than rNetlogo? I've heard that rNetlogo is no longer maintained, and I'm not sure if this is true and if it is, can I still use it?
I'm trying to use RNetlogo so that I can run a global sensitivity analysis using the sensobol package. I read that the simple R extension in Netlogo is for running R calculations within Netlogo but what I'd like to do is control Netlogo in R so that I can run my simulations over a non-factorial parameter space - which behaviorspace does not allow. I've tried using the nlrx package as well but the sensobol package would be preferred if I can get rNetlogo working.
Also, yes, I've been using the 6.3.0 version of Netlogo.
Thank you for your help!
…________________________________
From: Aaron Brandes ***@***.***>
Sent: Thursday, March 9, 2023 12:27 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Barnett, KM ***@***.***>; Comment ***@***.***>
Subject: [External] Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi,
We are sorry you ran into this problem. I suggest you try out the Simple R extension which has a simple point and click configuration menu for telling the extension about the location on your system of your R install. It is more straightforward to set up than the bundled R extension which requires the manual creation of a configuration file.
If you don’t already have NetLogo 6.3.0, our latest version I suggest you download it from here<https://ccl.northwestern.edu/netlogo/download.shtml>.
You can install the Simple R extension using NetLogo's built-in extension manager<http://ccl.northwestern.edu/netlogo/docs/extension-manager.html>.
Examples showing how to use it can be found here<https://github.com/NetLogo/SimpleR-Extension/blob/main/README.md#using>.
Information on switching to Simple R from the bundled R extension is here<https://github.com/NetLogo/SimpleR-Extension#transitioning-from-the-old-r-extension>.
Please let us know if this does not solve your problem, and we will look further into the issue.
Thanks,
Aaron ***@***.***<https://urldefense.com/v3/__https:/github.com/mrerrormessage__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmjS7J5jWQ$> is no longer a NetLogo developer)
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: kmbarn4 ***@***.***>
Date: Thursday, March 9, 2023 at 12:13 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi! I have been running into similar issues using Java when trying to run rNetlogo. @mrerrormessage<https://urldefense.com/v3/__https:/github.com/mrerrormessage__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmjS7J5jWQ$> how do I tell R where to find "libjvm.dylib"? Can I do this within R without using the terminal?
Also, now when I try running NLStart, I do not get an error message in the R console but I get an error message pop up saying:
"Error in setting cp. Class path is
:C/Users/civitellolabuser/Documents/R/win-library/3.5/rJava/java/boot;C:\Users\civitellolabuser\Documents\R\win-library\3.5\RNetlogo\java;C:\Users\civitellolabuser\Documents\R\win-library\3.5\RNetlogo\java\RNetlogo.jar"
Do you know what this could mean?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/1282*issuecomment-1462440944__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmhhI0WD9w$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2SGUMYMXVCKK6ZCXLTW3IFSDANCNFSM4C4BOZQQ__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmhum5qCJA$>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNetLogo%2FNetLogo%2Fissues%2F1282%23issuecomment-1462465206&data=05%7C01%7Ckatherine.mary.barnett%40emory.edu%7Cb0e917e0a1ed427e56d408db20c398e5%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638139796680926311%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=n6N%2B0YMbNvdaMoYdD8lP%2B8FWV4p4bZr7wM6tmt0RW%2FY%3D&reserved=0>, or unsubscribe<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKX2YNTTWD7VR647IZWQN2LW3IHJDANCNFSM4C4BOZQQ&data=05%7C01%7Ckatherine.mary.barnett%40emory.edu%7Cb0e917e0a1ed427e56d408db20c398e5%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638139796680926311%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VfN0YrMEDL4ER4UBfnRvAt%2FoSZ9wo%2BeORY97LkLfmAc%3D&reserved=0>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hi,
Whoops, from the subject line of your post I managed to miss that you were talking about rNetLogo. The rNetlogo was created outside of our group (although we have had contacts) but my understanding is that it is no longer maintained.
I don’t think I can resolve your problem, but here are a few ideas that might be helpful.
If you want to try using rNetLogo:
The classpath is used to locate files.
I mostly work on MacOS. I think the file jvm.dll on Windows does what "libjvm.dylib" does on MacOS and linux systems.
On my system it is located at
C:\Program Files\BellSoft\LibericaJDK-17\bin\server\jvm.dll.
Because I am using Java from Liberica.
If you search in your Windows settings for “environment” you will have a choice to edit your system variables. There the variable JAVA_HOME will tell you where your Java is installed and /bin/server/jvm.dll should either be beneath it, or beneath one of the subdirectories.
The most recent relevant posts I found are in #1534
They point to potential version mismatch problems.
You may need to go back to earlier versions of NetLogo, rNetLogo and possibly R to take advantage of them.
NetLogo 6.3.0 makes use of Java 17, so it may be the least likely to work with rNetLogo
Look especially at:
catseesun<https://github.com/catseesun> on Jan 10, 2018<#1534 (comment)>
Solved the problem! Two things combined make it work: 1) change to R i386 as you suggested; 2) download the previous RNetLogo version (1.0-2) from cran.r-project.org/src/contrib/Archive/RNetLogo<https://cran.r-project.org/src/contrib/Archive/RNetLogo/>
So essentially it seems to be a version mismatch problem. Thanks a lot for your suggestions!
tonysdatamodels on Aug 5, 2021 •
Very good that you solved the problem. Mines actually works in R x 64. I think the key is to make sure R, Netlogo and Java are all either 64 bit or 32 bit. I have a video on youtube (youtube.com/watch?v=zWMdaTEPTOc) about the opening procedure for NetLogo in Rand the code I used is below ***@***.******@***.***/open%20netlogo%20in%20r> (raw)
Using sensobol
Perhaps you can use one of the functions such as sobol_matrices to generate the needed inputs for NetLogo. Reading through and trying the vignetted might be useful. Then you might be able to use nrlx to run NetLogo for the desired values.
Another possibility is to use a list of lists of input values for your ‘go’ method. You could then use an anonymous function<http://ccl.northwestern.edu/netlogo/docs/programming.html#anonymous-procedures> with the primitive foreach<https://ccl.northwestern.edu/netlogo/docs/dict/foreach.html>.
If you decide to go this route I could give you some help with it. You would need to include code to write output to a file.
- Aaron
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: kmbarn4 ***@***.***>
Date: Thursday, March 9, 2023 at 12:44 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Aaron Andre Brandes ***@***.***>, Comment ***@***.***>
Subject: Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi Aaron,
Thank you for your help! Just so I understand, are you suggesting that I use the R extension in Netlogo rather than rNetlogo? I've heard that rNetlogo is no longer maintained, and I'm not sure if this is true and if it is, can I still use it?
I'm trying to use RNetlogo so that I can run a global sensitivity analysis using the sensobol package. I read that the simple R extension in Netlogo is for running R calculations within Netlogo but what I'd like to do is control Netlogo in R so that I can run my simulations over a non-factorial parameter space - which behaviorspace does not allow. I've tried using the nlrx package as well but the sensobol package would be preferred if I can get rNetlogo working.
Also, yes, I've been using the 6.3.0 version of Netlogo.
Thank you for your help!
KM
KM Barnett Mirchandani (she/her)
PhD Candidate | Civitello Lab
Population Biology, Ecology, and Evolution
Emory University
www.kmbarnett.com<http://www.kmbarnett.com><https://urldefense.com/v3/__http:/www.kmbarnett.com*3E__;JQ!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGbnpyRrww$>
…________________________________
From: Aaron Brandes ***@***.***>
Sent: Thursday, March 9, 2023 12:27 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Barnett, KM ***@***.***>; Comment ***@***.***>
Subject: [External] Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi,
We are sorry you ran into this problem. I suggest you try out the Simple R extension which has a simple point and click configuration menu for telling the extension about the location on your system of your R install. It is more straightforward to set up than the bundled R extension which requires the manual creation of a configuration file.
If you don’t already have NetLogo 6.3.0, our latest version I suggest you download it from here<https://ccl.northwestern.edu/netlogo/download.shtml%3E.
You can install the Simple R extension using NetLogo's built-in extension manager<http://ccl.northwestern.edu/netlogo/docs/extension-manager.html%3E.
Examples showing how to use it can be found here<https://github.com/NetLogo/SimpleR-Extension/blob/main/README.md#using><https://urldefense.com/v3/__https:/github.com/NetLogo/SimpleR-Extension/blob/main/README.md*using*3E__;IyU!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGbRIK_JFw$>.
Information on switching to Simple R from the bundled R extension is here<https://github.com/NetLogo/SimpleR-Extension#transitioning-from-the-old-r-extension><https://urldefense.com/v3/__https:/github.com/NetLogo/SimpleR-Extension*transitioning-from-the-old-r-extension*3E__;IyU!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGZ1lPpr8Q$>.
Please let us know if this does not solve your problem, and we will look further into the issue.
Thanks,
Aaron ***@***.***<https://urldefense.com/v3/__https:/github.com/mrerrormessage__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmjS7J5jWQ$%3E is no longer a NetLogo developer)
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: kmbarn4 ***@***.***>
Date: Thursday, March 9, 2023 at 12:13 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi! I have been running into similar issues using Java when trying to run rNetlogo. @mrerrormessage<https://urldefense.com/v3/__https:/github.com/mrerrormessage__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmjS7J5jWQ$%3E how do I tell R where to find "libjvm.dylib"? Can I do this within R without using the terminal?
Also, now when I try running NLStart, I do not get an error message in the R console but I get an error message pop up saying:
"Error in setting cp. Class path is
:C/Users/civitellolabuser/Documents/R/win-library/3.5/rJava/java/boot;C:\Users\civitellolabuser\Documents\R\win-library\3.5\RNetlogo\java;C:\Users\civitellolabuser\Documents\R\win-library\3.5\RNetlogo\java\RNetlogo.jar"
Do you know what this could mean?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/1282*issuecomment-1462440944__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmhhI0WD9w$%3E, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2SGUMYMXVCKK6ZCXLTW3IFSDANCNFSM4C4BOZQQ__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmhum5qCJA$%3E.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNetLogo%2FNetLogo%2Fissues%2F1282%23issuecomment-1462465206&data=05%7C01%7Ckatherine.mary.barnett%40emory.edu%7Cb0e917e0a1ed427e56d408db20c398e5%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638139796680926311%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=n6N%2B0YMbNvdaMoYdD8lP%2B8FWV4p4bZr7wM6tmt0RW%2FY%3D&reserved=0><https://urldefense.com/v3/__https:/nam11.safelinks.protection.outlook.com/?url=https*3A*2F*2Fgithub.com*2FNetLogo*2FNetLogo*2Fissues*2F1282*23issuecomment-1462465206&data=05*7C01*7Ckatherine.mary.barnett*40emory.edu*7Cb0e917e0a1ed427e56d408db20c398e5*7Ce004fb9cb0a4424fbcd0322606d5df38*7C0*7C0*7C638139796680926311*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=n6N*2B0YMbNvdaMoYdD8lP*2B8FWV4p4bZr7wM6tmt0RW*2FY*3D&reserved=0*3E__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGbmojYMUg$>, or unsubscribe<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKX2YNTTWD7VR647IZWQN2LW3IHJDANCNFSM4C4BOZQQ&data=05%7C01%7Ckatherine.mary.barnett%40emory.edu%7Cb0e917e0a1ed427e56d408db20c398e5%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638139796680926311%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VfN0YrMEDL4ER4UBfnRvAt%2FoSZ9wo%2BeORY97LkLfmAc%3D&reserved=0><https://urldefense.com/v3/__https:/nam11.safelinks.protection.outlook.com/?url=https*3A*2F*2Fgithub.com*2Fnotifications*2Funsubscribe-auth*2FAKX2YNTTWD7VR647IZWQN2LW3IHJDANCNFSM4C4BOZQQ&data=05*7C01*7Ckatherine.mary.barnett*40emory.edu*7Cb0e917e0a1ed427e56d408db20c398e5*7Ce004fb9cb0a4424fbcd0322606d5df38*7C0*7C0*7C638139796680926311*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=VfN0YrMEDL4ER4UBfnRvAt*2FoSZ9wo*2BeORY97LkLfmAc*3D&reserved=0*3E__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGZmirLzDA$>.
You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/1282*issuecomment-1462488915__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGZLTnzERg$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2VFAVKOSS7Z5JDFKVTW3IJIHANCNFSM4C4BOZQQ__;!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGYYGlH0IQ$>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hi,
Just to clarify – if you don’t get rNetLogo working you probably want to use sensobol or some other tool to generate a comma delimited file where each row is a set of values for the variables you want to change.
* Aaron
…--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: Aaron Andre Brandes ***@***.***>
Date: Thursday, March 9, 2023 at 2:52 PM
To: NetLogo/NetLogo ***@***.***>, NetLogo/NetLogo ***@***.***>
Cc: Comment ***@***.***>
Subject: Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi,
Whoops, from the subject line of your post I managed to miss that you were talking about rNetLogo. The rNetlogo was created outside of our group (although we have had contacts) but my understanding is that it is no longer maintained.
I don’t think I can resolve your problem, but here are a few ideas that might be helpful.
If you want to try using rNetLogo:
The classpath is used to locate files.
I mostly work on MacOS. I think the file jvm.dll on Windows does what "libjvm.dylib" does on MacOS and linux systems.
On my system it is located at
C:\Program Files\BellSoft\LibericaJDK-17\bin\server\jvm.dll.
Because I am using Java from Liberica.
If you search in your Windows settings for “environment” you will have a choice to edit your system variables. There the variable JAVA_HOME will tell you where your Java is installed and /bin/server/jvm.dll should either be beneath it, or beneath one of the subdirectories.
The most recent relevant posts I found are in #1534
They point to potential version mismatch problems.
You may need to go back to earlier versions of NetLogo, rNetLogo and possibly R to take advantage of them.
NetLogo 6.3.0 makes use of Java 17, so it may be the least likely to work with rNetLogo
Look especially at:
catseesun<https://github.com/catseesun> on Jan 10, 2018<#1534 (comment)>
Solved the problem! Two things combined make it work: 1) change to R i386 as you suggested; 2) download the previous RNetLogo version (1.0-2) from cran.r-project.org/src/contrib/Archive/RNetLogo<https://cran.r-project.org/src/contrib/Archive/RNetLogo/>
So essentially it seems to be a version mismatch problem. Thanks a lot for your suggestions!
tonysdatamodels on Aug 5, 2021 •
Very good that you solved the problem. Mines actually works in R x 64. I think the key is to make sure R, Netlogo and Java are all either 64 bit or 32 bit. I have a video on youtube (youtube.com/watch?v=zWMdaTEPTOc) about the opening procedure for NetLogo in Rand the code I used is below ***@***.******@***.***/open%20netlogo%20in%20r> (raw)
Using sensobol
Perhaps you can use one of the functions such as sobol_matrices to generate the needed inputs for NetLogo. Reading through and trying the vignetted might be useful. Then you might be able to use nrlx to run NetLogo for the desired values.
Another possibility is to use a list of lists of input values for your ‘go’ method. You could then use an anonymous function<http://ccl.northwestern.edu/netlogo/docs/programming.html#anonymous-procedures> with the primitive foreach<https://ccl.northwestern.edu/netlogo/docs/dict/foreach.html>.
If you decide to go this route I could give you some help with it. You would need to include code to write output to a file.
- Aaron
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: kmbarn4 ***@***.***>
Date: Thursday, March 9, 2023 at 12:44 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Aaron Andre Brandes ***@***.***>, Comment ***@***.***>
Subject: Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi Aaron,
Thank you for your help! Just so I understand, are you suggesting that I use the R extension in Netlogo rather than rNetlogo? I've heard that rNetlogo is no longer maintained, and I'm not sure if this is true and if it is, can I still use it?
I'm trying to use RNetlogo so that I can run a global sensitivity analysis using the sensobol package. I read that the simple R extension in Netlogo is for running R calculations within Netlogo but what I'd like to do is control Netlogo in R so that I can run my simulations over a non-factorial parameter space - which behaviorspace does not allow. I've tried using the nlrx package as well but the sensobol package would be preferred if I can get rNetlogo working.
Also, yes, I've been using the 6.3.0 version of Netlogo.
Thank you for your help!
KM
KM Barnett Mirchandani (she/her)
PhD Candidate | Civitello Lab
Population Biology, Ecology, and Evolution
Emory University
www.kmbarnett.com<http://www.kmbarnett.com><https://urldefense.com/v3/__http:/www.kmbarnett.com*3E__;JQ!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGbnpyRrww$>
________________________________
From: Aaron Brandes ***@***.***>
Sent: Thursday, March 9, 2023 12:27 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Barnett, KM ***@***.***>; Comment ***@***.***>
Subject: [External] Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi,
We are sorry you ran into this problem. I suggest you try out the Simple R extension which has a simple point and click configuration menu for telling the extension about the location on your system of your R install. It is more straightforward to set up than the bundled R extension which requires the manual creation of a configuration file.
If you don’t already have NetLogo 6.3.0, our latest version I suggest you download it from here<https://ccl.northwestern.edu/netlogo/download.shtml%3E.
You can install the Simple R extension using NetLogo's built-in extension manager<http://ccl.northwestern.edu/netlogo/docs/extension-manager.html%3E.
Examples showing how to use it can be found here<https://github.com/NetLogo/SimpleR-Extension/blob/main/README.md#using><https://urldefense.com/v3/__https:/github.com/NetLogo/SimpleR-Extension/blob/main/README.md*using*3E__;IyU!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGbRIK_JFw$>.
Information on switching to Simple R from the bundled R extension is here<https://github.com/NetLogo/SimpleR-Extension#transitioning-from-the-old-r-extension><https://urldefense.com/v3/__https:/github.com/NetLogo/SimpleR-Extension*transitioning-from-the-old-r-extension*3E__;IyU!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGZ1lPpr8Q$>.
Please let us know if this does not solve your problem, and we will look further into the issue.
Thanks,
Aaron ***@***.***<https://urldefense.com/v3/__https:/github.com/mrerrormessage__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmjS7J5jWQ$%3E is no longer a NetLogo developer)
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: kmbarn4 ***@***.***>
Date: Thursday, March 9, 2023 at 12:13 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi! I have been running into similar issues using Java when trying to run rNetlogo. @mrerrormessage<https://urldefense.com/v3/__https:/github.com/mrerrormessage__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmjS7J5jWQ$%3E how do I tell R where to find "libjvm.dylib"? Can I do this within R without using the terminal?
Also, now when I try running NLStart, I do not get an error message in the R console but I get an error message pop up saying:
"Error in setting cp. Class path is
:C/Users/civitellolabuser/Documents/R/win-library/3.5/rJava/java/boot;C:\Users\civitellolabuser\Documents\R\win-library\3.5\RNetlogo\java;C:\Users\civitellolabuser\Documents\R\win-library\3.5\RNetlogo\java\RNetlogo.jar"
Do you know what this could mean?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/1282*issuecomment-1462440944__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmhhI0WD9w$%3E, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2SGUMYMXVCKK6ZCXLTW3IFSDANCNFSM4C4BOZQQ__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmhum5qCJA$%3E.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNetLogo%2FNetLogo%2Fissues%2F1282%23issuecomment-1462465206&data=05%7C01%7Ckatherine.mary.barnett%40emory.edu%7Cb0e917e0a1ed427e56d408db20c398e5%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638139796680926311%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=n6N%2B0YMbNvdaMoYdD8lP%2B8FWV4p4bZr7wM6tmt0RW%2FY%3D&reserved=0><https://urldefense.com/v3/__https:/nam11.safelinks.protection.outlook.com/?url=https*3A*2F*2Fgithub.com*2FNetLogo*2FNetLogo*2Fissues*2F1282*23issuecomment-1462465206&data=05*7C01*7Ckatherine.mary.barnett*40emory.edu*7Cb0e917e0a1ed427e56d408db20c398e5*7Ce004fb9cb0a4424fbcd0322606d5df38*7C0*7C0*7C638139796680926311*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=n6N*2B0YMbNvdaMoYdD8lP*2B8FWV4p4bZr7wM6tmt0RW*2FY*3D&reserved=0*3E__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGbmojYMUg$>, or unsubscribe<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKX2YNTTWD7VR647IZWQN2LW3IHJDANCNFSM4C4BOZQQ&data=05%7C01%7Ckatherine.mary.barnett%40emory.edu%7Cb0e917e0a1ed427e56d408db20c398e5%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638139796680926311%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VfN0YrMEDL4ER4UBfnRvAt%2FoSZ9wo%2BeORY97LkLfmAc%3D&reserved=0><https://urldefense.com/v3/__https:/nam11.safelinks.protection.outlook.com/?url=https*3A*2F*2Fgithub.com*2Fnotifications*2Funsubscribe-auth*2FAKX2YNTTWD7VR647IZWQN2LW3IHJDANCNFSM4C4BOZQQ&data=05*7C01*7Ckatherine.mary.barnett*40emory.edu*7Cb0e917e0a1ed427e56d408db20c398e5*7Ce004fb9cb0a4424fbcd0322606d5df38*7C0*7C0*7C638139796680926311*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=VfN0YrMEDL4ER4UBfnRvAt*2FoSZ9wo*2BeORY97LkLfmAc*3D&reserved=0*3E__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGZmirLzDA$>.
You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/1282*issuecomment-1462488915__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGZLTnzERg$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2VFAVKOSS7Z5JDFKVTW3IJIHANCNFSM4C4BOZQQ__;!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGYYGlH0IQ$>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hi Aaron,
Thank you so much for your responses! I apologize for my late response - I was taking some time to understand it.
I'm interested in your last suggestion of using a list of lists of input values for my ‘go’ method with anonymous procedures. Would this allow me to manually run my model over a parameter space defined outside of behaviorspace but still directly from within Netlogo? I was able to make a csv file of the inputs I'd like to use for my Sobol sensitivity analysis, but I thought the only way to loop the model over those values would be through R given that behaviorspace seems to loop everything factorially. Is there a way I could run the simulations with the initial values from the csv file without using R?
Am I understanding correctly?
I do already know how to generate an output file from Netlogo, but I'm not sure how to do the above and if you would be able to help me, that would be greatly appreciated!
Thank you so much!
KM
…________________________________
From: Aaron Brandes ***@***.***>
Sent: Thursday, March 9, 2023 3:06 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Barnett, KM ***@***.***>; Comment ***@***.***>
Subject: [External] Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi,
Just to clarify – if you don’t get rNetLogo working you probably want to use sensobol or some other tool to generate a comma delimited file where each row is a set of values for the variables you want to change.
* Aaron
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: Aaron Andre Brandes ***@***.***>
Date: Thursday, March 9, 2023 at 2:52 PM
To: NetLogo/NetLogo ***@***.***>, NetLogo/NetLogo ***@***.***>
Cc: Comment ***@***.***>
Subject: Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi,
Whoops, from the subject line of your post I managed to miss that you were talking about rNetLogo. The rNetlogo was created outside of our group (although we have had contacts) but my understanding is that it is no longer maintained.
I don’t think I can resolve your problem, but here are a few ideas that might be helpful.
If you want to try using rNetLogo:
The classpath is used to locate files.
I mostly work on MacOS. I think the file jvm.dll on Windows does what "libjvm.dylib" does on MacOS and linux systems.
On my system it is located at
C:\Program Files\BellSoft\LibericaJDK-17\bin\server\jvm.dll.
Because I am using Java from Liberica.
If you search in your Windows settings for “environment” you will have a choice to edit your system variables. There the variable JAVA_HOME will tell you where your Java is installed and /bin/server/jvm.dll should either be beneath it, or beneath one of the subdirectories.
The most recent relevant posts I found are in #1534
They point to potential version mismatch problems.
You may need to go back to earlier versions of NetLogo, rNetLogo and possibly R to take advantage of them.
NetLogo 6.3.0 makes use of Java 17, so it may be the least likely to work with rNetLogo
Look especially at:
catseesun<https://github.com/catseesun> on Jan 10, 2018<#1534 (comment)>
Solved the problem! Two things combined make it work: 1) change to R i386 as you suggested; 2) download the previous RNetLogo version (1.0-2) from cran.r-project.org/src/contrib/Archive/RNetLogo<https://cran.r-project.org/src/contrib/Archive/RNetLogo/>
So essentially it seems to be a version mismatch problem. Thanks a lot for your suggestions!
tonysdatamodels on Aug 5, 2021 •
Very good that you solved the problem. Mines actually works in R x 64. I think the key is to make sure R, Netlogo and Java are all either 64 bit or 32 bit. I have a video on youtube (youtube.com/watch?v=zWMdaTEPTOc) about the opening procedure for NetLogo in Rand the code I used is below ***@***.******@***.***/open%20netlogo%20in%20r> (raw)
Using sensobol
Perhaps you can use one of the functions such as sobol_matrices to generate the needed inputs for NetLogo. Reading through and trying the vignetted might be useful. Then you might be able to use nrlx to run NetLogo for the desired values.
Another possibility is to use a list of lists of input values for your ‘go’ method. You could then use an anonymous function<http://ccl.northwestern.edu/netlogo/docs/programming.html#anonymous-procedures> with the primitive foreach<https://ccl.northwestern.edu/netlogo/docs/dict/foreach.html>.
If you decide to go this route I could give you some help with it. You would need to include code to write output to a file.
- Aaron
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: kmbarn4 ***@***.***>
Date: Thursday, March 9, 2023 at 12:44 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Aaron Andre Brandes ***@***.***>, Comment ***@***.***>
Subject: Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi Aaron,
Thank you for your help! Just so I understand, are you suggesting that I use the R extension in Netlogo rather than rNetlogo? I've heard that rNetlogo is no longer maintained, and I'm not sure if this is true and if it is, can I still use it?
I'm trying to use RNetlogo so that I can run a global sensitivity analysis using the sensobol package. I read that the simple R extension in Netlogo is for running R calculations within Netlogo but what I'd like to do is control Netlogo in R so that I can run my simulations over a non-factorial parameter space - which behaviorspace does not allow. I've tried using the nlrx package as well but the sensobol package would be preferred if I can get rNetlogo working.
Also, yes, I've been using the 6.3.0 version of Netlogo.
Thank you for your help!
KM
KM Barnett Mirchandani (she/her)
PhD Candidate | Civitello Lab
Population Biology, Ecology, and Evolution
Emory University
www.kmbarnett.com<http://www.kmbarnett.com><https://urldefense.com/v3/__http:/www.kmbarnett.com*3E__;JQ!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGbnpyRrww$>
________________________________
From: Aaron Brandes ***@***.***>
Sent: Thursday, March 9, 2023 12:27 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Barnett, KM ***@***.***>; Comment ***@***.***>
Subject: [External] Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi,
We are sorry you ran into this problem. I suggest you try out the Simple R extension which has a simple point and click configuration menu for telling the extension about the location on your system of your R install. It is more straightforward to set up than the bundled R extension which requires the manual creation of a configuration file.
If you don’t already have NetLogo 6.3.0, our latest version I suggest you download it from here<https://ccl.northwestern.edu/netlogo/download.shtml%3E.
You can install the Simple R extension using NetLogo's built-in extension manager<http://ccl.northwestern.edu/netlogo/docs/extension-manager.html%3E.
Examples showing how to use it can be found here<https://github.com/NetLogo/SimpleR-Extension/blob/main/README.md#using><https://urldefense.com/v3/__https:/github.com/NetLogo/SimpleR-Extension/blob/main/README.md*using*3E__;IyU!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGbRIK_JFw$>.
Information on switching to Simple R from the bundled R extension is here<https://github.com/NetLogo/SimpleR-Extension#transitioning-from-the-old-r-extension><https://urldefense.com/v3/__https:/github.com/NetLogo/SimpleR-Extension*transitioning-from-the-old-r-extension*3E__;IyU!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGZ1lPpr8Q$>.
Please let us know if this does not solve your problem, and we will look further into the issue.
Thanks,
Aaron ***@***.***<https://urldefense.com/v3/__https:/github.com/mrerrormessage__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmjS7J5jWQ$%3E is no longer a NetLogo developer)
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: kmbarn4 ***@***.***>
Date: Thursday, March 9, 2023 at 12:13 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [NetLogo/NetLogo] Error when connecting NetLogo 6.0 and R (#1282)
Hi! I have been running into similar issues using Java when trying to run rNetlogo. @mrerrormessage<https://urldefense.com/v3/__https:/github.com/mrerrormessage__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmjS7J5jWQ$%3E how do I tell R where to find "libjvm.dylib"? Can I do this within R without using the terminal?
Also, now when I try running NLStart, I do not get an error message in the R console but I get an error message pop up saying:
"Error in setting cp. Class path is
:C/Users/civitellolabuser/Documents/R/win-library/3.5/rJava/java/boot;C:\Users\civitellolabuser\Documents\R\win-library\3.5\RNetlogo\java;C:\Users\civitellolabuser\Documents\R\win-library\3.5\RNetlogo\java\RNetlogo.jar"
Do you know what this could mean?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/1282*issuecomment-1462440944__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmhhI0WD9w$%3E, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2SGUMYMXVCKK6ZCXLTW3IFSDANCNFSM4C4BOZQQ__;!!Dq0X2DkFhyF93HkjWTBQKhk!SVv4Hh8SfDlzOspiVqQM-n9eBBAgr1OXgnbzoWyrUcuWmTBQNx1bVzqGzM-JYRxPeORSbRemDE5xfZNPt5bWSl7ezmhum5qCJA$%3E.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNetLogo%2FNetLogo%2Fissues%2F1282%23issuecomment-1462465206&data=05%7C01%7Ckatherine.mary.barnett%40emory.edu%7Cb0e917e0a1ed427e56d408db20c398e5%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638139796680926311%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=n6N%2B0YMbNvdaMoYdD8lP%2B8FWV4p4bZr7wM6tmt0RW%2FY%3D&reserved=0><https://urldefense.com/v3/__https:/nam11.safelinks.protection.outlook.com/?url=https*3A*2F*2Fgithub.com*2FNetLogo*2FNetLogo*2Fissues*2F1282*23issuecomment-1462465206&data=05*7C01*7Ckatherine.mary.barnett*40emory.edu*7Cb0e917e0a1ed427e56d408db20c398e5*7Ce004fb9cb0a4424fbcd0322606d5df38*7C0*7C0*7C638139796680926311*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=n6N*2B0YMbNvdaMoYdD8lP*2B8FWV4p4bZr7wM6tmt0RW*2FY*3D&reserved=0*3E__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGbmojYMUg$>, or unsubscribe<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKX2YNTTWD7VR647IZWQN2LW3IHJDANCNFSM4C4BOZQQ&data=05%7C01%7Ckatherine.mary.barnett%40emory.edu%7Cb0e917e0a1ed427e56d408db20c398e5%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638139796680926311%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VfN0YrMEDL4ER4UBfnRvAt%2FoSZ9wo%2BeORY97LkLfmAc%3D&reserved=0><https://urldefense.com/v3/__https:/nam11.safelinks.protection.outlook.com/?url=https*3A*2F*2Fgithub.com*2Fnotifications*2Funsubscribe-auth*2FAKX2YNTTWD7VR647IZWQN2LW3IHJDANCNFSM4C4BOZQQ&data=05*7C01*7Ckatherine.mary.barnett*40emory.edu*7Cb0e917e0a1ed427e56d408db20c398e5*7Ce004fb9cb0a4424fbcd0322606d5df38*7C0*7C0*7C638139796680926311*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=VfN0YrMEDL4ER4UBfnRvAt*2FoSZ9wo*2BeORY97LkLfmAc*3D&reserved=0*3E__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGZmirLzDA$>.
You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/1282*issuecomment-1462488915__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGZLTnzERg$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2VFAVKOSS7Z5JDFKVTW3IJIHANCNFSM4C4BOZQQ__;!!Dq0X2DkFhyF93HkjWTBQKhk!S2ws6NWeAUTtCTovIzBJQBgf0erEBu0NyYdYqymTtWIMnKvHY1FKj017Zn1ZDutsYBYIPEYEn1jGQDIjfaqELfDSrGYYGlH0IQ$>.
You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNetLogo%2FNetLogo%2Fissues%2F1282%23issuecomment-1462699128&data=05%7C01%7Ckatherine.mary.barnett%40emory.edu%7Cd85c5df495eb423a30a908db20d9c933%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638139891983300144%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=1PsaPabmR4WZ7J4y6GXur%2F%2FceIiyYKV3wG5D72PkE78%3D&reserved=0>, or unsubscribe<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKX2YNTCGS6DYG5T4P33YLTW3IZ4XANCNFSM4C4BOZQQ&data=05%7C01%7Ckatherine.mary.barnett%40emory.edu%7Cd85c5df495eb423a30a908db20d9c933%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638139891983300144%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XK37HYFmMDbOHQB66NFg2iIOfZ6BU%2FEB4ACD7SFR5ZE%3D&reserved=0>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Trying to call Netlogo 6.0 from R 3.3.2 on MacOSX 10.11.6 (Capitan)
After,
library("RNetLogo")
nl.path <- getwd()
NLStart(nl.path)
gives me the following exception/error:
java.lang.NoClassDefFoundError: org/nlogo/workspace/Controllable
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
Caused by: java.lang.ClassNotFoundException
at RJavaClassLoader.findClass(RJavaClassLoader.java:383)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 2 more
It seems some kind of problem with Java, RJavaClassLoader,
I would ask you to help me solve this issue.
Thank you very much
The text was updated successfully, but these errors were encountered: