1 Star 0 Fork 4

Venland/coin-or-cbc

forked from src-openEuler/coin-or-cbc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
coin-or-Cbc-exception.patch 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
Venland 提交于 2022-01-29 16:48 . init package
diff -up Cbc-releases-2.10.4/Cbc/src/Cbc_C_Interface.cpp.orig Cbc-releases-2.10.4/Cbc/src/Cbc_C_Interface.cpp
--- Cbc-releases-2.10.4/Cbc/src/Cbc_C_Interface.cpp.orig 2020-01-31 04:34:18.000000000 -0700
+++ Cbc-releases-2.10.4/Cbc/src/Cbc_C_Interface.cpp 2020-02-20 11:57:30.731295819 -0700
@@ -870,7 +870,7 @@ Cbc_solve(Cbc_Model *model)
try {
CbcMain1((int)argv.size(), &argv[0], *model->model_, NULL, *model->cbcData);
- } catch (CoinError e) {
+ } catch (CoinError& e) {
printf("%s ERROR: %s::%s, %s\n", prefix,
e.className().c_str(), e.methodName().c_str(), e.message().c_str());
}
diff -up Cbc-releases-2.10.4/Cbc/test/OsiCbcSolverInterfaceTest.cpp.orig Cbc-releases-2.10.4/Cbc/test/OsiCbcSolverInterfaceTest.cpp
--- Cbc-releases-2.10.4/Cbc/test/OsiCbcSolverInterfaceTest.cpp.orig 2020-01-31 04:34:18.000000000 -0700
+++ Cbc-releases-2.10.4/Cbc/test/OsiCbcSolverInterfaceTest.cpp 2020-02-20 11:57:30.731295819 -0700
@@ -124,7 +124,7 @@ void OsiCbcSolverInterfaceUnitTest(const
try {
solver.setObjCoeff(0, 0.0);
OSIUNITTEST_ADD_OUTCOME("cbc", "setObjCoeff on empty model", "should throw exception", OsiUnitTest::TestOutcome::ERROR, false);
- } catch (CoinError e) {
+ } catch (CoinError& e) {
if (OsiUnitTest::verbosity >= 1)
std::cout << "Correct throw from setObjCoeff on empty model" << std::endl;
}
@@ -138,7 +138,7 @@ void OsiCbcSolverInterfaceUnitTest(const
double value[] = { 0.0, 0.0, 0.0, 0.0 };
solver.setColSetBounds(index, index + 2, value);
OSIUNITTEST_ADD_OUTCOME("cbc", "setColSetBounds on cols not in model", "should throw exception", OsiUnitTest::TestOutcome::ERROR, false);
- } catch (CoinError e) {
+ } catch (CoinError& e) {
if (OsiUnitTest::verbosity >= 1)
std::cout << "Correct throw from setObjCoeff on empty model" << std::endl;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Venland/coin-or-cbc.git
git@gitee.com:Venland/coin-or-cbc.git
Venland
coin-or-cbc
coin-or-cbc
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385