R interface with CPLEX

2020-02-15 04:36发布

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条回答
Bombasti
2楼-- · 2020-02-15 05:33

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.

查看更多
登录 后发表回答