【发布时间】:2012-04-26 04:40:13
【问题描述】:
我正在c++ 中编写算法,我有一个主问题和一个子问题。所以我两次调用 cplex 求解器。第一次是当我称之为解决主要问题时,这是我的代码:
IloModel model_master(env);
definition of obj and constraints
IloCplex cplex_master(env);
cplex_master.extract(model_master);
cplex_master.setParam(IloCplex::EpGap,0.0001);
cplex_master.solve();
LB=cplex_master.getObjValue();
但它不起作用!当我将cout<<"1" << endl; 放在IloCplex cplex_master(env); 之后时,它不会打印出来。
【问题讨论】:
-
如果你把 cout
-
是的,我明白了。错误是
Unhandled exception at 0x758cb9bc in For-Calling-Cplex.exe: Microsoft C++ exception: IloCplex::Exception at memory location 0x0026fb6c..