AnyLogic仿真如何调用R脚本 [英] AnyLogic simulation how to call R script

查看:32
本文介绍了AnyLogic仿真如何调用R脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从 AnyLogic 调用 R 脚本.我有一个代理传感器",它将从特定位置向 R 脚本发送一个随机文件,然后 R 脚本将分析该文件并让我们知道该文件的类型(图像、声音、文本等)

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)

请告诉我如何从 AnyLogic 调用 R 脚本..

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

推荐答案

我不确定 AnyLogic 和 R 是否有直接适配器,但 AnyLogic 中的所有代理都是 Java 对象,因此您可以调用外部 java (.jar)程式.JRI 是一个 Java/R 接口 http://rforge.net/JRI/ 你可以在其中编写你的 R 脚本JRI 然后从 AnyLogic 调用

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

这篇关于AnyLogic仿真如何调用R脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆