R与CPLEX的接口 [英] R interface with CPLEX

查看:715
本文介绍了R与CPLEX的接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将R,版本3.2.0与CPLEX链接。我使用以下命令安装cplexAPI包:

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()

1- install.Rtools()

2- install.packages(cplexAPI)

2- install.packages("cplexAPI")

我已经成功安装了Rtools但是我收到一条错误说ilcplex / cplex.h:没有这样的文件或目录在cplexAPI安装中。

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

你能帮帮我吗?

推荐答案

你可以手动安装cplexAPI:

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

很少有其他选择此处。如果使用GNU / Linux,还可以将Cplex / include和/ lib添加到PATH中。请记住,Cplex有 cplex (主要用于C)和 Concert (用于C ++)目录,但它看起来像你只需要 cplex 目录。

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.

这篇关于R与CPLEX的接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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