R interface with CPLEX

你。 提交于 2020-01-20 08:58:08

问题


I am trying to link R, version 3.2.0, with CPLEX. I have used the following commands to install "cplexAPI" package:

1- install.Rtools()

2- install.packages("cplexAPI")

I have installed Rtools successfully but I am getting an error saying "ilcplex/cplex.h: No such file or directory" in "cplexAPI" installation.

Could you please help me out here?


回答1:


You can install cplexAPI manually:

R CMD INSTALL --configure-args=" \
   --with-cplex-include=/path/to/cplex_include/dir \
   --with-cplex-lib=/path/to/cplex_lib/dir" cplexAPI_x.x.x.tar.gz

Few other options can be found here. You can also add Cplex /include and /lib to your PATH if you use GNU/Linux. Keep in mind that Cplex has cplex (mostly for C) and concert (for C++) directories but it looks like you need just cplex directory.



来源:https://stackoverflow.com/questions/34749293/r-interface-with-cplex

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!