Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AnyLogic simulation how to call R script

Tags:

r

anylogic

I need to call a R script from AnyLogic. I have an agent 'sensor' and it is going to send a random file from a specific location to a R script and then the R script will analyze that file and will let us know type of that file (image, sound, text etc)

Please let me know how to call a R script from AnyLogic..

like image 818
user2543622 Avatar asked Jul 03 '14 15:07

user2543622


2 Answers

i'm not sure there is an direct adapter for AnyLogic and R,but all agents in AnyLogic are Java objects so you can call external java (.jar) programs. JRI is a Java/R interface http://rforge.net/JRI/ you can write your R script within JRI then call from AnyLogic

like image 75
tyavuz Avatar answered Oct 17 '22 02:10

tyavuz


Rcaller is another route. Pretty simple and still active development: https://code.google.com/p/rcaller/

like image 39
Bruce Skarin Avatar answered Oct 17 '22 03:10

Bruce Skarin