C++调用cplex,ERROR: the referenced IloExtractable has not been extracted

qq_37254952 2017-05-12 10:15:40
我有一个关于C++调用cplex的问题想要请教。我所编写的程序运行后出现ERROR: the referenced IloExtractable has not been extracted,请问是什么原因呢?定义三维变量的内容为
#include <ilcplex/ilocplex.h>
#include <iostream>
using namespace std;
ILOSTLBEGIN
typedef IloArray<IloNumVarArray> NumVarMatrix;
typedef IloArray<NumVarMatrix> NumVar3Matrix;
int main(int argc, char** argv)
{
IloBool convex;
IloEnv env;
try {
IloModel model(env);

IloInt i,j,l,k;
IloInt N = 5;
IloInt K = 3;

NumVar3Matrix x(env,N*N*K);
for(i=0; i<=N; i++) {
x[i] = NumVarMatrix(env, N);
for(j=0; j<=N; j++) {
x[i][j] = IloNumVarArray(env,K);
for(k=1; k<=K; k++) {
x[i][j][k] = IloNumVar(env,0.0, 1.0, ILOBOOL);}
}}
麻烦看一下有问题吗?求赐教,非常感谢。
...全文
1531 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
shiter 2017-09-17
  • 打赏
  • 举报
回复
https://www.researchgate.net/topic/CPLEX

5,530

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 模式及实现
社区管理员
  • 模式及实现社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧