我试图在C++ CPLEX Concert技术中使用IloCplex::addMIPStart,如下所示:

IloCplex::MIPStartEffort effort = CPX_MIPSTART_SOLVEFIXED ;
cplex.addMIPStart(Y, Y_VAL,effort);

不幸的是,我遇到以下错误:
c++ - 如何在C++ API中使用IloCplex::addMIPStart-LMLPHP

我也尝试编写IloCplex::MIPStartEffort effort = MIPStartSolveFixed ;,但随后显示identifier "MIPStartSolveFixed" is undefined

根据

https://www.ibm.com/support/knowledgecenter/SSSA5P_12.8.0/ilog.odms.cplex.help/refcppcplex/html/classes/IloCplex.html#method_addMIPStart



https://www.ibm.com/support/knowledgecenter/SSSA5P_12.8.0/ilog.odms.cplex.help/refcppcplex/html/enumerations/IloCplex_MIPStartEffort.html?view=kc

至少其中之一应能正常工作而不会产生错误。有什么建议么?

最佳答案

正确的语法如下:

IloCplex::MIPStartEffort effort = IloCplex::MIPStartSolveFixed;

注意IloCplex::前面的额外MIPStartSolveFixed

10-06 01:41