简体   繁体   English

在 Ubuntu 上将 CPLEX 添加到 Octave

[英]Add CPLEX to Octave on Ubuntu

I'm on Ubuntu, when I want to add Clpex functions to octave so I can use Cplex functions, using addpath() to pass the folder path as below:我在 Ubuntu,当我想将 Clpex 函数添加到 Octave 以便我可以使用 Cplex 函数时,使用addpath()传递文件夹路径,如下所示:

>> addpath('/opt/ibm/ILOG/CPLEX_Studio1210/cplex/matlab/x86-64_linux')

The command is valid with no errors, then I enter the Cplex command to check that Cplex has been added, I get the following error :该命令有效且没有错误,然后我输入 Cplex 命令以检查是否已添加 Cplex,我收到以下错误

>> Cplex 
   error: class not found: dynamicprops

Is there a way to fix this?有没有办法来解决这个问题?

Both comments to the question are correct:对这个问题的两条评论都是正确的:

  1. CPLEX does not have octave support CPLEX 没有八度支持
  2. dynamicprops is not implemented in octave. dynamicprops 没有在 Octave 中实现。

Given that the CPLEX matlab API depends on dynamicprops, it will not work in octave as is.鉴于 CPLEX matlab API 取决于 dynamicprops,它不会按原样在八度音程中工作。

However, you can try a workaround: first install https://github.com/farhi/octave-dynamicprops .但是,您可以尝试一种解决方法:首先安装https://github.com/farhi/octave-dynamicprops It is not a drop-in replacement for matlab's dynamicprops, but may be sufficient.它不是 matlab 的 dynamicprops 的直接替代品,但可能就足够了。 CPLEX uses dynamicprops for handling parameters, so if you do not modify any parameters then octave-dynamicprops may give you just enough to get cplex working. CPLEX 使用 dynamicprops 来处理参数,因此如果您不修改任何参数,那么 octave-dynamicprops 可能足以让 cplex 正常工作。 Of course, even if this works now it may break down in the future...当然,即使现在可行,将来也可能会崩溃……

Good luck!祝你好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM